From 5ed3a5be31f36dfef4fe460a5bbea368f1f14bbe Mon Sep 17 00:00:00 2001 From: Craig Boland Date: Tue, 20 Dec 2016 08:36:09 -0600 Subject: [PATCH] Updated jquery.dataTables for 1.10.9 (#13099) Release Notes: https://cdn.datatables.net/1.10.9/ * Moved legacy browser settings to its own data type. * Added 'aIds' property on legacy settings object for mapping row ids to data indexes. * Added 'rowIdFn' function to legacy settings object to get a row's id from the row's data. --- jquery.datatables/index.d.ts | 15 ++++++++++++--- jquery.datatables/jquery.dataTables-tests.ts | 13 ++++++++++++- jquery.datatables/tsconfig.json | 10 +++++----- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/jquery.datatables/index.d.ts b/jquery.datatables/index.d.ts index bca787fe8d..c7c4bd8682 100644 --- a/jquery.datatables/index.d.ts +++ b/jquery.datatables/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for JQuery DataTables 1.10.8 +// Type definitions for JQuery DataTables 1.10.9 // Project: http://www.datatables.net // Definitions by: Kiarash Ghiaseddin , Omid Rad , Armin Sander // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -8,7 +8,7 @@ // - Plugin and extension definitions are not typed. // - Some return types are not fully wokring -/// +/// interface JQuery { DataTable(param?: DataTables.Settings): DataTables.DataTable; @@ -1752,9 +1752,10 @@ declare namespace DataTables { oFeatures: FeaturesLegacy; oScroll: ScrollingLegacy; oLanguage: LanguageLegacy; // | { fnInfoCallback: FunctionInfoCallback; }; - oBrowser: { bScrollOversize: boolean; }; + oBrowser: BrowserLegacy; aanFeatures: ArrayStringNode[][]; aoData: RowLegacy[]; + aIds: any; aiDisplay: number[]; aiDisplayMaster: number[]; aoColumns: ColumnLegacy[]; @@ -1827,6 +1828,14 @@ declare namespace DataTables { iTabIndex: number; nScrollHead: Node; nScrollFoot: Node; + rowIdFn: (mSource: string | number | Function) => Function; + } + + export interface BrowserLegacy { + barWidth: number, + bBounding: boolean, + bScrollbarLeft: boolean, + bScrollOversize: boolean } export interface FeaturesLegacy { diff --git a/jquery.datatables/jquery.dataTables-tests.ts b/jquery.datatables/jquery.dataTables-tests.ts index 591b875cdb..1bf6e26593 100644 --- a/jquery.datatables/jquery.dataTables-tests.ts +++ b/jquery.datatables/jquery.dataTables-tests.ts @@ -1,4 +1,4 @@ -/// +/// $(document).ready(function () { @@ -268,6 +268,17 @@ $(document).ready(function () { //#endregion "Settings" + //#region "Settings-Legacy" + + var browserLegacy: DataTables.BrowserLegacy = { + barWidth: 10, + bBounding: true, + bScrollbarLeft: true, + bScrollOversize: true + } + + //#endregion + //#region "Init" var dt = $('#example').DataTable(); diff --git a/jquery.datatables/tsconfig.json b/jquery.datatables/tsconfig.json index eeaf42b334..91bf41e437 100644 --- a/jquery.datatables/tsconfig.json +++ b/jquery.datatables/tsconfig.json @@ -1,8 +1,4 @@ { - "files": [ - "index.d.ts", - "jquery.dataTables-tests.ts" - ], "compilerOptions": { "module": "commonjs", "target": "es6", @@ -15,5 +11,9 @@ "types": [], "noEmit": true, "forceConsistentCasingInFileNames": true - } + }, + "files": [ + "index.d.ts", + "jquery.dataTables-tests.ts" + ] } \ No newline at end of file