cats-data-grid 2.0.35 → 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/index.d.ts CHANGED
@@ -21,6 +21,15 @@ 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
34
  private renderer;
26
35
  private zone;
@@ -86,6 +95,10 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
86
95
  private removeMouseMove;
87
96
  private removeMouseUp;
88
97
  private rafId;
98
+ appliedFilters: ColumnFilter[];
99
+ appliedFiltersEvent: EventEmitter<ColumnFilter[]>;
100
+ activeGroupsEvent: EventEmitter<any[]>;
101
+ dynamicGroupingFiltering: boolean;
89
102
  constructor(renderer: Renderer2, zone: NgZone, cd: ChangeDetectorRef);
90
103
  ngOnInit(): void;
91
104
  ngOnChanges(changes: SimpleChanges): void;
@@ -117,13 +130,14 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
117
130
  */
118
131
  evaluateNumDateFilterCondition(type: string, fieldValue: number | string, value: number | string): boolean;
119
132
  /**
120
- * @description Method to filter data according to filterType and comparator selection
133
+ * @description Method to filter data according to filterOperation and comparator selection
121
134
  * @author Anand Pandey
122
135
  * @param {}
123
136
  * @returns void
124
137
  */
125
138
  applyAllFilters(): void;
126
139
  resetFilter(col: any): void;
140
+ removeActiveFilter(col: any): void;
127
141
  /**
128
142
  * @description Method to change the data format to utc
129
143
  * @author Anand Pandey
@@ -262,7 +276,7 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
262
276
  * @param none
263
277
  * @returns void
264
278
  */
265
- resetTableConfig(): void;
279
+ resetPagination(): void;
266
280
  /**
267
281
  * @description method to set total pages count
268
282
  * @author Tarun Kumar
@@ -331,7 +345,6 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
331
345
  */
332
346
  getStyle(col: any, type?: string): object;
333
347
  onClickOutside(): void;
334
- checkCondition(data: any): boolean;
335
348
  infinityScroll(event: any): void;
336
349
  checkAllSelected(): boolean;
337
350
  checkInterminate(): boolean;
@@ -428,8 +441,9 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
428
441
  enableColumnDrag(event: MouseEvent, index: number): void;
429
442
  disableColumnDrag(event: MouseEvent, index: number): void;
430
443
  dateTimeSelected(date: any): void;
444
+ convertToNumber(value: number | string): number;
431
445
  static ɵfac: i0.ɵɵFactoryDeclaration<CatsDataGridComponent, never>;
432
- 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>;
433
447
  }
434
448
 
435
449
  declare class CommonRendererComponent {
@@ -554,3 +568,4 @@ declare class CommonRendererComponent {
554
568
  }
555
569
 
556
570
  export { CatsDataGridComponent, CatsDataGridService, ColDefs, CommonRendererComponent };
571
+ export type { ColumnFilter, FilterCondition };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cats-data-grid",
3
- "version": "2.0.35",
3
+ "version": "2.0.36",
4
4
  "peerDependencies": {
5
5
  "@angular/core": ">=18 <22",
6
6
  "@angular/common": ">=18 <22"
@@ -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
- }
@@ -1,6 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class CatsDataGridService {
3
- constructor();
4
- static ɵfac: i0.ɵɵFactoryDeclaration<CatsDataGridService, never>;
5
- static ɵprov: i0.ɵɵInjectableDeclaration<CatsDataGridService>;
6
- }
package/public-api.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './lib/services/cats-data-grid.service';
2
- export * from './lib/cats-data-grid.component';