Skip to content

Commit 70b8479

Browse files
committed
b089337101a134b448651ef1c1b0d75822424f4f
Sync to source repo @b089337101a134b448651ef1c1b0d75822424f4f
1 parent a946eac commit 70b8479

4 files changed

Lines changed: 151 additions & 6 deletions

File tree

datatables.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
"types/types.d.ts"
1515
],
1616
"src-repo": "http://github.com/DataTables/RowGroup",
17-
"last-tag": "1.2.0"
18-
}
17+
"last-tag": "1.2.0",
18+
"last-sync": "b089337101a134b448651ef1c1b0d75822424f4f"
19+
}

js/rowGroup.jqueryui.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/rowGroup.jqueryui.min.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
/*! jQuery UI styling wrapper for RowGroup
2+
* © SpryMedia Ltd - datatables.net/license
3+
*/
14
import $ from"jquery";import DataTable from"datatables.net-ju";import DataTable from"datatables.net-rowgroup";export default DataTable;

types/types.d.ts

Lines changed: 142 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,145 @@
1+
// Type definitions for DataTables RowGroup
2+
//
3+
// Project: https://datatables.net/extensions/rowgroup/, https://datatables.net
4+
// Definitions by:
5+
// SpryMedia
6+
// Matthieu Tabuteau <https://github.com/maixiu>
17

2-
// Dist-DataTables-RowGroup-jQueryUI integration with jQueryUI exports the DataTables API having
3-
// set default values to complete the ingeration.
4-
import Api from "datatables.net";
8+
/// <reference types="jquery" />
59

6-
export default Api;
10+
import DataTables, {Api} from 'datatables.net';
711

12+
export default DataTables;
13+
14+
15+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
16+
* DataTables' types integration
17+
*/
18+
declare module 'datatables.net' {
19+
interface Config {
20+
/**
21+
* RowGroup extension options
22+
*/
23+
rowGroup?: boolean | ConfigRowGroup;
24+
}
25+
26+
interface Api<T> {
27+
/**
28+
* RowGroup methods container
29+
*
30+
* @returns Api for chaining with the additional RowGroup methods
31+
*/
32+
rowGroup(): ApiRowGroup<T>;
33+
}
34+
35+
interface ApiStatic {
36+
/**
37+
* RowGroup class
38+
*/
39+
RowGroup: {
40+
/**
41+
* Create a new RowGroup instance for the target DataTable
42+
*/
43+
new (dt: Api<any>, settings: boolean | ConfigRowGroup);
44+
45+
/**
46+
* Default configuration values
47+
*/
48+
defaults: ConfigRowGroup;
49+
50+
/**
51+
* RowGroup version
52+
*/
53+
version: string;
54+
}
55+
}
56+
}
57+
58+
59+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
60+
* Options
61+
*/
62+
63+
interface ConfigRowGroup {
64+
/**
65+
* Set the class name to be used for the grouping rows
66+
*/
67+
className?: string;
68+
69+
/**
70+
* Set the data point to use as the grouping data source
71+
*/
72+
dataSrc?: number|string;
73+
74+
/**
75+
* Text to show for rows which have `null`, `undefined` or empty string group data
76+
*
77+
* @since 1.0.2
78+
*/
79+
emptyDataGroup?: string;
80+
81+
/**
82+
* Provides the ability to disable row grouping at initialisation
83+
*/
84+
enable?: boolean;
85+
86+
/**
87+
* Set the class name to be used for the grouping end rows
88+
*/
89+
endClassName?: string;
90+
91+
/**
92+
* Provide a function that can be used to control the data shown in the end grouping row
93+
*/
94+
endRender?: (rows: Api<any>, group: string) => string|HTMLElement|JQuery;
95+
96+
/**
97+
* Set the class name to be used for the start grouping rows
98+
*/
99+
startClassName?: string;
100+
101+
/**
102+
* Provide a function that can be used to control the data shown in the start grouping row
103+
*/
104+
startRender?: (rows: Api<any>, group: string) => string|HTMLElement|JQuery;
105+
}
106+
107+
108+
interface ApiRowGroup<T> extends Api<T> {
109+
/**
110+
* Get the data source for the row grouping
111+
*
112+
* @returns Data source property
113+
*/
114+
dataSrc(): number | string;
115+
116+
/**
117+
* Set the data source for the row grouping
118+
*
119+
* @param prop Data source property
120+
* @returns DataTables Api instance
121+
*/
122+
dataSrc(prop: number|string): Api<T>;
123+
124+
/**
125+
* Disable RowGroup's interaction with the table
126+
*
127+
* @returns DataTables API instance
128+
*/
129+
disable(): Api<T>;
130+
131+
/**
132+
* Enable or disable RowGroup's interaction with the table
133+
*
134+
* @param enable Either enables or disables RowGroup depending on the value of the flag
135+
* @returns DataTables Api instance
136+
*/
137+
enable(enable?: boolean): Api<T>;
138+
139+
/**
140+
* Get the enabled state for RowGroup.
141+
*
142+
* @returns true if enabled, false otherwise
143+
*/
144+
enabled(): boolean;
145+
}

0 commit comments

Comments
 (0)