datatables.net-columncontrol 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/License.txt +22 -0
- package/Readme.md +50 -0
- package/js/dataTables.columnControl.js +2537 -0
- package/js/dataTables.columnControl.min.js +8 -0
- package/js/dataTables.columnControl.min.mjs +8 -0
- package/js/dataTables.columnControl.mjs +2496 -0
- package/package.json +48 -0
- package/types/types.d.ts +88 -0
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "datatables.net-columncontrol",
|
|
3
|
+
"description": "ColumnControl for DataTables",
|
|
4
|
+
"main": "js/dataTables.columnControl.js",
|
|
5
|
+
"module": "js/dataTables.columnControl.mjs",
|
|
6
|
+
"types": "./types/types.d.ts",
|
|
7
|
+
"version": "0.9.2",
|
|
8
|
+
"files": [
|
|
9
|
+
"js/**/*.js",
|
|
10
|
+
"js/**/*.mjs",
|
|
11
|
+
"types/**/*.d.ts"
|
|
12
|
+
],
|
|
13
|
+
"keywords": [
|
|
14
|
+
"ColumnControl",
|
|
15
|
+
"search",
|
|
16
|
+
"filter",
|
|
17
|
+
"buttons",
|
|
18
|
+
"column visibility",
|
|
19
|
+
"Datatables",
|
|
20
|
+
"table",
|
|
21
|
+
"filter",
|
|
22
|
+
"sort"
|
|
23
|
+
],
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"datatables.net": "^2.3.0"
|
|
26
|
+
},
|
|
27
|
+
"moduleType": [
|
|
28
|
+
"globals",
|
|
29
|
+
"amd",
|
|
30
|
+
"node"
|
|
31
|
+
],
|
|
32
|
+
"ignore": [
|
|
33
|
+
"composer.json",
|
|
34
|
+
"datatables.json",
|
|
35
|
+
"package.json"
|
|
36
|
+
],
|
|
37
|
+
"author": {
|
|
38
|
+
"name": "SpryMedia Ltd",
|
|
39
|
+
"url": "http://datatables.net"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://datatables.net",
|
|
42
|
+
"bugs": "https://datatables.net/forums",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "https://github.com/DataTables/Dist-DataTables-ColumnControl.git"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/types/types.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// Type definitions for DataTables ColumnControl
|
|
2
|
+
//
|
|
3
|
+
// Project: https://datatables.net/extensions/columncontrol/, https://datatables.net
|
|
4
|
+
// Definitions by:
|
|
5
|
+
// SpryMedia
|
|
6
|
+
// Andy Ma <https://github.com/andy-maca>
|
|
7
|
+
|
|
8
|
+
/// <reference types="jquery" />
|
|
9
|
+
|
|
10
|
+
import DataTables from 'datatables.net';
|
|
11
|
+
import {TContentItem} from '../js/ColumnControl';
|
|
12
|
+
|
|
13
|
+
export default DataTables;
|
|
14
|
+
|
|
15
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
16
|
+
* DataTables' types integration
|
|
17
|
+
*/
|
|
18
|
+
declare module 'datatables.net' {
|
|
19
|
+
interface Config {
|
|
20
|
+
/**
|
|
21
|
+
* Common ColumnControl extension options to apply to all columns
|
|
22
|
+
*/
|
|
23
|
+
columnControl?: ConfigColumnControl | Array<TContentItem | ConfigColumnControl>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface ConfigColumns {
|
|
27
|
+
/**
|
|
28
|
+
* Column specific column configuration options
|
|
29
|
+
*
|
|
30
|
+
* @returns Api for chaining with the additional ColumnControl methods
|
|
31
|
+
*/
|
|
32
|
+
columnControl?: ConfigColumnControl | Array<TContentItem | ConfigColumnControl>;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface DataTablesStatic {
|
|
36
|
+
/**
|
|
37
|
+
* ColumnControl class
|
|
38
|
+
*/
|
|
39
|
+
ColumnControl: {
|
|
40
|
+
/**
|
|
41
|
+
* Create a new ColumnControl instance for a specific column
|
|
42
|
+
*/
|
|
43
|
+
new (
|
|
44
|
+
dt: Api<any>,
|
|
45
|
+
columnIdx: number,
|
|
46
|
+
config: ConfigColumnControl
|
|
47
|
+
): DataTablesStatic['ColumnControl'];
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* ColumnControl version
|
|
51
|
+
*/
|
|
52
|
+
version: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Default configuration values
|
|
56
|
+
*/
|
|
57
|
+
defaults: ConfigColumnControl;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
63
|
+
* Options
|
|
64
|
+
*/
|
|
65
|
+
type TTfootTarget = `tfoot:${number}`;
|
|
66
|
+
type TTheadTarget = `thead:${number}`;
|
|
67
|
+
|
|
68
|
+
interface ConfigColumnControl {
|
|
69
|
+
/**
|
|
70
|
+
/**
|
|
71
|
+
* Designate the target header or footer row for where to insert the ColumnControl's content
|
|
72
|
+
*/
|
|
73
|
+
target: number | 'tfoot' | TTfootTarget | TTheadTarget;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Class(es) to assign to the target row.
|
|
77
|
+
*/
|
|
78
|
+
className?: string | string[];
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Content to show in the cells.
|
|
82
|
+
*/
|
|
83
|
+
content?: TContentItem[];
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
87
|
+
* API
|
|
88
|
+
*/
|