datatables.net-columncontrol 1.0.6 → 1.1.0

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/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "js/dataTables.columnControl.js",
5
5
  "module": "js/dataTables.columnControl.mjs",
6
6
  "types": "./types/types.d.ts",
7
- "version": "1.0.6",
7
+ "version": "1.1.0",
8
8
  "files": [
9
9
  "js/**/*.js",
10
10
  "js/**/*.mjs",
package/types/types.d.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  /// <reference types="jquery" />
9
9
 
10
10
  import DataTables from 'datatables.net';
11
- import {TContentItem} from '../js/ColumnControl';
11
+ import { TContentItem } from '../js/ColumnControl';
12
12
 
13
13
  export default DataTables;
14
14
 
@@ -122,7 +122,7 @@ declare module 'datatables.net' {
122
122
 
123
123
  /** Search placeholder */
124
124
  search?: string;
125
- }
125
+ };
126
126
 
127
127
  /** Strings used for the <select> available for choosing different search logic */
128
128
  search?: {
@@ -134,7 +134,7 @@ declare module 'datatables.net' {
134
134
  ends?: string;
135
135
  empty?: string;
136
136
  notEmpty?: string;
137
- },
137
+ };
138
138
 
139
139
  /** searchDateTime options */
140
140
  datetime?: {
@@ -144,7 +144,7 @@ declare module 'datatables.net' {
144
144
  less?: string;
145
145
  empty?: string;
146
146
  notEmpty?: string;
147
- },
147
+ };
148
148
 
149
149
  /** searchNumber options */
150
150
  number?: {
@@ -156,9 +156,48 @@ declare module 'datatables.net' {
156
156
  lessOrEqual?: string;
157
157
  empty?: string;
158
158
  notEmpty?: string;
159
- }
160
- }
161
- }
159
+ };
160
+ };
161
+ };
162
+ }
163
+
164
+ interface ApiColumnMethods<T> {
165
+ /** Methods for ColumnControl */
166
+ columnControl: {
167
+ /**
168
+ * Clear any ColumnControl search that is applied to the selected column (both
169
+ * `searchList` and the input search types will be cleared).
170
+ */
171
+ searchClear(): ApiColumnMethods<T>;
172
+
173
+ /**
174
+ * Reload the options for the `searchList` content type, or provide new options.
175
+ *
176
+ * @param options Options to load in, or use `'refresh'` to read from the table.
177
+ */
178
+ searchList(
179
+ options: 'refresh' | string[] | Array<{ label: string; value: any }>
180
+ ): ApiColumnMethods<T>;
181
+ };
182
+ }
183
+
184
+ interface ApiColumnsMethods<T> {
185
+ columnControl: {
186
+ /**
187
+ * Clear any ColumnControl search that is applied to the selected columns (both
188
+ * `searchList` and the input search types will be cleared).
189
+ */
190
+ searchClear(): ApiColumnMethods<T>;
191
+
192
+ /**
193
+ * Reload the options for the `searchList` content type, or provide new options.
194
+ *
195
+ * @param options Options to load in, or use `'refresh'` to read from the table.
196
+ */
197
+ searchList(
198
+ options: 'refresh' | string[] | Array<{ label: string; value: any }>
199
+ ): ApiColumnMethods<T>;
200
+ };
162
201
  }
163
202
  }
164
203
 
@@ -185,7 +224,3 @@ interface ConfigColumnControl {
185
224
  */
186
225
  content?: TContentItem[];
187
226
  }
188
-
189
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
190
- * API
191
- */