cats-data-grid 2.0.33 → 2.0.35

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
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnChanges, OnInit, EventEmitter, ChangeDetectorRef, SimpleChanges } from '@angular/core';
2
+ import { OnChanges, OnInit, EventEmitter, Renderer2, NgZone, ChangeDetectorRef, SimpleChanges } from '@angular/core';
3
3
 
4
4
  declare class CatsDataGridService {
5
5
  constructor();
@@ -12,7 +12,18 @@ interface DateConfig {
12
12
  enableTime?: boolean;
13
13
  }
14
14
 
15
+ declare class ColDefs {
16
+ fieldName: string;
17
+ headerName: string;
18
+ width: number;
19
+ minWidth: number;
20
+ sortable: boolean;
21
+ filterable: boolean;
22
+ cellRenderer: any;
23
+ }
15
24
  declare class CatsDataGridComponent implements OnChanges, OnInit {
25
+ private renderer;
26
+ private zone;
16
27
  private cd;
17
28
  tableOptions: any;
18
29
  totalRecords: number;
@@ -72,7 +83,10 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
72
83
  }[];
73
84
  showPin: boolean;
74
85
  pinActionClicked: any;
75
- constructor(cd: ChangeDetectorRef);
86
+ private removeMouseMove;
87
+ private removeMouseUp;
88
+ private rafId;
89
+ constructor(renderer: Renderer2, zone: NgZone, cd: ChangeDetectorRef);
76
90
  ngOnInit(): void;
77
91
  ngOnChanges(changes: SimpleChanges): void;
78
92
  /**
@@ -539,4 +553,4 @@ declare class CommonRendererComponent {
539
553
  static ɵcmp: i0.ɵɵComponentDeclaration<CommonRendererComponent, "lib-common-renderer", never, {}, {}, never, never, true, never>;
540
554
  }
541
555
 
542
- export { CatsDataGridComponent, CatsDataGridService, CommonRendererComponent };
556
+ export { CatsDataGridComponent, CatsDataGridService, ColDefs, CommonRendererComponent };
@@ -0,0 +1,148 @@
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
+ }
@@ -0,0 +1,10 @@
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
+ }
@@ -0,0 +1,15 @@
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
+ }
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,6 @@
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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "cats-data-grid",
3
- "version": "2.0.33",
3
+ "version": "2.0.35",
4
4
  "peerDependencies": {
5
- "@angular/core": ">=18",
6
- "@angular/common": ">=18"
5
+ "@angular/core": ">=18 <22",
6
+ "@angular/common": ">=18 <22"
7
7
  },
8
8
  "dependencies": {
9
9
  "tslib": "^2.3.0"
@@ -0,0 +1,2 @@
1
+ export * from './lib/services/cats-data-grid.service';
2
+ export * from './lib/cats-data-grid.component';