cats-data-grid 1.0.1 → 2.0.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.
@@ -1,66 +1,88 @@
1
1
  :root {
2
- --white: #fff;
3
- --white-creame: #ebf3ff;
4
- --border: #dae3f8;
5
- --scrollbar: var(--border);
6
- --textPrimary: #0b1c33;
7
- --textPrimary70: #0b1c33b3;
8
- --textSecondary: #556171;
9
- --textSecondary50: #55617180;
10
- --textSecondary70: #556171b3;
2
+ --white: #ffffff;
3
+ --white-50: rgba(255, 255, 255, 0.582);
11
4
 
12
- --pink-10: #f9fbfe;
5
+ --black: #1f1f1f;
6
+ --default: #000000;
7
+ --black-900: #202224;
8
+ --pagination-text: var(--neutral-500);
9
+ --black-dust: #1a1a1a;
13
10
 
14
- --ice-blue: #67adcf;
15
- --primaryBlue: #017db9;
16
- --primaryBlue70: #017db9be;
17
- --blue-10: #edf4fe;
18
- --blue-40: #e3f3fc;
19
- --blue-50: #f2f5fa;
20
- --blue-5050: #f2f5fa80;
21
- --blue-100: #c8e2ff;
22
- --blue-200: #a4cfff;
23
- --blue-300: #2680ea;
24
- --blue-500: #3788e5;
25
- --blue-700: #007aff;
26
- // --blue-70090: #007AFFE6;
11
+ // NEUTRAL-COLOR
12
+ --neutral-cross: #d9d9d9;
13
+ --neutral-40: #d5d7da;
14
+ --neutral-50: #f0f0f0;
15
+ --neutral-100: #e6e7e8;
16
+ --neutral-200: #dadbdc;
17
+ --neutral-300: #c0c2c5;
18
+ --neutral-400: #81858a;
19
+ --neutral-500: #434a51;
20
+ --neutral-600: #040d17;
21
+ --neutral-900: #010306;
27
22
 
28
- --yellow-50: #ffeedf;
29
- --yellow-100: #fed18f;
30
- --yellow-200: #ffbca6;
31
- --yellow-300: #f08a2b26;
32
- --yellow-400: #e58900;
23
+ // BLUE COLOR
24
+ --blue-50: #f7fafe;
25
+ --blue-100: #eaf3fd;
26
+ --blue-200: #dfecfc;
27
+ --blue-300: #c8dff9;
28
+ --blue-400: #92bff4;
29
+ --blue-600: #2680ea;
30
+ --blue-700: #1c60af;
31
+ --blue-800: #1849d6;
33
32
 
34
- --primaryOrange: #f05a2b;
35
- --primaryOrange50: #f05a2b80;
36
- --primaryOrange70: #f05a2bb3;
37
- --orange-10: #fcf5eb;
38
- --orange-200: #f7ac94;
39
- --orange-300: #fb9676;
40
- --theadBg: var(--blue-50);
33
+ // GREY COLOR
34
+ --grey-50: #e9eaeb;
35
+ --grey-100: #e2e8f0;
36
+ --grey-150: #d6d6d6;
37
+ --grey-200: #64748b;
38
+ --grey-300: #414651;
39
+ --grey-400: #8080808c;
40
+ --grey-600: #535862;
41
+ --light-grey: #81858a;
42
+ --dark-grey: #4a4a4a;
41
43
 
42
- --pagination-bg: #f7fafe;
43
- --blue-200: var(--border);
44
- --neutral-200: #dadbdc;
45
- --neutral-600: #040d17;
46
- --toastShadow: #0000001f;
47
- --dropdown-shadow: #00000014;
44
+ --green-50: #f7fbf7;
45
+ --green-100: #ecf4ec;
46
+ --green-200: #e1eee2;
47
+ --green-400: #9bc69d;
48
+ --green-600: #388e3c;
49
+ --green-700: #2a6a2d;
48
50
 
49
- --green-50: #eaf8f1;
50
- --green-100: #bde8d3;
51
- --green-600: #27a468;
51
+ --red: #ff0000;
52
+ --red-50: #fdf7f7;
53
+ --red-100: #faeaea;
54
+ --red-200: #f7dfdf;
55
+ --red-300: #f0c9c9;
56
+ --red-700: #941e1e;
52
57
 
53
- --red-10: #fcebef;
54
- --red-20: #ca0000;
55
- --red-30: #F7C1CE;
56
- --error-red: #d03258;
57
- --tableBorder: var(--border);
58
+ --yellow-50: #fffdf5;
59
+ --yellow-100: #fff9e7;
60
+ --yellow-200: #fff6da;
61
+ --yellow-300: #ffefc1;
62
+ // --yellow-400: #fff9e7;
63
+ --yellow-500: #bf7200;
64
+ --yellow-600: #ffc107;
65
+ --yellow-700: #bf9105;
66
+ --yellow-800: #806003;
67
+ --yellow-900: #bf9105;
58
68
 
59
- --grey-50: #a5b0bf;
60
- --grey-100: #333333;
61
- --grey-200: #222A3D;
69
+ // Orange
70
+ --orange-50: rgba(255, 251, 245, 1);
71
+ --orange-100: #fff5e6;
72
+ --orange-200: #fff0d9;
73
+ --orange-600: #ff9800;
74
+ --orange-700: rgba(191, 114, 0, 1);
62
75
 
63
- --capture-border: #9badca;
64
- --captcha-bg: #f3f3f3;
65
- --neutral-400: #81858a;
76
+ --box-shadow: #0a0d1214;
77
+ --grid-box-shadow: #0000000a;
78
+ --model-shadow: rgba(0, 0, 0, 0.08);
79
+ --canvas-shadow: #00000014;
80
+
81
+ --loader-border: #6f7b93;
82
+ --modal-bg: rgba(4, 13, 23, 0.3);
83
+ --checkbox-border: #0d6efd;
84
+
85
+ // FILTER COLOR
86
+ --filter-600: rgba(0, 0, 0, 0.644);
87
+ --feather-bg: #fafafa;
66
88
  }
@@ -1,323 +0,0 @@
1
- import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class CatsDataGridComponent implements OnChanges, OnInit {
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
- threeDotsMenuRequired: boolean;
16
- height: number;
17
- groupBy: string[];
18
- onPaginationChange: EventEmitter<any>;
19
- onCheckboxSelection: EventEmitter<any>;
20
- onScrollEmitter: EventEmitter<any>;
21
- filter: EventEmitter<any>;
22
- activeFilterIndex: number | null;
23
- originalRowData: any[];
24
- pageDetails: any;
25
- recordsToShow: any;
26
- sortingColumnIndex: number;
27
- sortingType: string;
28
- selectedRow: any[];
29
- pageSizeList: number[];
30
- showPageSizeList: boolean;
31
- dragOverIndex: null | number;
32
- draggedIndex: null | number;
33
- originalColDefs: any[];
34
- filteredRowData: any[];
35
- filteredData: any[];
36
- currentColumn: any;
37
- currentIndex: number;
38
- menuVisible: boolean[];
39
- menuPosition: any[];
40
- activeFilters: Set<any>;
41
- resizingColumnIndex: number | null;
42
- startX: number;
43
- startWidth: number;
44
- isResizing: boolean;
45
- groupedResult: any[];
46
- constructor(cd: ChangeDetectorRef);
47
- ngOnInit(): void;
48
- ngOnChanges(changes: SimpleChanges): void;
49
- /**
50
- * @description Prepares and normalizes column definitions for filtering and menu behavior
51
- * @author Anand Pandey
52
- * @param {any[]} colDefs - Raw column definitions received from the parent.
53
- * @returns {any[]} - Updated column definitions with filter/menu
54
- */
55
- getUpdatedColDefs(colDefs: any[]): any[];
56
- normalizeSetFilterType(value: any, key: string): any[] | undefined;
57
- /**
58
- * @description - Evaluates a text-based filter condition on a given field value.
59
- * @author Anand Pandey
60
- * @param {string} type - The type of text filter to apply ('contains' | 'doesNotContain' | 'equals' etc).
61
- * @param {string} fieldValue - The actual value from the data row being evaluated.
62
- * @param {string} value - The user-entered filter value to compare against.
63
- * @returns {boolean} `true` if the fieldValue satisfies the specified filter condition,
64
- * otherwise `false`.
65
- */
66
- evaluateTextFilterCondition(type: string, fieldValue: string, value: string): boolean;
67
- /**
68
- * @description - Evaluates number/date filter conditions.
69
- * @author Anand
70
- * @param {string} type - Comparison operator ('=' | '>' | '<' | '>=' | '<=').
71
- * @param {number|string} fieldValue - Actual value from the row (number or timestamp).
72
- * @param {number|string} value - User-entered value for comparison.
73
- * @returns {boolean} True if the condition matches, otherwise false.
74
- */
75
- evaluateNumDateFilterCondition(type: string, fieldValue: number | string, value: number | string): boolean;
76
- /**
77
- * @description Method to filter data according to filterType and comparator selection
78
- * @author Anand Pandey
79
- * @param {}
80
- * @returns void
81
- */
82
- applyAllFilters(): void;
83
- /**
84
- * @description Method to change the data format to utc
85
- * @author Anand Pandey
86
- * @param {date} - date value to be changed
87
- * @returns date in milliseconds
88
- */
89
- normalizeDate(dateStr: string): number | null;
90
- /**
91
- * @description
92
- * Filters the available set options inside a Set Filter (checkbox filter)
93
- * based on the user's search text. This updates only the list shown in
94
- * the dropdown
95
- * @author Anand Pandey
96
- * @param col - Column definition object containing filter config
97
- * @param event - Input event from the search textbox
98
- * @returns void
99
- */
100
- filterSetOptions(col: any, event: any): void;
101
- /**
102
- * @description
103
- * Toggles an individual checkbox option inside a Set Filter. *
104
- * @author Anand Pandey
105
- * @param col - Column definition object
106
- * @param opt - Selected option value
107
- * @param event - Checkbox change event
108
- * @returns void
109
- */
110
- toggleSetOption(col: any, opt: any, event: any): void;
111
- /**
112
- * @description * Selects or deselects all checkbox options in the Set Filter.
113
- * @author Anand Pandey
114
- * @param col - Column definition object
115
- * @param event - Checkbox change event
116
- * @returns void
117
- */
118
- toggleSelectAll(col: any, event: any): void;
119
- /**
120
- * @description
121
- * Checks whether all options inside a Set Filter are currently selected.
122
- * @author Anand Pandey
123
- * @param col - Column definition object
124
- * @returns boolean - TRUE if all options are selected, otherwise FALSE.
125
- */
126
- isAllSelected(col: any): boolean;
127
- /**
128
- * @description
129
- * Opens the three-dots column menu for the selected column.
130
- * Opens only the menu belonging to the clicked column index
131
- * @author Anand Pandey
132
- * @param {MouseEvent} event - The click event triggered on the three-dots icon.
133
- * @param {any} col - The column definition object for which menu is opened.
134
- * @param {number} index - Index of the column whose menu has been requested.
135
- * @returns {void}
136
- */
137
- openMenu(event: MouseEvent, col: any, index: number): void;
138
- /**
139
- * @description Sort from three dots menu pop up.
140
- * @author Anand Pandey
141
- * @param {fieldName} string - fieldname.
142
- * @param {string} type - Type defines the sorting type whether this is ascending, descending.
143
- * @returns {void}
144
- */
145
- onSort(fieldName: string, type: string): void;
146
- /**
147
- * @description Generates grouped data based on the selected `groupBy` columns..
148
- * @author Anand Pandey
149
- * @returns void
150
- */
151
- getGroupedData(): void;
152
- /**
153
- * @description Initializes column resize operation when the user presses the mouse on the resize handle.
154
- * @author Anand Pandey
155
- * @param {MouseEvent} event - The mousedown event triggered on the resize handle.
156
- * @param {number} index - Index of the column being resized.
157
- * @returns {void}
158
- */
159
- startResize(event: MouseEvent, index: number): void;
160
- /**
161
- * @description Handles column resizing as the mouse moves.
162
- * @author Anand Pandey
163
- * @param {MouseEvent} event - Mouse movement event during resizing.
164
- * @returns {void}
165
- */
166
- onMouseMove: (event: MouseEvent) => void;
167
- /**
168
- * @description Stops the column resizing operation.
169
- * Clears resizing state and removes mouse event listeners.
170
- * @author Anand Pandey
171
- * @param {MouseEvent} event - Mouse up event ending the resize action.
172
- * @returns {void}
173
- */
174
- stopResize: (event: MouseEvent) => void;
175
- /**
176
- * @description Recursively groups row data into a hierarchical structure based on the provided group keys.
177
- * @author Anand Pandey
178
- * @param {any[]} data - The row data to be grouped.
179
- * @param {string[]} groupKeys - Ordered list of column keys to group by.
180
- * @returns {any[]} A hierarchical grouped structure containing nested group nodes.
181
- */
182
- groupData(data: any[], groupKeys: string[]): any;
183
- /**
184
- * @description Toggles the expand/collapse state of a group node.
185
- * @author Anand Pandey
186
- * @param {any} node - The group node whose expanded state needs to be toggled.
187
- * @returns {void}
188
- */
189
- toggleGroup(node: any): void;
190
- /**
191
- * @description Pin column on the left side.
192
- * @author Anand Pandey
193
- * @param {any} col - The selected column details from table on clicking pin or unpin from three dots menu.
194
- * @param {number} index - The index of column from table on clicking pin or unpin from three dots menu.
195
- * @returns {void}
196
- */
197
- pinColumn(col: any, index: number): void;
198
- /**
199
- * @description Updates the horizontal left offsets of pinned columns by assigning cumulative widths to each pinned column and resetting non-pinned columns.
200
- * @author Anand
201
- * @returns void
202
- */
203
- updatePinnedOffsets(): void;
204
- /**
205
- * @description Method to parse column value from rowdata object
206
- * according to given field value in column Defination
207
- * @author Tarun Kumar
208
- * @param row - current row object
209
- * @param toParse - field value
210
- * @returns string
211
- */
212
- parseColValue(row: any, toParse: string): string;
213
- /**
214
- * @description method to reset table configuration
215
- * @author Tarun Kumar
216
- * @param none
217
- * @returns void
218
- */
219
- resetTableConfig(): void;
220
- /**
221
- * @description method to set total pages count
222
- * @author Tarun Kumar
223
- * @param none
224
- * @returns void
225
- */
226
- setPageCount(): void;
227
- /**
228
- * @description method to update table on page size change
229
- * @author Tarun Kumar
230
- * @param event
231
- * @returns void
232
- */
233
- onPageSizeChanged(event: any): void;
234
- /**
235
- * @description method to update table on previous button click
236
- * @author Tarun Kumar
237
- */
238
- onBtPrevClick(): void;
239
- /**
240
- * @description method to update table on next button click
241
- * @author Tarun Kumar
242
- */
243
- onBtNextClick(): void;
244
- /**
245
- * @description method to update table on selecting any page randomly
246
- * @author Tarun Kumar
247
- * @param event
248
- */
249
- goToSelectedPage(event: any): void;
250
- /**
251
- * @description method to sort data according to type and column
252
- * @author Tarun Kumar
253
- * @param sortingColumIndex
254
- * @param col
255
- * @param sortingType
256
- */
257
- onSortingRowData(sortingColumIndex: number, col: any): void;
258
- /**
259
- * @description method to sort table in ascending order according to given field
260
- * @param fieldName
261
- */
262
- ascendingOrder(fieldName: string): void;
263
- /**
264
- * @description method to sort table in descending order according to given field
265
- * @param fieldName
266
- */
267
- descendingOrder(fieldName: string): void;
268
- /**
269
- * @description method to check/uncheck all rows on header checkbox selection/deselection
270
- * @author Tarun Kumar
271
- * @param event
272
- */
273
- onHeaderCheckboxChange(event: any): void;
274
- /**
275
- * @description method to check/uncheck row on row checkbox selection/deselection
276
- * @author Tarun Kumar
277
- * @param event
278
- */
279
- onRowCheckboxSelection(event: any): void;
280
- /**
281
- * @description method to check/uncheck all rows on header checkbox selection/deselection
282
- * @author Tarun Kumar
283
- * @param col
284
- * @returns {object}
285
- */
286
- getStyle(col: any): object;
287
- onClickOutside(): void;
288
- checkCondition(data: any): boolean;
289
- infinityScroll(event: any): void;
290
- checkAllSelected(): boolean;
291
- checkInterminate(): boolean;
292
- /**
293
- * @author Tarun Kumar
294
- * @description function triggered when the drag starts
295
- * @param {event object, index}
296
- * @returns {void}
297
- */
298
- onDragStart(event: DragEvent, index: number): void;
299
- /**
300
- * @author Tarun Kumar
301
- * @description function to track the index of the element being dragged over and allow dropping
302
- * @param {event object, index}
303
- * @returns {void}
304
- */
305
- onDragOver(event: DragEvent, index: number): void;
306
- /**
307
- * @author Tarun Kumar
308
- * @description function to Reorder the items on drop
309
- * @param {event object, index}
310
- * @returns {void}
311
- */
312
- onDrop(event: DragEvent, index: number): void;
313
- /**
314
- * @author Tarun Kumar
315
- * @description function to reset dragOverIndex when the drag ends
316
- * @param {none}
317
- * @returns {void}
318
- */
319
- onDragEnd(): void;
320
- toggleFilter(col: any, index: number, event: MouseEvent): void;
321
- static ɵfac: i0.ɵɵFactoryDeclaration<CatsDataGridComponent, never>;
322
- 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; }; "groupBy": { "alias": "groupBy"; "required": false; }; "pageSizeList": { "alias": "pageSizeList"; "required": false; }; }, { "onPaginationChange": "onPaginationChange"; "onCheckboxSelection": "onCheckboxSelection"; "onScrollEmitter": "onScrollEmitter"; "filter": "filter"; }, never, never, true, never>;
323
- }
@@ -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 elementRef;
5
- clickOutside: EventEmitter<any>;
6
- constructor(elementRef: ElementRef);
7
- onClick(event: MouseEvent): 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';