1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | interface JQuery {
|
16 | DataTable(opts?: DataTables.Settings): DataTables.Api;
|
17 | dataTable: DataTables.StaticFunctions;
|
18 | }
|
19 |
|
20 | declare namespace DataTables {
|
21 | interface JQueryDataTables extends JQuery {
|
22 | |
23 |
|
24 |
|
25 |
|
26 |
|
27 | api(): Api;
|
28 | }
|
29 |
|
30 | interface Api extends CoreMethods {
|
31 | |
32 |
|
33 |
|
34 | [key: number]: any;
|
35 | |
36 |
|
37 |
|
38 |
|
39 |
|
40 | (selector: string | Node | Node[] | JQuery): Api;
|
41 |
|
42 | |
43 |
|
44 |
|
45 | data(): Api;
|
46 |
|
47 | |
48 |
|
49 |
|
50 | order: OrderMethods;
|
51 |
|
52 |
|
53 |
|
54 | |
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | cell(cellSelector: any, modifier?: ObjectSelectorModifier): CellMethods;
|
61 |
|
62 | |
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 | cell(rowSelector: any, cellSelector: any, modifier?: ObjectSelectorModifier): CellMethods;
|
70 |
|
71 | |
72 |
|
73 |
|
74 |
|
75 |
|
76 | cells(modifier?: ObjectSelectorModifier): CellsMethods;
|
77 |
|
78 | |
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 | cells(cellSelector: any, modifier?: ObjectSelectorModifier): CellsMethods;
|
85 |
|
86 | |
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 | cells(rowSelector: any, cellSelector: any, modifier?: ObjectSelectorModifier): CellsMethods;
|
94 |
|
95 |
|
96 |
|
97 |
|
98 | |
99 |
|
100 |
|
101 | column: ColumnMethodsModel;
|
102 |
|
103 | |
104 |
|
105 |
|
106 | columns: ColumnsMethodsModel;
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 | |
113 |
|
114 |
|
115 | row: RowMethodsModel;
|
116 |
|
117 | |
118 |
|
119 |
|
120 | rows: RowsMethodsModel;
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 | |
127 |
|
128 |
|
129 |
|
130 |
|
131 | table(tableSelector: any): TableMethods;
|
132 |
|
133 | |
134 |
|
135 |
|
136 |
|
137 |
|
138 | tables(tableSelector?: any): TablesMethods;
|
139 |
|
140 |
|
141 | }
|
142 |
|
143 | interface DataTables extends CoreMethods {
|
144 | [index: number]: Api;
|
145 | }
|
146 |
|
147 | interface ObjectSelectorModifier {
|
148 | |
149 |
|
150 |
|
151 |
|
152 | order?: string | undefined;
|
153 |
|
154 | |
155 |
|
156 |
|
157 |
|
158 | search?: string | undefined;
|
159 |
|
160 | |
161 |
|
162 |
|
163 | searchPlaceholder?: string | undefined;
|
164 |
|
165 | |
166 |
|
167 |
|
168 |
|
169 | page?: string | undefined;
|
170 | }
|
171 |
|
172 |
|
173 |
|
174 |
|
175 |
|
176 | interface CoreMethods extends UtilityMethods {
|
177 | |
178 |
|
179 |
|
180 | $(selector: string | Node | Node[] | JQuery, modifier?: ObjectSelectorModifier): JQuery;
|
181 |
|
182 | |
183 |
|
184 |
|
185 | ajax: AjaxMethodModel;
|
186 |
|
187 | |
188 |
|
189 |
|
190 | clear(): Api;
|
191 |
|
192 | |
193 |
|
194 |
|
195 |
|
196 |
|
197 | destroy(remove?: boolean): Api;
|
198 |
|
199 | |
200 |
|
201 |
|
202 |
|
203 |
|
204 | draw(paging?: boolean | string): Api;
|
205 |
|
206 | |
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 | i18n(token: string, def: any, numeric?: number): string;
|
216 |
|
217 | |
218 |
|
219 |
|
220 | init(): Settings;
|
221 |
|
222 | |
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 | off(event: string, callback?: (e: Event, ...args: any[]) => void): Api;
|
229 |
|
230 | |
231 |
|
232 |
|
233 |
|
234 |
|
235 |
|
236 | on(event: string, callback: (e: Event, ...args: any[]) => void): Api;
|
237 |
|
238 | |
239 |
|
240 |
|
241 |
|
242 |
|
243 |
|
244 | one(event: string, callback: (e: Event, ...args: any[]) => void): Api;
|
245 |
|
246 | |
247 |
|
248 |
|
249 | page: PageMethods;
|
250 |
|
251 | |
252 |
|
253 |
|
254 | search(): string;
|
255 |
|
256 | |
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 | search(input: string, regex?: boolean, smart?: boolean, caseInsen?: boolean): Api;
|
265 |
|
266 | |
267 |
|
268 |
|
269 | settings(): Api;
|
270 |
|
271 | |
272 |
|
273 |
|
274 | state: StateMethods;
|
275 | }
|
276 |
|
277 |
|
278 |
|
279 | interface AjaxMethods extends Api {
|
280 | |
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 | load(callback?: (json: any) => void, resetPaging?: boolean): Api;
|
287 | }
|
288 |
|
289 | interface AjaxMethodModel {
|
290 | |
291 |
|
292 |
|
293 | json(): object;
|
294 |
|
295 | |
296 |
|
297 |
|
298 | params(): object;
|
299 |
|
300 | |
301 |
|
302 |
|
303 |
|
304 |
|
305 |
|
306 | reload(callback?: (json: any) => void, resetPaging?: boolean): Api;
|
307 |
|
308 | |
309 |
|
310 |
|
311 | url(): string;
|
312 |
|
313 | |
314 |
|
315 |
|
316 |
|
317 |
|
318 | url(url: string): AjaxMethods;
|
319 | }
|
320 |
|
321 |
|
322 |
|
323 |
|
324 |
|
325 | interface OrderMethods {
|
326 | |
327 |
|
328 |
|
329 | (): Array<Array<(string | number)>>;
|
330 |
|
331 | |
332 |
|
333 |
|
334 |
|
335 |
|
336 | (order?: Array<(string | number)> | Array<Array<(string | number)>>): Api;
|
337 | (order: Array<(string | number)>, ...args: any[]): Api;
|
338 |
|
339 | |
340 |
|
341 |
|
342 |
|
343 | fixed(): ObjectOrderFixed;
|
344 | |
345 |
|
346 |
|
347 | fixed(order: ObjectOrderFixed): Api;
|
348 |
|
349 | |
350 |
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 | listener(node: string | Node | JQuery, column: number, callback: () => void): Api;
|
357 | }
|
358 |
|
359 |
|
360 |
|
361 |
|
362 | interface PageMethods {
|
363 | |
364 |
|
365 |
|
366 | (): number;
|
367 |
|
368 | |
369 |
|
370 |
|
371 |
|
372 |
|
373 | (page: number | string): Api;
|
374 |
|
375 | |
376 |
|
377 |
|
378 | info(): PageMethodeModelInfoReturn;
|
379 |
|
380 | |
381 |
|
382 |
|
383 | len(): number;
|
384 |
|
385 | |
386 |
|
387 |
|
388 |
|
389 |
|
390 | len(length: number): Api;
|
391 | }
|
392 |
|
393 | interface PageMethodeModelInfoReturn {
|
394 | page: number;
|
395 | pages: number;
|
396 | start: number;
|
397 | end: number;
|
398 | length: number;
|
399 | recordsTotal: number;
|
400 | recordsDisplay: number;
|
401 | serverSide: boolean;
|
402 | }
|
403 |
|
404 |
|
405 |
|
406 |
|
407 |
|
408 | interface StateMethods {
|
409 | |
410 |
|
411 |
|
412 | (): StateReturnModel;
|
413 |
|
414 | |
415 |
|
416 |
|
417 | clear(): Api;
|
418 |
|
419 | |
420 |
|
421 |
|
422 | loaded(): StateReturnModel;
|
423 |
|
424 | |
425 |
|
426 |
|
427 | save(): Api;
|
428 | }
|
429 |
|
430 | interface StateReturnModel {
|
431 | time: number;
|
432 | start: number;
|
433 | length: number;
|
434 | order: Array<Array<(string | number)>>;
|
435 | search: SearchSettings;
|
436 | columns: StateReturnModelColumns[];
|
437 | }
|
438 |
|
439 | interface StateReturnModelColumns {
|
440 | search: SearchSettings;
|
441 | visible: boolean;
|
442 | }
|
443 |
|
444 |
|
445 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 | interface UtilityMethods {
|
451 | |
452 |
|
453 |
|
454 | any(): boolean;
|
455 |
|
456 | |
457 |
|
458 |
|
459 |
|
460 |
|
461 |
|
462 | concat(a: object, ...b: object[]): Api;
|
463 |
|
464 | |
465 |
|
466 |
|
467 | count(): number;
|
468 |
|
469 | |
470 |
|
471 |
|
472 |
|
473 |
|
474 | each(fn: (value: any, index?: number, dt?: Api) => void): Api;
|
475 |
|
476 | |
477 |
|
478 |
|
479 |
|
480 |
|
481 | eq(idx: number): Api;
|
482 |
|
483 | |
484 |
|
485 |
|
486 |
|
487 |
|
488 | filter(fn: (value: any, index: number, dt: Api) => boolean): Api;
|
489 |
|
490 | |
491 |
|
492 |
|
493 | flatten(): Api;
|
494 |
|
495 | |
496 |
|
497 |
|
498 |
|
499 |
|
500 | indexOf(value: any): number;
|
501 |
|
502 | |
503 |
|
504 |
|
505 |
|
506 |
|
507 | join(separator: string): string;
|
508 |
|
509 | |
510 |
|
511 |
|
512 |
|
513 |
|
514 | lastIndexOf(value: any): number;
|
515 |
|
516 | |
517 |
|
518 |
|
519 | length: number;
|
520 |
|
521 | |
522 |
|
523 |
|
524 |
|
525 |
|
526 | map(fn: (value: any, index: number, dt: Api) => any): Api;
|
527 |
|
528 | |
529 |
|
530 |
|
531 |
|
532 |
|
533 | pluck(property: number | string): Api;
|
534 |
|
535 | |
536 |
|
537 |
|
538 | pop(): any;
|
539 |
|
540 | |
541 |
|
542 |
|
543 |
|
544 |
|
545 | push(value_1: any, ...value_2: any[]): number;
|
546 |
|
547 | |
548 |
|
549 |
|
550 |
|
551 |
|
552 |
|
553 | reduce(fn: (current: number, value: any, index: number, dt: Api) => number, initialValue?: any): any;
|
554 |
|
555 | |
556 |
|
557 |
|
558 |
|
559 |
|
560 |
|
561 | reduceRight(fn: (current: number, value: any, index: number, dt: Api) => number, initialValue?: any): any;
|
562 |
|
563 | |
564 |
|
565 |
|
566 | reverse(): Api;
|
567 |
|
568 | |
569 |
|
570 |
|
571 | shift(): any;
|
572 |
|
573 | |
574 |
|
575 |
|
576 |
|
577 |
|
578 | sort(fn?: (value1: any, value2: any) => number): Api;
|
579 |
|
580 | |
581 |
|
582 |
|
583 |
|
584 |
|
585 |
|
586 |
|
587 | splice(index: number, howMany: number, value_1?: any, ...value_2: any[]): any[];
|
588 |
|
589 | |
590 |
|
591 |
|
592 | to$(): JQuery;
|
593 |
|
594 | |
595 |
|
596 |
|
597 | toArray(): any[];
|
598 |
|
599 | |
600 |
|
601 |
|
602 | toJQuery(): JQuery;
|
603 |
|
604 | |
605 |
|
606 |
|
607 | unique(): Api;
|
608 |
|
609 | |
610 |
|
611 |
|
612 |
|
613 |
|
614 | unshift(value_1: any, ...value_2: any[]): number;
|
615 | }
|
616 |
|
617 |
|
618 |
|
619 | interface CommonSubMethods {
|
620 | |
621 |
|
622 |
|
623 |
|
624 |
|
625 | cache(t: string): Api;
|
626 | }
|
627 |
|
628 |
|
629 |
|
630 | interface CommonCellMethods extends CommonSubMethods {
|
631 | |
632 |
|
633 |
|
634 |
|
635 |
|
636 | invalidate(source?: string): Api;
|
637 |
|
638 | |
639 |
|
640 |
|
641 |
|
642 |
|
643 | render(t: string): any;
|
644 | }
|
645 |
|
646 | interface CellMethods extends CoreMethods, CommonCellMethods {
|
647 | |
648 |
|
649 |
|
650 | data(): any;
|
651 |
|
652 | |
653 |
|
654 |
|
655 |
|
656 |
|
657 | data(data: any): Api;
|
658 |
|
659 | |
660 |
|
661 |
|
662 | index(): CellIndexReturn;
|
663 |
|
664 | |
665 |
|
666 |
|
667 | node(): Node;
|
668 | }
|
669 |
|
670 | interface CellIndexReturn {
|
671 | row: number;
|
672 | column: number;
|
673 | columnVisible: number;
|
674 | }
|
675 |
|
676 | interface CellsMethods extends CoreMethods, CommonCellMethods {
|
677 | |
678 |
|
679 |
|
680 | data(): Api;
|
681 |
|
682 | |
683 |
|
684 |
|
685 |
|
686 |
|
687 | every(
|
688 | fn: (
|
689 | this: CellMethods,
|
690 | cellRowIdx: number,
|
691 | cellColIdx: number,
|
692 | tableLoop: number,
|
693 | cellLoop: number,
|
694 | ) => void,
|
695 | ): Api;
|
696 |
|
697 | |
698 |
|
699 |
|
700 | indexes(): Api;
|
701 |
|
702 | |
703 |
|
704 |
|
705 | nodes(): Api;
|
706 | }
|
707 |
|
708 |
|
709 |
|
710 |
|
711 | interface CommonColumnMethod extends CommonSubMethods {
|
712 | |
713 |
|
714 |
|
715 | footer(): HTMLElement;
|
716 |
|
717 | |
718 |
|
719 |
|
720 | header(): HTMLElement;
|
721 |
|
722 | |
723 |
|
724 |
|
725 |
|
726 |
|
727 | order(direction: string): Api;
|
728 |
|
729 | |
730 |
|
731 |
|
732 | visible(): boolean;
|
733 |
|
734 | |
735 |
|
736 |
|
737 |
|
738 |
|
739 |
|
740 | visible(show: boolean, redrawCalculations?: boolean): Api;
|
741 | }
|
742 |
|
743 | interface ColumnMethodsModel {
|
744 | |
745 |
|
746 |
|
747 |
|
748 |
|
749 |
|
750 | (columnSelector: any, modifier?: ObjectSelectorModifier): ColumnMethods;
|
751 |
|
752 | |
753 |
|
754 |
|
755 |
|
756 |
|
757 |
|
758 | index(t: string, index: number): number;
|
759 | }
|
760 |
|
761 | interface ColumnMethods extends CoreMethods, CommonColumnMethod {
|
762 | |
763 |
|
764 |
|
765 | data(): Api;
|
766 |
|
767 | |
768 |
|
769 |
|
770 | dataSrc(): number | string | (() => string);
|
771 |
|
772 | /**
|
773 | * Get index information about the selected cell
|
774 | *
|
775 | * @param t Specify if you want to get the column data index (default) or the visible index (visible).
|
776 | */
|
777 | index(t?: string): number;
|
778 |
|
779 | /**
|
780 | * Obtain the th / td nodes for the selected column
|
781 | */
|
782 | nodes(): Api;
|
783 | }
|
784 |
|
785 | interface ColumnsMethodsModel {
|
786 | /**
|
787 | * Select all columns
|
788 | *
|
789 | * @param Option used to specify how the cells should be ordered, and if paging or filtering in the table should be taken into account.
|
790 | */
|
791 | (modifier?: ObjectSelectorModifier): ColumnsMethods;
|
792 |
|
793 | /**
|
794 | * Select columns found by a cell selector
|
795 | *
|
796 | * @param cellSelector Cell selector.
|
797 | * @param Option used to specify how the cells should be ordered, and if paging or filtering in the table should be taken into account.
|
798 | */
|
799 | (columnSelector: any, modifier?: ObjectSelectorModifier): ColumnsMethods;
|
800 |
|
801 | /**
|
802 | * Recalculate the column widths for layout.
|
803 | */
|
804 | adjust(): Api;
|
805 | }
|
806 |
|
807 | interface ColumnsMethods extends CoreMethods, CommonColumnMethod {
|
808 | /**
|
809 | * Obtain the data for the columns from the selector
|
810 | */
|
811 | data(): Api;
|
812 |
|
813 | /**
|
814 | * Get the data source property for the selected columns.
|
815 | */
|
816 | dataSrc(): Api;
|
817 |
|
818 | /**
|
819 | * Iterate over each selected column, with the function context set to be the column in question. Since: DataTables 1.10.6
|
820 | *
|
821 | * @param fn Function to execute for every column selected.
|
822 | */
|
823 | every(fn: (this: ColumnMethods, colIdx: number, tableLoop: number, colLoop: number) => void): Api;
|
824 |
|
825 | /**
|
826 | * Get the column indexes of the selected columns.
|
827 | *
|
828 | * @param t Specify if you want to get the column data index (default) or the visible index (visible).
|
829 | */
|
830 | indexes(t?: string): Api;
|
831 |
|
832 | /**
|
833 | * Obtain the th / td nodes for the selected columns
|
834 | */
|
835 | nodes(): Api[][];
|
836 | }
|
837 | // #endregion "column-methods"
|
838 |
|
839 | // #region "row-methods"
|
840 |
|
841 | interface CommonRowMethod extends CommonSubMethods {
|
842 | /**
|
843 | * Obtain the th / td nodes for the selected column
|
844 | *
|
845 | * @param source Data source to read the new data from. Values: 'auto', 'data', 'dom'
|
846 | */
|
847 | invalidate(source?: string): Api;
|
848 | }
|
849 |
|
850 | interface RowChildMethodModel {
|
851 | /**
|
852 | * Get the child row(s) that have been set for a parent row
|
853 | */
|
854 | (): JQuery;
|
855 |
|
856 | /**
|
857 | * Get the child row(s) that have been set for a parent row
|
858 | *
|
859 | * @param showRemove This parameter can be given as true or false
|
860 | */
|
861 | (showRemove: boolean): RowChildMethods;
|
862 |
|
863 | /**
|
864 | * Set the data to show in the child row(s). Note that calling this method will replace any child rows which are already attached to the parent row.
|
865 | *
|
866 | * @param data The data to be shown in the child row can be given in multiple different ways.
|
867 | * @param className Class name that is added to the td cell node(s) of the child row(s). As of 1.10.1 it is also added to the tr row node of the child row(s).
|
868 | */
|
869 | (data: (string | Node | JQuery) | Array<(string | number | JQuery)>, className?: string): RowChildMethods;
|
870 |
|
871 | /**
|
872 | * Hide the child row(s) of a parent row
|
873 | */
|
874 | hide(): Api;
|
875 |
|
876 | /**
|
877 | * Check if the child rows of a parent row are visible
|
878 | */
|
879 | isShown(): Api;
|
880 |
|
881 | /**
|
882 | * Remove child row(s) from display and release any allocated memory
|
883 | */
|
884 | remove(): Api;
|
885 |
|
886 | /**
|
887 | * Show the child row(s) of a parent row
|
888 | */
|
889 | show(): Api;
|
890 | }
|
891 |
|
892 | interface RowChildMethods extends CoreMethods {
|
893 | /**
|
894 | * Hide the child row(s) of a parent row
|
895 | */
|
896 | hide(): Api;
|
897 |
|
898 | /**
|
899 | * Remove child row(s) from display and release any allocated memory
|
900 | */
|
901 | remove(): Api;
|
902 |
|
903 | /**
|
904 | * Make newly defined child rows visible
|
905 | */
|
906 | show(): Api;
|
907 | }
|
908 |
|
909 | interface RowMethodsModel {
|
910 | /**
|
911 | * Select a row found by a row selector
|
912 | *
|
913 | * @param rowSelector Row selector. If undefined returns the first row in the DataTable.
|
914 | * @param Option used to specify how the cells should be ordered, and if paging or filtering in the table should be taken into account.
|
915 | */
|
916 | (rowSelector?: any, modifier?: ObjectSelectorModifier): RowMethods;
|
917 |
|
918 | /**
|
919 | * Add a new row to the table using the given data
|
920 | *
|
921 | * @param data Data to use for the new row. This may be an array, object or Javascript object instance, but must be in the same format as the other data in the table
|
922 | */
|
923 | add(data: any[] | object): Api;
|
924 | }
|
925 |
|
926 | interface RowMethods extends CoreMethods, CommonRowMethod {
|
927 | /**
|
928 | * Order Methods / object
|
929 | */
|
930 | child: RowChildMethodModel;
|
931 |
|
932 | /**
|
933 | * Get the data for the selected row
|
934 | */
|
935 | data(): any[] | object;
|
936 |
|
937 | /**
|
938 | * Set the data for the selected row
|
939 | *
|
940 | * @param d Data to use for the row.
|
941 | */
|
942 | data(d: any[] | object): Api;
|
943 |
|
944 | /**
|
945 | * Get the id of the selected row. Since: 1.10.8
|
946 | *
|
947 | * @param hash true - Append a hash (#) to the start of the row id. This can be useful for then using the id as a selector
|
948 | * false - Do not modify the id value.
|
949 | * @returns Row id. If the row does not have an id available 'undefined' will be returned.
|
950 | */
|
951 | id(hash?: boolean): string;
|
952 |
|
953 | /**
|
954 | * Get the row index of the row column.
|
955 | */
|
956 | index(): number;
|
957 |
|
958 | /**
|
959 | * Obtain the tr node for the selected row
|
960 | */
|
961 | node(): Node;
|
962 |
|
963 | /**
|
964 | * Delete the selected row from the DataTable.
|
965 | */
|
966 | remove(): Node;
|
967 |
|
968 | /**
|
969 | * Selects this row.
|
970 | */
|
971 | select(): Api;
|
972 |
|
973 | /**
|
974 | * Deselects this row.
|
975 | */
|
976 | deselect(): Api;
|
977 | }
|
978 |
|
979 | interface RowsMethodsModel {
|
980 | /**
|
981 | * Select all rows
|
982 | *
|
983 | * @param Option used to specify how the cells should be ordered, and if paging or filtering in the table should be taken into account.
|
984 | */
|
985 | (modifier?: ObjectSelectorModifier): RowsMethods;
|
986 |
|
987 | /**
|
988 | * Select rows found by a row selector
|
989 | *
|
990 | * @param cellSelector Row selector. If undefined returns every row in the DataTable.
|
991 | * @param Option used to specify how the cells should be ordered, and if paging or filtering in the table should be taken into account.
|
992 | */
|
993 | (rowSelector?: any, modifier?: ObjectSelectorModifier): RowsMethods;
|
994 |
|
995 | /**
|
996 | * Add new rows to the table using the data given
|
997 | *
|
998 | * @param data Array of data elements, with each one describing a new row to be added to the table
|
999 | */
|
1000 | add(data: any[]): Api;
|
1001 | }
|
1002 |
|
1003 | interface RowsMethods extends CoreMethods, CommonRowMethod {
|
1004 | /**
|
1005 | * Get / Set the data for the selected row
|
1006 | *
|
1007 | * @param d Data to use for the row.
|
1008 | */
|
1009 | data(d?: any[] | object): Api;
|
1010 |
|
1011 | /**
|
1012 | * Iterate over each selected row, with the function context set to be the row in question. Since: DataTables 1.10.6
|
1013 | *
|
1014 | * @param fn Function to execute for every row selected.
|
1015 | */
|
1016 | every(fn: (this: RowMethods, rowIdx: number, tableLoop: number, rowLoop: number) => void): Api;
|
1017 |
|
1018 | /**
|
1019 | * Get the ids of the selected rows. Since: 1.10.8
|
1020 | *
|
1021 | * @param hash true - Append a hash (#) to the start of each row id. This can be useful for then using the ids as selectors
|
1022 | * false - Do not modify the id value.
|
1023 | * @returns Api instance with the selected rows in its result set. If a row does not have an id available 'undefined' will be returned as the value.
|
1024 | */
|
1025 | ids(hash?: boolean): Api;
|
1026 |
|
1027 | /**
|
1028 | * Get the row indexes of the selected rows.
|
1029 | */
|
1030 | indexes(): Api;
|
1031 |
|
1032 | /**
|
1033 | * Obtain the tr nodes for the selected rows
|
1034 | */
|
1035 | nodes(): Api;
|
1036 |
|
1037 | /**
|
1038 | * Delete the selected rows from the DataTable.
|
1039 | */
|
1040 | remove(): Api;
|
1041 |
|
1042 | /**
|
1043 | * Selects the given rows.
|
1044 | */
|
1045 | select(): Api;
|
1046 |
|
1047 | /**
|
1048 | * Deselects the given rows.
|
1049 | */
|
1050 | deselect(): Api;
|
1051 | }
|
1052 | // #endregion "row-methods"
|
1053 |
|
1054 | // #region "table-methods"
|
1055 |
|
1056 | interface TableMethods extends CoreMethods {
|
1057 | /**
|
1058 | * Get the tfoot node for the table in the API's context
|
1059 | */
|
1060 | footer(): Node;
|
1061 |
|
1062 | /**
|
1063 | * Get the thead node for the table in the API's context
|
1064 | */
|
1065 | header(): Node;
|
1066 |
|
1067 | /**
|
1068 | * Get the tbody node for the table in the API's context
|
1069 | */
|
1070 | body(): Node;
|
1071 |
|
1072 | /**
|
1073 | * Get the div container node for the table in the API's context
|
1074 | */
|
1075 | container(): Node;
|
1076 |
|
1077 | /**
|
1078 | * Get the table node for the table in the API's context
|
1079 | */
|
1080 | node(): Node;
|
1081 | }
|
1082 |
|
1083 | interface TablesMethods extends CoreMethods {
|
1084 | /**
|
1085 | * Get the tfoot nodes for the tables in the API's context
|
1086 | */
|
1087 | footer(): Api;
|
1088 |
|
1089 | /**
|
1090 | * Get the thead nodes for the tables in the API's context
|
1091 | */
|
1092 | header(): Api;
|
1093 |
|
1094 | /**
|
1095 | * Get the tbody nodes for the tables in the API's context
|
1096 | */
|
1097 | body(): Api;
|
1098 |
|
1099 | /**
|
1100 | * Get the div container nodes for the tables in the API's context
|
1101 | */
|
1102 | containers(): Api;
|
1103 |
|
1104 | /**
|
1105 | * Get the table nodes for the tables in the API's context
|
1106 | */
|
1107 | nodes(): Api;
|
1108 | }
|
1109 | // #endregion "table-methods"
|
1110 |
|
1111 | // #endregion "Namespaces"
|
1112 |
|
1113 | // #region "Static-Methods"
|
1114 |
|
1115 | interface StaticFunctions {
|
1116 | /**
|
1117 | * Returns JQuery object
|
1118 | *
|
1119 | * Usage:
|
1120 | * $( selector ).dataTable();
|
1121 | */
|
1122 | (): JQueryDataTables;
|
1123 |
|
1124 | /**
|
1125 | * Check if a table node is a DataTable already or not.
|
1126 | *
|
1127 | * Usage:
|
1128 | * $.fn.dataTable.isDataTable("selector");
|
1129 | * @param table The table to check.
|
1130 | */
|
1131 | isDataTable(table: string | Node | JQuery | Api): boolean;
|
1132 |
|
1133 | /**
|
1134 | * Helpers for `columns.render`.
|
1135 | *
|
1136 | * The options defined here can be used with the `columns.render` initialisation
|
1137 | * option to provide a display renderer.
|
1138 | */
|
1139 | render: StaticRenderFunctions;
|
1140 |
|
1141 | /**
|
1142 | * Get all DataTable tables that have been initialised - optionally you can select to get only currently visible tables and / or retrieve the tables as API instances.
|
1143 | *
|
1144 | * @param visible As a boolean value this options is used to indicate if you want all tables on the page should be returned (false), or visible tables only (true).
|
1145 | * Since 1.10.8 this option can also be given as an object.
|
1146 | */
|
1147 | tables(visible?: boolean | objectTablesStatic): Api[] | Api;
|
1148 |
|
1149 | /**
|
1150 | * Version number compatibility check function
|
1151 | *
|
1152 | * Usage:
|
1153 | * $.fn.dataTable.versionCheck("1.10.0");
|
1154 | * @param version Version string
|
1155 | */
|
1156 | versionCheck(version: string): boolean;
|
1157 |
|
1158 | /**
|
1159 | * Utils
|
1160 | */
|
1161 | util: StaticUtilFunctions;
|
1162 |
|
1163 | /**
|
1164 | * Get DataTable API instance
|
1165 | *
|
1166 | * @param table Selector string for table
|
1167 | */
|
1168 | Api: new(selector: string | Node | Node[] | JQuery | SettingsLegacy) => Api;
|
1169 |
|
1170 | |
1171 |
|
1172 |
|
1173 | defaults: Settings;
|
1174 |
|
1175 | |
1176 |
|
1177 |
|
1178 | ext: ExtSettings;
|
1179 | }
|
1180 |
|
1181 | interface ObjectOrderFixed {
|
1182 | |
1183 |
|
1184 |
|
1185 |
|
1186 |
|
1187 | pre?: any[] | undefined;
|
1188 | |
1189 |
|
1190 |
|
1191 |
|
1192 |
|
1193 | post?: any[] | undefined;
|
1194 | }
|
1195 |
|
1196 | interface StaticRenderFunctions {
|
1197 | |
1198 |
|
1199 |
|
1200 |
|
1201 |
|
1202 |
|
1203 |
|
1204 |
|
1205 |
|
1206 | number(
|
1207 | thousands: string,
|
1208 | decimal: string,
|
1209 | precision: number,
|
1210 | prefix?: string,
|
1211 | postfix?: string,
|
1212 | ): ObjectColumnRender;
|
1213 | |
1214 |
|
1215 |
|
1216 | text(): ObjectColumnRender;
|
1217 | }
|
1218 |
|
1219 | interface StaticUtilFunctions {
|
1220 | |
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 | escapeRegex(str: string): string;
|
1226 |
|
1227 | |
1228 |
|
1229 |
|
1230 |
|
1231 |
|
1232 |
|
1233 | throttle(fn: FunctionThrottle, period?: number): () => void;
|
1234 | }
|
1235 |
|
1236 | type FunctionThrottle = (data: any) => void;
|
1237 |
|
1238 | interface objectTablesStatic {
|
1239 | |
1240 |
|
1241 |
|
1242 | visible: boolean;
|
1243 |
|
1244 | |
1245 |
|
1246 |
|
1247 | api: boolean;
|
1248 | }
|
1249 |
|
1250 |
|
1251 |
|
1252 |
|
1253 |
|
1254 | interface Settings {
|
1255 |
|
1256 |
|
1257 | |
1258 |
|
1259 |
|
1260 | autoWidth?: boolean | undefined;
|
1261 |
|
1262 | |
1263 |
|
1264 |
|
1265 | deferRender?: boolean | undefined;
|
1266 |
|
1267 | |
1268 |
|
1269 |
|
1270 | info?: boolean | undefined;
|
1271 |
|
1272 | |
1273 |
|
1274 |
|
1275 | jQueryUI?: boolean | undefined;
|
1276 |
|
1277 | |
1278 |
|
1279 |
|
1280 | lengthChange?: boolean | undefined;
|
1281 |
|
1282 | |
1283 |
|
1284 |
|
1285 | ordering?: boolean | undefined;
|
1286 |
|
1287 | |
1288 |
|
1289 |
|
1290 | paging?: boolean | undefined;
|
1291 |
|
1292 | |
1293 |
|
1294 |
|
1295 | processing?: boolean | undefined;
|
1296 |
|
1297 | |
1298 |
|
1299 |
|
1300 | scrollX?: boolean | undefined;
|
1301 |
|
1302 | |
1303 |
|
1304 |
|
1305 | scrollY?: number | string | undefined;
|
1306 |
|
1307 | |
1308 |
|
1309 |
|
1310 | searching?: boolean | undefined;
|
1311 |
|
1312 | |
1313 |
|
1314 |
|
1315 | serverSide?: boolean | undefined;
|
1316 |
|
1317 | |
1318 |
|
1319 |
|
1320 | stateSave?: boolean | undefined;
|
1321 |
|
1322 |
|
1323 |
|
1324 |
|
1325 |
|
1326 | |
1327 |
|
1328 |
|
1329 | ajax?: string | AjaxSettings | FunctionAjax | undefined;
|
1330 |
|
1331 | |
1332 |
|
1333 |
|
1334 | data?: any[] | undefined;
|
1335 |
|
1336 |
|
1337 |
|
1338 |
|
1339 |
|
1340 | |
1341 |
|
1342 |
|
1343 | columns?: ColumnSettings[] | undefined;
|
1344 |
|
1345 | |
1346 |
|
1347 |
|
1348 | columnDefs?: ColumnDefsSettings[] | undefined;
|
1349 |
|
1350 | |
1351 |
|
1352 |
|
1353 | deferLoading?: number | number[] | undefined;
|
1354 |
|
1355 | |
1356 |
|
1357 |
|
1358 | destroy?: boolean | undefined;
|
1359 |
|
1360 | |
1361 |
|
1362 |
|
1363 | displayStart?: number | undefined;
|
1364 |
|
1365 | |
1366 |
|
1367 |
|
1368 | dom?: string | undefined;
|
1369 |
|
1370 | |
1371 |
|
1372 |
|
1373 | lengthMenu?: Array<(number | string)> | Array<Array<(number | string)>> | undefined;
|
1374 |
|
1375 | |
1376 |
|
1377 |
|
1378 | orderCellsTop?: boolean | undefined;
|
1379 |
|
1380 | |
1381 |
|
1382 |
|
1383 | orderClasses?: boolean | undefined;
|
1384 |
|
1385 | |
1386 |
|
1387 |
|
1388 | order?: Array<(number | string)> | Array<Array<(number | string)>> | undefined;
|
1389 |
|
1390 | |
1391 |
|
1392 |
|
1393 | orderFixed?: Array<(number | string)> | Array<Array<(number | string)>> | object | undefined;
|
1394 |
|
1395 | |
1396 |
|
1397 |
|
1398 | orderMulti?: boolean | undefined;
|
1399 |
|
1400 | |
1401 |
|
1402 |
|
1403 | pageLength?: number | undefined;
|
1404 |
|
1405 | |
1406 |
|
1407 |
|
1408 | pagingType?: string | undefined;
|
1409 |
|
1410 | |
1411 |
|
1412 |
|
1413 | retrieve?: boolean | undefined;
|
1414 |
|
1415 | |
1416 |
|
1417 |
|
1418 | renderer?: string | RendererSettings | undefined;
|
1419 |
|
1420 | |
1421 |
|
1422 |
|
1423 | rowId?: string | ((data: any) => string) | undefined;
|
1424 |
|
1425 | /**
|
1426 | * Allow the table to reduce in height when a limited number of rows are shown. Since: 1.10
|
1427 | */
|
1428 | scrollCollapse?: boolean | undefined;
|
1429 |
|
1430 | /**
|
1431 | * Set an initial filter in DataTables and / or filtering options. Since: 1.10
|
1432 | */
|
1433 | search?: SearchSettings | boolean | undefined;
|
1434 |
|
1435 | /**
|
1436 | * Set placeholder attribute for input type="text" tag elements. Since: 1.10
|
1437 | */
|
1438 | searchPlaceholder?: SearchSettings | undefined;
|
1439 |
|
1440 | /**
|
1441 | * Define an initial search for individual columns. Since: 1.10
|
1442 | */
|
1443 | searchCols?: SearchSettings[] | undefined;
|
1444 |
|
1445 | /**
|
1446 | * Set a throttle frequency for searching. Since: 1.10
|
1447 | */
|
1448 | searchDelay?: number | undefined;
|
1449 |
|
1450 | /**
|
1451 | * Saved state validity duration. Since: 1.10
|
1452 | */
|
1453 | stateDuration?: number | undefined;
|
1454 |
|
1455 | /**
|
1456 | * Set the zebra stripe class names for the rows in the table. Since: 1.10
|
1457 | */
|
1458 | stripeClasses?: string[] | undefined;
|
1459 |
|
1460 | /**
|
1461 | * Tab index control for keyboard navigation. Since: 1.10
|
1462 | */
|
1463 | tabIndex?: number | undefined;
|
1464 |
|
1465 | /**
|
1466 | * Enable or disable datatables responsive. Since: 1.10
|
1467 | */
|
1468 | responsive?: boolean | object | undefined;
|
1469 |
|
1470 | // #endregion "Options"
|
1471 |
|
1472 | // #region "Callbacks"
|
1473 |
|
1474 | /**
|
1475 | * Callback for whenever a TR element is created for the table's body. Since: 1.10
|
1476 | */
|
1477 | createdRow?: FunctionCreateRow | undefined;
|
1478 |
|
1479 | /**
|
1480 | * Function that is called every time DataTables performs a draw. Since: 1.10
|
1481 | */
|
1482 | drawCallback?: FunctionDrawCallback | undefined;
|
1483 |
|
1484 | /**
|
1485 | * Footer display callback function. Since: 1.10
|
1486 | */
|
1487 | footerCallback?: FunctionFooterCallback | undefined;
|
1488 |
|
1489 | /**
|
1490 | * Number formatting callback function. Since: 1.10
|
1491 | */
|
1492 | formatNumber?: FunctionFormatNumber | undefined;
|
1493 |
|
1494 | /**
|
1495 | * Header display callback function. Since: 1.10
|
1496 | */
|
1497 | headerCallback?: FunctionHeaderCallback | undefined;
|
1498 |
|
1499 | /**
|
1500 | * Table summary information display callback. Since: 1.10
|
1501 | */
|
1502 | infoCallback?: FunctionInfoCallback | undefined;
|
1503 |
|
1504 | /**
|
1505 | * Initialisation complete callback. Since: 1.10
|
1506 | */
|
1507 | initComplete?: FunctionInitComplete | undefined;
|
1508 |
|
1509 | /**
|
1510 | * Pre-draw callback. Since: 1.10
|
1511 | */
|
1512 | preDrawCallback?: FunctionPreDrawCallback | undefined;
|
1513 |
|
1514 | /**
|
1515 | * Row draw callback.. Since: 1.10
|
1516 | */
|
1517 | rowCallback?: FunctionRowCallback | undefined;
|
1518 |
|
1519 | /**
|
1520 | * Callback that defines where and how a saved state should be loaded. Since: 1.10
|
1521 | */
|
1522 | stateLoadCallback?: FunctionStateLoadCallback | undefined;
|
1523 |
|
1524 | /**
|
1525 | * State loaded callback. Since: 1.10
|
1526 | */
|
1527 | stateLoaded?: FunctionStateLoaded | undefined;
|
1528 |
|
1529 | /**
|
1530 | * State loaded - data manipulation callback. Since: 1.10
|
1531 | */
|
1532 | stateLoadParams?: FunctionStateLoadParams | undefined;
|
1533 |
|
1534 | /**
|
1535 | * Callback that defines how the table state is stored and where. Since: 1.10
|
1536 | */
|
1537 | stateSaveCallback?: FunctionStateSaveCallback | undefined;
|
1538 |
|
1539 | /**
|
1540 | * State save - data manipulation callback. Since: 1.10
|
1541 | */
|
1542 | stateSaveParams?: FunctionStateSaveParams | undefined;
|
1543 |
|
1544 | // #endregion "Callbacks"
|
1545 |
|
1546 | // #region "Language"
|
1547 |
|
1548 | language?: LanguageSettings | undefined;
|
1549 |
|
1550 | // #endregion "Language"
|
1551 | }
|
1552 |
|
1553 | // #region "ajax-settings"
|
1554 |
|
1555 | interface AjaxDataRequest {
|
1556 | draw: number;
|
1557 | start: number;
|
1558 | length: number;
|
1559 | data: any;
|
1560 | order: AjaxDataRequestOrder[];
|
1561 | columns: AjaxDataRequestColumn[];
|
1562 | search: AjaxDataRequestSearch;
|
1563 | }
|
1564 |
|
1565 | interface AjaxDataRequestSearch {
|
1566 | value: string;
|
1567 | regex: boolean;
|
1568 | }
|
1569 |
|
1570 | interface AjaxDataRequestOrder {
|
1571 | column: number;
|
1572 | dir: string;
|
1573 | }
|
1574 |
|
1575 | interface AjaxDataRequestColumn {
|
1576 | data: string | number;
|
1577 | name: string;
|
1578 | searchable: boolean;
|
1579 | orderable: boolean;
|
1580 | search: AjaxDataRequestSearch;
|
1581 | }
|
1582 |
|
1583 | interface AjaxData {
|
1584 | draw?: number | undefined;
|
1585 | recordsTotal?: number | undefined;
|
1586 | recordsFiltered?: number | undefined;
|
1587 | data: any;
|
1588 | error?: string | undefined;
|
1589 | }
|
1590 |
|
1591 | interface AjaxSettings extends JQueryAjaxSettings {
|
1592 | /**
|
1593 | * Add or modify data submitted to the server upon an Ajax request. Since: 1.10
|
1594 | */
|
1595 | data?: object | FunctionAjaxData | undefined;
|
1596 |
|
1597 | /**
|
1598 | * Data property or manipulation method for table data. Since: 1.10
|
1599 | */
|
1600 | dataSrc?: string | ((data: any) => any[]) | undefined;
|
1601 | }
|
1602 |
|
1603 | type FunctionAjax = (data: object, callback: (data: any) => void, settings: SettingsLegacy) => void;
|
1604 |
|
1605 | type FunctionAjaxData = (data: object, settings: Settings) => string | object;
|
1606 |
|
1607 |
|
1608 |
|
1609 |
|
1610 |
|
1611 | interface ColumnSettings {
|
1612 | |
1613 |
|
1614 |
|
1615 | cellType?: string | undefined;
|
1616 |
|
1617 | |
1618 |
|
1619 |
|
1620 | className?: string | undefined;
|
1621 |
|
1622 | |
1623 |
|
1624 |
|
1625 | contentPadding?: string | undefined;
|
1626 |
|
1627 | |
1628 |
|
1629 |
|
1630 | createdCell?: FunctionColumnCreatedCell | undefined;
|
1631 |
|
1632 | |
1633 |
|
1634 |
|
1635 | data?: number | string | ObjectColumnData | FunctionColumnData | null | undefined;
|
1636 |
|
1637 | |
1638 |
|
1639 |
|
1640 | defaultContent?: string | undefined;
|
1641 |
|
1642 | |
1643 |
|
1644 |
|
1645 | name?: string | undefined;
|
1646 |
|
1647 | |
1648 |
|
1649 |
|
1650 | orderable?: boolean | undefined;
|
1651 |
|
1652 | |
1653 |
|
1654 |
|
1655 | orderData?: number | number[] | undefined;
|
1656 |
|
1657 | |
1658 |
|
1659 |
|
1660 | orderDataType?: string | undefined;
|
1661 |
|
1662 | |
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 |
|
1668 |
|
1669 | orderFixed?: any[] | ObjectOrderFixed | undefined;
|
1670 |
|
1671 | |
1672 |
|
1673 |
|
1674 | orderSequence?: string[] | undefined;
|
1675 |
|
1676 | |
1677 |
|
1678 |
|
1679 | render?: number | string | ObjectColumnData | FunctionColumnRender | ObjectColumnRender | undefined;
|
1680 |
|
1681 | |
1682 |
|
1683 |
|
1684 | searchable?: boolean | undefined;
|
1685 |
|
1686 | |
1687 |
|
1688 |
|
1689 | title?: string | undefined;
|
1690 |
|
1691 | |
1692 |
|
1693 |
|
1694 | type?: string | undefined;
|
1695 |
|
1696 | |
1697 |
|
1698 |
|
1699 | visible?: boolean | undefined;
|
1700 |
|
1701 | |
1702 |
|
1703 |
|
1704 | width?: string | undefined;
|
1705 | }
|
1706 |
|
1707 | interface ColumnDefsSettings extends ColumnSettings {
|
1708 | targets: string | number | Array<(number | string)>;
|
1709 | }
|
1710 |
|
1711 | type FunctionColumnCreatedCell = (cell: Node, cellData: any, rowData: any, row: number, col: number) => void;
|
1712 |
|
1713 | interface FunctionColumnData {
|
1714 | (row: any, t: "set", s: any, meta: CellMetaSettings): void;
|
1715 | (row: any, t: "display" | "sort" | "filter" | "type", s: undefined, meta: CellMetaSettings): any;
|
1716 | }
|
1717 |
|
1718 | interface ObjectColumnData {
|
1719 | _: string | number | FunctionColumnData;
|
1720 | filter?: string | number | FunctionColumnData | undefined;
|
1721 | display?: string | number | FunctionColumnData | undefined;
|
1722 | type?: string | number | FunctionColumnData | undefined;
|
1723 | sort?: string | number | FunctionColumnData | undefined;
|
1724 | }
|
1725 |
|
1726 | type FunctionColumnRender = (data: any, type: any, row: any, meta: CellMetaSettings) => any;
|
1727 |
|
1728 | interface ObjectColumnRender {
|
1729 | _?: string | number | FunctionColumnRender | undefined;
|
1730 | filter?: string | number | FunctionColumnRender | undefined;
|
1731 | display?: string | number | FunctionColumnRender | undefined;
|
1732 | type?: string | number | FunctionColumnRender | undefined;
|
1733 | sort?: string | number | FunctionColumnRender | undefined;
|
1734 | }
|
1735 |
|
1736 | interface CellMetaSettings {
|
1737 | row: number;
|
1738 | col: number;
|
1739 | settings: Settings;
|
1740 | }
|
1741 |
|
1742 |
|
1743 |
|
1744 |
|
1745 |
|
1746 | interface RendererSettings {
|
1747 | header?: string | undefined;
|
1748 | pageButton?: string | undefined;
|
1749 | }
|
1750 |
|
1751 | interface SearchSettings {
|
1752 | |
1753 |
|
1754 |
|
1755 | caseInsensitive?: boolean | undefined;
|
1756 |
|
1757 | |
1758 |
|
1759 |
|
1760 | regex?: boolean | undefined;
|
1761 |
|
1762 | |
1763 |
|
1764 |
|
1765 | smart?: boolean | undefined;
|
1766 |
|
1767 | |
1768 |
|
1769 |
|
1770 | search?: string | undefined;
|
1771 |
|
1772 | |
1773 |
|
1774 |
|
1775 | searchPlaceholder?: string | undefined;
|
1776 | }
|
1777 |
|
1778 |
|
1779 |
|
1780 |
|
1781 |
|
1782 | type FunctionCreateRow = (row: Node, data: any[] | object, dataIndex: number, cells: Node[]) => void;
|
1783 |
|
1784 | type FunctionDrawCallback = (settings: SettingsLegacy) => void;
|
1785 |
|
1786 | type FunctionFooterCallback = (tfoot: Node, data: any[], start: number, end: number, display: any[]) => void;
|
1787 |
|
1788 | type FunctionFormatNumber = (formatNumber: number) => void;
|
1789 |
|
1790 | type FunctionHeaderCallback = (thead: Node, data: any[], start: number, end: number, display: any[]) => void;
|
1791 |
|
1792 | type FunctionInfoCallback = (
|
1793 | settings: SettingsLegacy,
|
1794 | start: number,
|
1795 | end: number,
|
1796 | mnax: number,
|
1797 | total: number,
|
1798 | pre: string,
|
1799 | ) => void;
|
1800 |
|
1801 | type FunctionInitComplete = (settings: SettingsLegacy, json: object) => void;
|
1802 |
|
1803 | type FunctionPreDrawCallback = (settings: SettingsLegacy) => void;
|
1804 |
|
1805 | type FunctionRowCallback = (row: Node, data: any[] | object, index: number) => void;
|
1806 |
|
1807 | type FunctionStateLoadCallback = (settings: SettingsLegacy) => void;
|
1808 |
|
1809 | type FunctionStateLoaded = (settings: SettingsLegacy, data: object) => void;
|
1810 |
|
1811 | type FunctionStateLoadParams = (settings: SettingsLegacy, data: object) => void;
|
1812 |
|
1813 | type FunctionStateSaveCallback = (settings: SettingsLegacy, data: object) => void;
|
1814 |
|
1815 | type FunctionStateSaveParams = (settings: SettingsLegacy, data: object) => void;
|
1816 |
|
1817 |
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 | interface LanguageSettings {
|
1823 | emptyTable?: string | undefined;
|
1824 | info?: string | undefined;
|
1825 | infoEmpty?: string | undefined;
|
1826 | infoFiltered?: string | undefined;
|
1827 | infoPostFix?: string | undefined;
|
1828 | decimal?: string | undefined;
|
1829 | thousands?: string | undefined;
|
1830 | lengthMenu?: string | undefined;
|
1831 | loadingRecords?: string | undefined;
|
1832 | processing?: string | undefined;
|
1833 | search?: string | undefined;
|
1834 | searchPlaceholder?: string | undefined;
|
1835 | zeroRecords?: string | undefined;
|
1836 | paginate?: LanguagePaginateSettings | undefined;
|
1837 | aria?: LanguageAriaSettings | undefined;
|
1838 | url?: string | undefined;
|
1839 | }
|
1840 |
|
1841 | interface LanguagePaginateSettings {
|
1842 | first: string;
|
1843 | last: string;
|
1844 | next: string;
|
1845 | previous: string;
|
1846 | }
|
1847 |
|
1848 | interface LanguageAriaSettings {
|
1849 | sortAscending: string;
|
1850 | sortDescending: string;
|
1851 | paginate?: LanguagePaginateSettings | undefined;
|
1852 | }
|
1853 |
|
1854 |
|
1855 |
|
1856 |
|
1857 |
|
1858 |
|
1859 |
|
1860 | interface ArrayStringNode {
|
1861 | [index: string]: Node;
|
1862 | }
|
1863 |
|
1864 | interface SettingsLegacy {
|
1865 | ajax: any;
|
1866 | oApi: any;
|
1867 | oFeatures: FeaturesLegacy;
|
1868 | oScroll: ScrollingLegacy;
|
1869 | oLanguage: LanguageLegacy;
|
1870 | oBrowser: BrowserLegacy;
|
1871 | aanFeatures: ArrayStringNode[][];
|
1872 | aoData: RowLegacy[];
|
1873 | aIds: any;
|
1874 | aiDisplay: number[];
|
1875 | aiDisplayMaster: number[];
|
1876 | aoColumns: ColumnLegacy[];
|
1877 | aoHeader: any[];
|
1878 | aoFooter: any[];
|
1879 | asDataSearch: string[];
|
1880 | oPreviousSearch: any;
|
1881 | aoPreSearchCols: any[];
|
1882 | aaSorting: any[][];
|
1883 | aaSortingFixed: any[][];
|
1884 | asStripeClasses: string[];
|
1885 | asDestroyStripes: string[];
|
1886 | sDestroyWidth: number;
|
1887 | aoRowCallback: FunctionRowCallback[];
|
1888 | aoHeaderCallback: FunctionHeaderCallback[];
|
1889 | aoFooterCallback: FunctionFooterCallback[];
|
1890 | aoDrawCallback: FunctionDrawCallback[];
|
1891 | aoRowCreatedCallback: FunctionCreateRow[];
|
1892 | aoPreDrawCallback: FunctionPreDrawCallback[];
|
1893 | aoInitComplete: FunctionInitComplete[];
|
1894 | aoStateSaveParams: FunctionStateSaveParams[];
|
1895 | aoStateLoadParams: FunctionStateLoadParams[];
|
1896 | aoStateLoaded: FunctionStateLoaded[];
|
1897 | sTableId: string;
|
1898 | nTable: Node;
|
1899 | nTHead: Node;
|
1900 | nTFoot: Node;
|
1901 | nTBody: Node;
|
1902 | nTableWrapper: Node;
|
1903 | bDeferLoading: boolean;
|
1904 | bInitialized: boolean;
|
1905 | aoOpenRows: any[];
|
1906 | sDom: string;
|
1907 | sPaginationType: string;
|
1908 | iCookieDuration: number;
|
1909 | sCookiePrefix: string;
|
1910 | fnCookieCallback: CookieCallbackLegacy;
|
1911 | aoStateSave: FunctionStateSaveCallback[];
|
1912 | aoStateLoad: FunctionStateLoadCallback[];
|
1913 | oLoadedState: any;
|
1914 | sAjaxSource: string;
|
1915 | sAjaxDataProp: string;
|
1916 | bAjaxDataGet: boolean;
|
1917 | jqXHR: any;
|
1918 | fnServerData: any;
|
1919 | aoServerParams: any[];
|
1920 | sServerMethod: string;
|
1921 | fnFormatNumber: FunctionFormatNumber;
|
1922 | aLengthMenu: any[];
|
1923 | iDraw: number;
|
1924 | bDrawing: boolean;
|
1925 | iDrawError: number;
|
1926 | _iDisplayLength: number;
|
1927 | _iDisplayStart: number;
|
1928 | _iDisplayEnd: number;
|
1929 | _iRecordsTotal: number;
|
1930 | _iRecordsDisplay: number;
|
1931 | bJUI: boolean;
|
1932 | oClasses: any;
|
1933 | bFiltered: boolean;
|
1934 | bSorted: boolean;
|
1935 | bSortCellsTop: boolean;
|
1936 | oInit: any;
|
1937 | aoDestroyCallback: any[];
|
1938 | fnRecordsTotal(): number;
|
1939 | fnRecordsDisplay(): number;
|
1940 | fnDisplayEnd(): number;
|
1941 | oInstance: any;
|
1942 | sInstance: string;
|
1943 | iTabIndex: number;
|
1944 | nScrollHead: Node;
|
1945 | nScrollFoot: Node;
|
1946 | rowIdFn(mSource: string | number | (() => void)): () => void;
|
1947 | }
|
1948 |
|
1949 | interface BrowserLegacy {
|
1950 | barWidth: number;
|
1951 | bBounding: boolean;
|
1952 | bScrollbarLeft: boolean;
|
1953 | bScrollOversize: boolean;
|
1954 | }
|
1955 |
|
1956 | interface FeaturesLegacy {
|
1957 | bAutoWidth: boolean;
|
1958 | bDeferRender: boolean;
|
1959 | bFilter: boolean;
|
1960 | bInfo: boolean;
|
1961 | bLengthChange: boolean;
|
1962 | bPaginate: boolean;
|
1963 | bProcessing: boolean;
|
1964 | bServerSide: boolean;
|
1965 | bSort: boolean;
|
1966 | bSortClasses: boolean;
|
1967 | bStateSave: boolean;
|
1968 | }
|
1969 |
|
1970 | interface ScrollingLegacy {
|
1971 | bAutoCss: boolean;
|
1972 | bCollapse: boolean;
|
1973 | bInfinite: boolean;
|
1974 | iBarWidth: number;
|
1975 | iLoadGap: number;
|
1976 | sX: string;
|
1977 | sY: string;
|
1978 | }
|
1979 |
|
1980 | interface RowLegacy {
|
1981 | nTr: Node;
|
1982 | _aData: any;
|
1983 | _aSortData: any[];
|
1984 | _anHidden: Node[];
|
1985 | _sRowStripe: string;
|
1986 | }
|
1987 |
|
1988 | interface ColumnLegacy {
|
1989 | idx: number;
|
1990 | aDataSort: any;
|
1991 | asSorting: string[];
|
1992 | bSearchable: boolean;
|
1993 | bSortable: boolean;
|
1994 | bVisible: boolean;
|
1995 | _bAutoType: boolean;
|
1996 | fnCreatedCell: FunctionColumnCreatedCell;
|
1997 | fnGetData(data: any, specific: string): any;
|
1998 | fnSetData(data: any, value: any): void;
|
1999 | mData: any;
|
2000 | mRender: any;
|
2001 | nTh: Node;
|
2002 | nIf: Node;
|
2003 | sClass: string;
|
2004 | sContentPadding: string;
|
2005 | sDefaultContent: string;
|
2006 | sName: string;
|
2007 | sSortDataType: string;
|
2008 | sSortingClass: string;
|
2009 | sSortingClassJUI: string;
|
2010 | sTitle: string;
|
2011 | sType: string;
|
2012 | sWidth: string;
|
2013 | sWidthOrig: string;
|
2014 | }
|
2015 |
|
2016 | type CookieCallbackLegacy = (name: string, data: any, expires: string, path: string, cookie: string) => void;
|
2017 |
|
2018 | interface LanguageLegacy {
|
2019 | oAria?: LanguageAriaLegacy | undefined;
|
2020 | oPaginate?: LanguagePaginateLegacy | undefined;
|
2021 | sEmptyTable?: string | undefined;
|
2022 | sInfo?: string | undefined;
|
2023 | sInfoEmpty?: string | undefined;
|
2024 | sInfoFiltered?: string | undefined;
|
2025 | sInfoPostFix?: string | undefined;
|
2026 | sInfoThousands?: string | undefined;
|
2027 | sLengthMenu?: string | undefined;
|
2028 | sLoadingRecords?: string | undefined;
|
2029 | sProcessing?: string | undefined;
|
2030 | sSearch?: string | undefined;
|
2031 | sUrl?: string | undefined;
|
2032 | sZeroRecords?: string | undefined;
|
2033 | }
|
2034 |
|
2035 | interface LanguageAriaLegacy {
|
2036 | sSortAscending?: string | undefined;
|
2037 | sSortDescending?: string | undefined;
|
2038 | }
|
2039 |
|
2040 | interface LanguagePaginateLegacy {
|
2041 | sFirst?: string | undefined;
|
2042 | sLast?: string | undefined;
|
2043 | sNext?: string | undefined;
|
2044 | sPrevious?: string | undefined;
|
2045 | }
|
2046 |
|
2047 |
|
2048 |
|
2049 |
|
2050 | interface ExtSettings {
|
2051 | aTypes: any[];
|
2052 | afnFiltering: any[];
|
2053 | afnSortData: object;
|
2054 | aoFeatures: any[];
|
2055 | builder: string;
|
2056 | classes: ExtClassesSettings;
|
2057 | errMode: string;
|
2058 | feature: any[];
|
2059 | fnVersionCheck(version: string): string;
|
2060 | iApiIndex: number;
|
2061 | internal: object;
|
2062 | legacy: object;
|
2063 | oApi: object;
|
2064 | oJUIClasses: object;
|
2065 | oPagination: object;
|
2066 | oSort: object;
|
2067 | oStdClasses: ExtClassesSettings;
|
2068 | ofnSearch: object;
|
2069 | order: object;
|
2070 | pager: object;
|
2071 | renderer: object;
|
2072 | sVersion: string;
|
2073 | search: any[];
|
2074 | selector: object;
|
2075 | |
2076 |
|
2077 |
|
2078 | type: ExtTypeSettings;
|
2079 | }
|
2080 |
|
2081 | interface ExtClassesSettings {
|
2082 | |
2083 |
|
2084 |
|
2085 |
|
2086 | sTable?: string | undefined;
|
2087 |
|
2088 | |
2089 |
|
2090 |
|
2091 |
|
2092 | sNoFooter?: string | undefined;
|
2093 |
|
2094 | |
2095 |
|
2096 |
|
2097 |
|
2098 | sPageButton?: string | undefined;
|
2099 |
|
2100 | |
2101 |
|
2102 |
|
2103 |
|
2104 | sPageButtonActive?: string | undefined;
|
2105 |
|
2106 | |
2107 |
|
2108 |
|
2109 |
|
2110 | sPageButtonDisabled?: string | undefined;
|
2111 |
|
2112 | |
2113 |
|
2114 |
|
2115 |
|
2116 | sStripeOdd?: string | undefined;
|
2117 |
|
2118 | |
2119 |
|
2120 |
|
2121 |
|
2122 | sStripeEven?: string | undefined;
|
2123 |
|
2124 | |
2125 |
|
2126 |
|
2127 |
|
2128 | sRowEmpty?: string | undefined;
|
2129 |
|
2130 | |
2131 |
|
2132 |
|
2133 |
|
2134 | sWrapper?: string | undefined;
|
2135 |
|
2136 | |
2137 |
|
2138 |
|
2139 |
|
2140 | sFilter?: string | undefined;
|
2141 |
|
2142 | |
2143 |
|
2144 |
|
2145 |
|
2146 | sInfo?: string | undefined;
|
2147 |
|
2148 | |
2149 |
|
2150 |
|
2151 |
|
2152 | sPaging?: string | undefined;
|
2153 |
|
2154 | |
2155 |
|
2156 |
|
2157 |
|
2158 | sLength?: string | undefined;
|
2159 |
|
2160 | |
2161 |
|
2162 |
|
2163 |
|
2164 | sProcessing?: string | undefined;
|
2165 |
|
2166 | |
2167 |
|
2168 |
|
2169 |
|
2170 | sSortAsc?: string | undefined;
|
2171 |
|
2172 | |
2173 |
|
2174 |
|
2175 |
|
2176 | sSortDesc?: string | undefined;
|
2177 |
|
2178 | |
2179 |
|
2180 |
|
2181 |
|
2182 | sSortable?: string | undefined;
|
2183 |
|
2184 | |
2185 |
|
2186 |
|
2187 |
|
2188 | sSortableAsc?: string | undefined;
|
2189 |
|
2190 | |
2191 |
|
2192 |
|
2193 |
|
2194 | sSortableDesc?: string | undefined;
|
2195 |
|
2196 | |
2197 |
|
2198 |
|
2199 |
|
2200 | sSortableNone?: string | undefined;
|
2201 |
|
2202 | |
2203 |
|
2204 |
|
2205 |
|
2206 | sSortColumn?: string | undefined;
|
2207 |
|
2208 | sFilterInput?: string | undefined;
|
2209 | sLengthSelect?: string | undefined;
|
2210 |
|
2211 | |
2212 |
|
2213 |
|
2214 |
|
2215 | sScrollWrapper?: string | undefined;
|
2216 |
|
2217 | |
2218 |
|
2219 |
|
2220 |
|
2221 | sScrollHead?: string | undefined;
|
2222 |
|
2223 | |
2224 |
|
2225 |
|
2226 |
|
2227 | sScrollHeadInner?: string | undefined;
|
2228 |
|
2229 | |
2230 |
|
2231 |
|
2232 |
|
2233 | sScrollBody?: string | undefined;
|
2234 |
|
2235 | |
2236 |
|
2237 |
|
2238 |
|
2239 | sScrollFoot?: string | undefined;
|
2240 |
|
2241 | |
2242 |
|
2243 |
|
2244 |
|
2245 | sScrollFootInner?: string | undefined;
|
2246 |
|
2247 | sHeaderTH?: string | undefined;
|
2248 | sFooterTH?: string | undefined;
|
2249 | sSortJUIAsc?: string | undefined;
|
2250 | sSortJUIDesc?: string | undefined;
|
2251 | sSortJUI?: string | undefined;
|
2252 | sSortJUIAscAllowed?: string | undefined;
|
2253 | sSortJUIDescAllowed?: string | undefined;
|
2254 | sSortJUIWrapper?: string | undefined;
|
2255 | sSortIcon?: string | undefined;
|
2256 | sJUIHeader?: string | undefined;
|
2257 | sJUIFooter?: string | undefined;
|
2258 | }
|
2259 |
|
2260 |
|
2261 | interface ExtTypeSettings {
|
2262 | |
2263 |
|
2264 |
|
2265 |
|
2266 |
|
2267 | detect: FunctionExtTypeSettingsDetect[];
|
2268 | |
2269 |
|
2270 |
|
2271 |
|
2272 |
|
2273 |
|
2274 | order: object;
|
2275 | |
2276 |
|
2277 |
|
2278 |
|
2279 |
|
2280 |
|
2281 |
|
2282 |
|
2283 |
|
2284 | search: object;
|
2285 | }
|
2286 |
|
2287 | |
2288 |
|
2289 |
|
2290 |
|
2291 | type FunctionExtTypeSettingsDetect = (data: any, settings: Settings) => string | null;
|
2292 | }
|