cats-data-grid 2.0.34 → 2.0.36
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/fesm2022/cats-data-grid.mjs +144 -126
- package/fesm2022/cats-data-grid.mjs.map +1 -1
- package/index.d.ts +27 -13
- package/package.json +1 -1
- package/lib/cats-data-grid.component.d.ts +0 -148
- package/lib/directives/outside-click.directive.d.ts +0 -10
- package/lib/directives/renderer-parser.directive.d.ts +0 -15
- package/lib/pipes/add-class.pipe.d.ts +0 -7
- package/lib/services/cats-data-grid.service.d.ts +0 -6
- package/public-api.d.ts +0 -2
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnChanges, OnInit, EventEmitter,
|
|
2
|
+
import { OnChanges, OnInit, EventEmitter, Renderer2, NgZone, ChangeDetectorRef, SimpleChanges } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
declare class CatsDataGridService {
|
|
5
5
|
constructor();
|
|
@@ -21,9 +21,19 @@ declare class ColDefs {
|
|
|
21
21
|
filterable: boolean;
|
|
22
22
|
cellRenderer: any;
|
|
23
23
|
}
|
|
24
|
+
interface ColumnFilter {
|
|
25
|
+
fieldName: string;
|
|
26
|
+
filterLogic: string;
|
|
27
|
+
filters: FilterCondition[];
|
|
28
|
+
}
|
|
29
|
+
interface FilterCondition {
|
|
30
|
+
filterOperation: string;
|
|
31
|
+
filterValue: any;
|
|
32
|
+
}
|
|
24
33
|
declare class CatsDataGridComponent implements OnChanges, OnInit {
|
|
25
|
-
private
|
|
34
|
+
private renderer;
|
|
26
35
|
private zone;
|
|
36
|
+
private cd;
|
|
27
37
|
tableOptions: any;
|
|
28
38
|
totalRecords: number;
|
|
29
39
|
sortingRequired: boolean;
|
|
@@ -54,6 +64,7 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
|
|
|
54
64
|
dragOverIndex: null | number;
|
|
55
65
|
draggedIndex: null | number;
|
|
56
66
|
originalColDefs: any[];
|
|
67
|
+
filteredRowData: any[];
|
|
57
68
|
filteredData: any[];
|
|
58
69
|
currentColumn: any;
|
|
59
70
|
currentIndex: number;
|
|
@@ -81,7 +92,14 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
|
|
|
81
92
|
}[];
|
|
82
93
|
showPin: boolean;
|
|
83
94
|
pinActionClicked: any;
|
|
84
|
-
|
|
95
|
+
private removeMouseMove;
|
|
96
|
+
private removeMouseUp;
|
|
97
|
+
private rafId;
|
|
98
|
+
appliedFilters: ColumnFilter[];
|
|
99
|
+
appliedFiltersEvent: EventEmitter<ColumnFilter[]>;
|
|
100
|
+
activeGroupsEvent: EventEmitter<any[]>;
|
|
101
|
+
dynamicGroupingFiltering: boolean;
|
|
102
|
+
constructor(renderer: Renderer2, zone: NgZone, cd: ChangeDetectorRef);
|
|
85
103
|
ngOnInit(): void;
|
|
86
104
|
ngOnChanges(changes: SimpleChanges): void;
|
|
87
105
|
/**
|
|
@@ -112,13 +130,14 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
|
|
|
112
130
|
*/
|
|
113
131
|
evaluateNumDateFilterCondition(type: string, fieldValue: number | string, value: number | string): boolean;
|
|
114
132
|
/**
|
|
115
|
-
* @description Method to filter data according to
|
|
133
|
+
* @description Method to filter data according to filterOperation and comparator selection
|
|
116
134
|
* @author Anand Pandey
|
|
117
135
|
* @param {}
|
|
118
136
|
* @returns void
|
|
119
137
|
*/
|
|
120
138
|
applyAllFilters(): void;
|
|
121
139
|
resetFilter(col: any): void;
|
|
140
|
+
removeActiveFilter(col: any): void;
|
|
122
141
|
/**
|
|
123
142
|
* @description Method to change the data format to utc
|
|
124
143
|
* @author Anand Pandey
|
|
@@ -196,12 +215,6 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
|
|
|
196
215
|
* @returns {void}
|
|
197
216
|
*/
|
|
198
217
|
startResize(event: MouseEvent, index: number): void;
|
|
199
|
-
/**
|
|
200
|
-
* @description Handles column resizing as the mouse moves.
|
|
201
|
-
* @author Anand Pandey
|
|
202
|
-
* @param {MouseEvent} event - Mouse movement event during resizing.
|
|
203
|
-
* @returns {void}
|
|
204
|
-
*/
|
|
205
218
|
/**
|
|
206
219
|
* @description Handles column resizing as the mouse moves.
|
|
207
220
|
* @author Anand Pandey
|
|
@@ -263,7 +276,7 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
|
|
|
263
276
|
* @param none
|
|
264
277
|
* @returns void
|
|
265
278
|
*/
|
|
266
|
-
|
|
279
|
+
resetPagination(): void;
|
|
267
280
|
/**
|
|
268
281
|
* @description method to set total pages count
|
|
269
282
|
* @author Tarun Kumar
|
|
@@ -332,7 +345,6 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
|
|
|
332
345
|
*/
|
|
333
346
|
getStyle(col: any, type?: string): object;
|
|
334
347
|
onClickOutside(): void;
|
|
335
|
-
checkCondition(data: any): boolean;
|
|
336
348
|
infinityScroll(event: any): void;
|
|
337
349
|
checkAllSelected(): boolean;
|
|
338
350
|
checkInterminate(): boolean;
|
|
@@ -429,8 +441,9 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
|
|
|
429
441
|
enableColumnDrag(event: MouseEvent, index: number): void;
|
|
430
442
|
disableColumnDrag(event: MouseEvent, index: number): void;
|
|
431
443
|
dateTimeSelected(date: any): void;
|
|
444
|
+
convertToNumber(value: number | string): number;
|
|
432
445
|
static ɵfac: i0.ɵɵFactoryDeclaration<CatsDataGridComponent, never>;
|
|
433
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CatsDataGridComponent, "cats-data-grid", never, { "tableOptions": { "alias": "tableOptions"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "sortingRequired": { "alias": "sortingRequired"; "required": false; }; "checkBoxSelection": { "alias": "checkBoxSelection"; "required": false; }; "checkboxSelectionType": { "alias": "checkboxSelectionType"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "colDefs": { "alias": "colDefs"; "required": false; }; "paginationRequired": { "alias": "paginationRequired"; "required": false; }; "selectedRowEmpty": { "alias": "selectedRowEmpty"; "required": false; }; "filterRequired": { "alias": "filterRequired"; "required": false; }; "threeDotsMenuRequired": { "alias": "threeDotsMenuRequired"; "required": false; }; "height": { "alias": "height"; "required": false; }; "groupByRequired": { "alias": "groupByRequired"; "required": false; }; "pageSizeList": { "alias": "pageSizeList"; "required": false; }; }, { "onPaginationChange": "onPaginationChange"; "onCheckboxSelection": "onCheckboxSelection"; "onScrollEmitter": "onScrollEmitter"; "filter": "filter"; }, never, never, true, never>;
|
|
446
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CatsDataGridComponent, "cats-data-grid", never, { "tableOptions": { "alias": "tableOptions"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "sortingRequired": { "alias": "sortingRequired"; "required": false; }; "checkBoxSelection": { "alias": "checkBoxSelection"; "required": false; }; "checkboxSelectionType": { "alias": "checkboxSelectionType"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "colDefs": { "alias": "colDefs"; "required": false; }; "paginationRequired": { "alias": "paginationRequired"; "required": false; }; "selectedRowEmpty": { "alias": "selectedRowEmpty"; "required": false; }; "filterRequired": { "alias": "filterRequired"; "required": false; }; "threeDotsMenuRequired": { "alias": "threeDotsMenuRequired"; "required": false; }; "height": { "alias": "height"; "required": false; }; "groupByRequired": { "alias": "groupByRequired"; "required": false; }; "pageSizeList": { "alias": "pageSizeList"; "required": false; }; "dynamicGroupingFiltering": { "alias": "dynamicGroupingFiltering"; "required": false; }; }, { "onPaginationChange": "onPaginationChange"; "onCheckboxSelection": "onCheckboxSelection"; "onScrollEmitter": "onScrollEmitter"; "filter": "filter"; "appliedFiltersEvent": "appliedFiltersEvent"; "activeGroupsEvent": "activeGroupsEvent"; }, never, never, true, never>;
|
|
434
447
|
}
|
|
435
448
|
|
|
436
449
|
declare class CommonRendererComponent {
|
|
@@ -555,3 +568,4 @@ declare class CommonRendererComponent {
|
|
|
555
568
|
}
|
|
556
569
|
|
|
557
570
|
export { CatsDataGridComponent, CatsDataGridService, ColDefs, CommonRendererComponent };
|
|
571
|
+
export type { ColumnFilter, FilterCondition };
|
package/package.json
CHANGED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class CatsDataGridComponent implements OnChanges {
|
|
4
|
-
private cd;
|
|
5
|
-
tableOptions: any;
|
|
6
|
-
totalRecords: number;
|
|
7
|
-
sortingRequired: boolean;
|
|
8
|
-
checkBoxSelection: boolean;
|
|
9
|
-
checkboxSelectionType: string;
|
|
10
|
-
rowData: any[];
|
|
11
|
-
colDefs: any[];
|
|
12
|
-
paginationRequired: boolean;
|
|
13
|
-
selectedRowEmpty: boolean;
|
|
14
|
-
filterRequired: boolean;
|
|
15
|
-
onPaginationChange: EventEmitter<any>;
|
|
16
|
-
onCheckboxSelection: EventEmitter<any>;
|
|
17
|
-
onScrollEmitter: EventEmitter<any>;
|
|
18
|
-
pageDetails: any;
|
|
19
|
-
recordsToShow: any;
|
|
20
|
-
sortingColumnIndex: number;
|
|
21
|
-
sortingType: string;
|
|
22
|
-
selectedRow: any[];
|
|
23
|
-
pageSizeList: number[];
|
|
24
|
-
showPageSizeList: boolean;
|
|
25
|
-
dragOverIndex: null | number;
|
|
26
|
-
draggedIndex: null | number;
|
|
27
|
-
constructor(cd: ChangeDetectorRef);
|
|
28
|
-
ngOnInit(): void;
|
|
29
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
30
|
-
/**
|
|
31
|
-
* @description Method to parse column value from rowdata object
|
|
32
|
-
* according to given field value in column Defination
|
|
33
|
-
* @author Tarun Kumar
|
|
34
|
-
* @param row - current row object
|
|
35
|
-
* @param toParse - field value
|
|
36
|
-
* @returns string
|
|
37
|
-
*/
|
|
38
|
-
parseColValue(row: any, toParse: string): string;
|
|
39
|
-
/**
|
|
40
|
-
* @description method to reset table configuration
|
|
41
|
-
* @author Tarun Kumar
|
|
42
|
-
* @param none
|
|
43
|
-
* @returns void
|
|
44
|
-
*/
|
|
45
|
-
resetTableConfig(): void;
|
|
46
|
-
/**
|
|
47
|
-
* @description method to set total pages count
|
|
48
|
-
* @author Tarun Kumar
|
|
49
|
-
* @param none
|
|
50
|
-
* @returns void
|
|
51
|
-
*/
|
|
52
|
-
setPageCount(): void;
|
|
53
|
-
/**
|
|
54
|
-
* @description method to update table on page size change
|
|
55
|
-
* @author Tarun Kumar
|
|
56
|
-
* @param event
|
|
57
|
-
* @returns void
|
|
58
|
-
*/
|
|
59
|
-
onPageSizeChanged(event: any): void;
|
|
60
|
-
/**
|
|
61
|
-
* @description method to update table on previous button click
|
|
62
|
-
* @author Tarun Kumar
|
|
63
|
-
*/
|
|
64
|
-
onBtPrevClick(): void;
|
|
65
|
-
/**
|
|
66
|
-
* @description method to update table on next button click
|
|
67
|
-
* @author Tarun Kumar
|
|
68
|
-
*/
|
|
69
|
-
onBtNextClick(): void;
|
|
70
|
-
/**
|
|
71
|
-
* @description method to update table on selecting any page randomly
|
|
72
|
-
* @author Tarun Kumar
|
|
73
|
-
* @param event
|
|
74
|
-
*/
|
|
75
|
-
goToSelectedPage(event: any): void;
|
|
76
|
-
/**
|
|
77
|
-
* @description method to sort data according to type and column
|
|
78
|
-
* @author Tarun Kumar
|
|
79
|
-
* @param sortingColumIndex
|
|
80
|
-
* @param fieldName
|
|
81
|
-
* @param sortingType
|
|
82
|
-
*/
|
|
83
|
-
onSortingRowData(sortingColumIndex: number, fieldName: string): void;
|
|
84
|
-
/**
|
|
85
|
-
* @description method to sort table in ascending order according to given field
|
|
86
|
-
* @param fieldName
|
|
87
|
-
*/
|
|
88
|
-
ascendingOrder(fieldName: string): void;
|
|
89
|
-
/**
|
|
90
|
-
* @description method to sort table in descending order according to given field
|
|
91
|
-
* @param fieldName
|
|
92
|
-
*/
|
|
93
|
-
descendingOrder(fieldName: string): void;
|
|
94
|
-
/**
|
|
95
|
-
* @description method to check/uncheck all rows on header checkbox selection/deselection
|
|
96
|
-
* @author Tarun Kumar
|
|
97
|
-
* @param event
|
|
98
|
-
*/
|
|
99
|
-
onHeaderCheckboxChange(event: any): void;
|
|
100
|
-
/**
|
|
101
|
-
* @description method to check/uncheck row on row checkbox selection/deselection
|
|
102
|
-
* @author Tarun Kumar
|
|
103
|
-
* @param event
|
|
104
|
-
*/
|
|
105
|
-
onRowCheckboxSelection(event: any): void;
|
|
106
|
-
/**
|
|
107
|
-
* @description method to check/uncheck all rows on header checkbox selection/deselection
|
|
108
|
-
* @author Tarun Kumar
|
|
109
|
-
* @param col
|
|
110
|
-
* @returns {object}
|
|
111
|
-
*/
|
|
112
|
-
getStyle(col: any): object;
|
|
113
|
-
onClickOutside(): void;
|
|
114
|
-
checkCondition(data: any): boolean;
|
|
115
|
-
infinityScroll(event: any): void;
|
|
116
|
-
checkAllSelected(): boolean;
|
|
117
|
-
checkInterminate(): boolean;
|
|
118
|
-
/**
|
|
119
|
-
* @author Tarun Kumar
|
|
120
|
-
* @description function triggered when the drag starts
|
|
121
|
-
* @param {event object, index}
|
|
122
|
-
* @returns {void}
|
|
123
|
-
*/
|
|
124
|
-
onDragStart(event: DragEvent, index: number): void;
|
|
125
|
-
/**
|
|
126
|
-
* @author Tarun Kumar
|
|
127
|
-
* @description function to track the index of the element being dragged over and allow dropping
|
|
128
|
-
* @param {event object, index}
|
|
129
|
-
* @returns {void}
|
|
130
|
-
*/
|
|
131
|
-
onDragOver(event: DragEvent, index: number): void;
|
|
132
|
-
/**
|
|
133
|
-
* @author Tarun Kumar
|
|
134
|
-
* @description function to Reorder the items on drop
|
|
135
|
-
* @param {event object, index}
|
|
136
|
-
* @returns {void}
|
|
137
|
-
*/
|
|
138
|
-
onDrop(event: DragEvent, index: number): void;
|
|
139
|
-
/**
|
|
140
|
-
* @author Tarun Kumar
|
|
141
|
-
* @description function to reset dragOverIndex when the drag ends
|
|
142
|
-
* @param {none}
|
|
143
|
-
* @returns {void}
|
|
144
|
-
*/
|
|
145
|
-
onDragEnd(): void;
|
|
146
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CatsDataGridComponent, never>;
|
|
147
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CatsDataGridComponent, "cats-data-grid", never, { "tableOptions": { "alias": "tableOptions"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "sortingRequired": { "alias": "sortingRequired"; "required": false; }; "checkBoxSelection": { "alias": "checkBoxSelection"; "required": false; }; "checkboxSelectionType": { "alias": "checkboxSelectionType"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "colDefs": { "alias": "colDefs"; "required": false; }; "paginationRequired": { "alias": "paginationRequired"; "required": false; }; "selectedRowEmpty": { "alias": "selectedRowEmpty"; "required": false; }; "filterRequired": { "alias": "filterRequired"; "required": false; }; "pageSizeList": { "alias": "pageSizeList"; "required": false; }; }, { "onPaginationChange": "onPaginationChange"; "onCheckboxSelection": "onCheckboxSelection"; "onScrollEmitter": "onScrollEmitter"; }, never, never, true, never>;
|
|
148
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ElementRef, EventEmitter } from "@angular/core";
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class OutsideClickDirective {
|
|
4
|
-
private el;
|
|
5
|
-
clickOutside: EventEmitter<any>;
|
|
6
|
-
constructor(el: ElementRef);
|
|
7
|
-
onClick(event: MouseEvent, targetElement: HTMLElement): void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OutsideClickDirective, never>;
|
|
9
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<OutsideClickDirective, "[appOutsideClick]", never, {}, { "clickOutside": "clickOutside"; }, never, never, true, never>;
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ElementRef, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class RendererParserDirective implements OnInit {
|
|
4
|
-
private el;
|
|
5
|
-
private er;
|
|
6
|
-
rowParam: any;
|
|
7
|
-
col: any;
|
|
8
|
-
api: any;
|
|
9
|
-
currentValue: any;
|
|
10
|
-
ref: any;
|
|
11
|
-
constructor(el: ViewContainerRef, er: ElementRef);
|
|
12
|
-
ngOnInit(): void;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RendererParserDirective, never>;
|
|
14
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RendererParserDirective, "[appRendererParser]", never, { "rowParam": { "alias": "rowParam"; "required": false; }; "col": { "alias": "col"; "required": false; }; "api": { "alias": "api"; "required": false; }; "currentValue": { "alias": "currentValue"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class AddClassPipe implements PipeTransform {
|
|
4
|
-
transform(value: any, tableOption: any): string;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AddClassPipe, never>;
|
|
6
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<AddClassPipe, "addClass", true>;
|
|
7
|
-
}
|
package/public-api.d.ts
DELETED