cats-data-grid 2.0.6 → 2.0.8

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,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnChanges, OnInit, ElementRef, EventEmitter, Renderer2, NgZone, ChangeDetectorRef, SimpleChanges, DoCheck, AfterViewInit, OnDestroy } from '@angular/core';
2
+ import { OnChanges, OnInit, ElementRef, EventEmitter, Renderer2, NgZone, ChangeDetectorRef, SimpleChanges, DoCheck, AfterViewInit, OnDestroy, ApplicationRef, Injector } from '@angular/core';
3
+ import { FormControl } from '@angular/forms';
3
4
 
4
5
  declare class CatsDataGridService {
5
6
  constructor();
@@ -52,6 +53,7 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
52
53
  settingsClicked: boolean;
53
54
  resetPage: boolean;
54
55
  rowId: any;
56
+ bigRows: boolean;
55
57
  showDropdown: boolean;
56
58
  height: number;
57
59
  groupByRequired: boolean;
@@ -60,6 +62,8 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
60
62
  onScrollEmitter: EventEmitter<any>;
61
63
  filter: EventEmitter<any>;
62
64
  onHideSettings: EventEmitter<any>;
65
+ onCellEdit: EventEmitter<any>;
66
+ onColConfigChange: EventEmitter<any>;
63
67
  activeFilterIndex: number | null;
64
68
  originalRowData: any[];
65
69
  activeAll: boolean;
@@ -91,6 +95,14 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
91
95
  groupBy: string[];
92
96
  groupByField: string;
93
97
  dragGroupIndex: number | null;
98
+ categorizedCols: any;
99
+ noCategoryCols: any[];
100
+ objectKeys: {
101
+ (o: object): string[];
102
+ (o: {}): string[];
103
+ };
104
+ allActiveDefault: boolean;
105
+ allActiveColMap: Record<string, boolean>;
94
106
  dateConfig: DateConfig;
95
107
  filterOptions: {
96
108
  label: string;
@@ -112,18 +124,63 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
112
124
  appliedFiltersEvent: EventEmitter<ColumnFilter[]>;
113
125
  activeGroupsEvent: EventEmitter<any[]>;
114
126
  dynamicGroupingFiltering: boolean;
127
+ isRowsEditable: boolean;
128
+ showSkeleton: boolean;
115
129
  atLeastOneColumnChecked: boolean;
116
130
  draggedRowData: any;
117
131
  firstCol: any;
118
132
  isRowSelected: boolean;
119
133
  onRowClicked: EventEmitter<any>;
120
134
  onCellClicked: EventEmitter<any>;
135
+ isCellDblClicked: any;
136
+ cellClickedCtrl: FormControl<string | null>;
137
+ previousId: string;
138
+ editingRow: any;
139
+ editingField: string;
140
+ clickTimer: any;
141
+ clickDelay: number;
142
+ cellClickedColumn: any;
143
+ enterPressed: boolean;
144
+ leftPinned: any;
145
+ rightPinned: any;
146
+ centerArea: any;
147
+ groupingDisabled: boolean;
148
+ draggableColumn: any;
149
+ skeletonRowsLength: number;
150
+ skeletonColsLength: number;
151
+ skeletonRows: any;
152
+ skeletonCols: any;
153
+ allActiveCol: boolean;
154
+ originalCategorizedCols: any;
155
+ originalNoCategoryCols: any[];
121
156
  constructor(renderer: Renderer2, zone: NgZone, cd: ChangeDetectorRef);
122
157
  ngOnInit(): void;
123
158
  ngOnChanges(changes: SimpleChanges): void;
159
+ onColConfigSearch(event: any): void;
160
+ cloneColDefs(colDefs: any[]): any[];
161
+ resetDefaultColConfig(): void;
162
+ /**
163
+ * Autosize column to fit content
164
+ */
165
+ protected autosizeColumn(col: any): void;
166
+ /**
167
+ * Autosize all columns
168
+ */
169
+ protected autosizeAllColumns(): void;
170
+ getColConfigCategory(colDefs: any[]): {
171
+ categorized: Record<string, any[]>;
172
+ noCategory: any[];
173
+ };
124
174
  getColumnDetail(colDefs: any, groupByField: any): any;
125
175
  activeAllSelection(event: Event): void;
176
+ showAllSelection(): void;
177
+ showAllDefaultSelection(): void;
178
+ rebuildView(): void;
179
+ showAllCategorySelection(category: string): void;
180
+ toggleSelectedCol(col: any): void;
181
+ updateGlobalState(): void;
126
182
  changeActiveColSelection(event: Event, col: any): void;
183
+ getActiveCols(): void;
127
184
  /**
128
185
  * @description Prepares and normalizes column definitions for filtering and menu behavior
129
186
  * @author Anand Pandey
@@ -377,7 +434,7 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
377
434
  * @param {event object, index}
378
435
  * @returns {void}
379
436
  */
380
- onDragStart(event: DragEvent, index: number): void;
437
+ onDragStart(event: DragEvent, index: number, col: any): void;
381
438
  onGroupDragStart(event: DragEvent, index: number): void;
382
439
  /**
383
440
  * @author Anand Pandey
@@ -475,11 +532,17 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
475
532
  onBtLastClick(): void;
476
533
  onRowClick(row: any): void;
477
534
  onCellClick(row: any, col: any): void;
535
+ onCellDblClick(row: any, col: any): void;
536
+ onEnter(): void;
537
+ onBlur(): void;
538
+ onCellEditSave(): void;
539
+ setFieldValue(row: any, field: string, value: any): void;
478
540
  static ɵfac: i0.ɵɵFactoryDeclaration<CatsDataGridComponent, never>;
479
- 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; }; "settingsRequired": { "alias": "settingsRequired"; "required": false; }; "settingsClicked": { "alias": "settingsClicked"; "required": false; }; "resetPage": { "alias": "resetPage"; "required": false; }; "rowId": { "alias": "rowId"; "required": false; }; "height": { "alias": "height"; "required": false; }; "groupByRequired": { "alias": "groupByRequired"; "required": false; }; "pageSizeList": { "alias": "pageSizeList"; "required": false; }; "groupByField": { "alias": "groupByField"; "required": false; }; "appliedFilters": { "alias": "appliedFilters"; "required": false; }; "rowGripFieldName": { "alias": "rowGripFieldName"; "required": false; }; "pageNumber": { "alias": "pageNumber"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "dynamicGroupingFiltering": { "alias": "dynamicGroupingFiltering"; "required": false; }; }, { "onPaginationChange": "onPaginationChange"; "onCheckboxSelection": "onCheckboxSelection"; "onScrollEmitter": "onScrollEmitter"; "filter": "filter"; "onHideSettings": "onHideSettings"; "appliedFiltersEvent": "appliedFiltersEvent"; "activeGroupsEvent": "activeGroupsEvent"; "onRowClicked": "onRowClicked"; "onCellClicked": "onCellClicked"; }, never, never, true, never>;
541
+ 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": true; }; "colDefs": { "alias": "colDefs"; "required": true; }; "paginationRequired": { "alias": "paginationRequired"; "required": false; }; "selectedRowEmpty": { "alias": "selectedRowEmpty"; "required": false; }; "filterRequired": { "alias": "filterRequired"; "required": false; }; "threeDotsMenuRequired": { "alias": "threeDotsMenuRequired"; "required": false; }; "settingsRequired": { "alias": "settingsRequired"; "required": false; }; "settingsClicked": { "alias": "settingsClicked"; "required": false; }; "resetPage": { "alias": "resetPage"; "required": false; }; "rowId": { "alias": "rowId"; "required": false; }; "bigRows": { "alias": "bigRows"; "required": false; }; "height": { "alias": "height"; "required": false; }; "groupByRequired": { "alias": "groupByRequired"; "required": false; }; "pageSizeList": { "alias": "pageSizeList"; "required": false; }; "groupByField": { "alias": "groupByField"; "required": false; }; "appliedFilters": { "alias": "appliedFilters"; "required": false; }; "rowGripFieldName": { "alias": "rowGripFieldName"; "required": false; }; "pageNumber": { "alias": "pageNumber"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "dynamicGroupingFiltering": { "alias": "dynamicGroupingFiltering"; "required": false; }; "isRowsEditable": { "alias": "isRowsEditable"; "required": false; }; "showSkeleton": { "alias": "showSkeleton"; "required": false; }; "skeletonRowsLength": { "alias": "skeletonRowsLength"; "required": false; }; "skeletonColsLength": { "alias": "skeletonColsLength"; "required": false; }; }, { "onPaginationChange": "onPaginationChange"; "onCheckboxSelection": "onCheckboxSelection"; "onScrollEmitter": "onScrollEmitter"; "filter": "filter"; "onHideSettings": "onHideSettings"; "onCellEdit": "onCellEdit"; "onColConfigChange": "onColConfigChange"; "appliedFiltersEvent": "appliedFiltersEvent"; "activeGroupsEvent": "activeGroupsEvent"; "onRowClicked": "onRowClicked"; "onCellClicked": "onCellClicked"; }, never, never, true, never>;
480
542
  }
481
543
 
482
544
  declare class CommonRendererComponent {
545
+ parentContainer: HTMLElement;
483
546
  params: any;
484
547
  private static _activeRowId;
485
548
  private static _activeTagId;
@@ -498,6 +561,7 @@ declare class CommonRendererComponent {
498
561
  * @returns {string | undefined}
499
562
  */
500
563
  get type(): any;
564
+ get subType(): any;
501
565
  /**
502
566
  * @description Returns the renderer subtype defined in cellRendererParams.
503
567
  * @author Anand Pandey
@@ -611,17 +675,14 @@ declare class CommonRendererComponent {
611
675
  * @param {string} valueProp Property name assigned to the normalized output value
612
676
  * @returns {Array<{ [key: string]: string; class: string }>} Array of normalized value objects
613
677
  */
614
- transformValue(key: string, valueProp: any): {
615
- [valueProp]: any;
616
- class: any;
617
- }[];
678
+ transformValue(key: string, valueProp: any): any[];
618
679
  parseColValue(row: any, col: any): any;
619
680
  static ɵfac: i0.ɵɵFactoryDeclaration<CommonRendererComponent, never>;
620
681
  static ɵcmp: i0.ɵɵComponentDeclaration<CommonRendererComponent, "lib-common-renderer", never, {}, {}, never, never, true, never>;
621
682
  }
622
683
 
623
684
  interface CatsTreeTableColumn {
624
- field: string;
685
+ fieldName: string;
625
686
  header?: string;
626
687
  width?: number;
627
688
  minWidth?: number;
@@ -642,6 +703,8 @@ interface CatsTreeTableColumn {
642
703
  selectedValues?: Set<any>;
643
704
  cellRenderer?: any;
644
705
  cellRendererParams?: any;
706
+ filterLogic?: 'AND' | 'OR';
707
+ headerLocked?: boolean;
645
708
  }
646
709
  interface TreeFilterCondition {
647
710
  filterOperation: string;
@@ -661,9 +724,9 @@ interface CatsTreeExpandEvent<T = any> {
661
724
  expanded: boolean;
662
725
  }
663
726
  interface CatsTreeSelectionChangeEvent<T = any> {
664
- node: T;
665
- level: number;
666
- path: T[];
727
+ node?: T;
728
+ level?: number;
729
+ path?: T[];
667
730
  checked: boolean;
668
731
  selectedNodes: T[];
669
732
  }
@@ -672,6 +735,7 @@ interface CatsTreeLinkClickEvent<T = any> {
672
735
  level: number;
673
736
  path: T[];
674
737
  url: string | null;
738
+ col: CatsTreeTableColumn;
675
739
  }
676
740
  type RowKind = 'node' | 'loading' | 'no-data';
677
741
  interface RowView<T = any> {
@@ -689,7 +753,9 @@ declare class CommonTreeTableComponent<T = any> implements OnChanges, DoCheck, A
689
753
  pinMenu?: ElementRef<HTMLElement>;
690
754
  data: T[];
691
755
  columns: CatsTreeTableColumn[];
756
+ tableOptions: any;
692
757
  idField: string;
758
+ rowId: string;
693
759
  labelField: string;
694
760
  childrenField: string;
695
761
  treeColumnField?: string;
@@ -702,6 +768,7 @@ declare class CommonTreeTableComponent<T = any> implements OnChanges, DoCheck, A
702
768
  showNodeIcon: boolean;
703
769
  noDataText: string;
704
770
  loadingText: string;
771
+ expandAllNodes: boolean;
705
772
  emitExpandAlways: boolean;
706
773
  sortingRequired: boolean;
707
774
  filterRequired: boolean;
@@ -710,22 +777,35 @@ declare class CommonTreeTableComponent<T = any> implements OnChanges, DoCheck, A
710
777
  settingsClicked: boolean;
711
778
  checkBoxSelection: boolean;
712
779
  checkboxSelectionType: 'multiple' | 'single';
780
+ paginationRequired: boolean;
781
+ pageSizeList: number[];
782
+ totalRecords: number;
783
+ resetPage: boolean;
713
784
  isExpandable: (node: T, level: number, path: T[]) => boolean;
714
785
  rowOptionsResolver: (node: T, level: number, path: T[]) => CatsTreeRowOptions;
715
- nodeIconResolver: (node: T, level: number, path: T[]) => string | null;
786
+ nodeIconResolver: (node: T, level: number, path: T[], expanded: boolean) => string | null;
716
787
  linkResolver: (node: T, level: number, path: T[]) => string | null;
788
+ showSkeleton: boolean;
717
789
  nodeToggle: EventEmitter<CatsTreeExpandEvent<T>>;
718
790
  selectionChange: EventEmitter<CatsTreeSelectionChangeEvent<T>>;
719
791
  linkClick: EventEmitter<CatsTreeLinkClickEvent<T>>;
792
+ linkDoubleClick: EventEmitter<CatsTreeLinkClickEvent<T>>;
720
793
  onHideSettings: EventEmitter<any>;
794
+ onPaginationChange: EventEmitter<any>;
795
+ onColConfigChange: EventEmitter<any>;
796
+ dateConfig: DateConfig;
721
797
  protected rows: RowView<T>[];
798
+ private linkClickTimer;
799
+ private linkClickDelay;
800
+ pageDetails: any;
801
+ recordsToShow: any;
722
802
  sortingColumnIndex: number | null;
723
803
  sortingType: {
724
804
  [key: number]: string;
725
805
  };
726
806
  filteredData: T[];
727
807
  originalRowData: T[];
728
- activeFilters: Map<string, any>;
808
+ activeFilters: Set<any>;
729
809
  appliedFilters: any[];
730
810
  menuVisible: boolean[];
731
811
  dragOverIndex: number | null;
@@ -746,11 +826,18 @@ declare class CommonTreeTableComponent<T = any> implements OnChanges, DoCheck, A
746
826
  atLeastOneColumnChecked: boolean;
747
827
  selectedRow: T[];
748
828
  originalColumns: CatsTreeTableColumn[];
829
+ originalCategorizedCols: any;
830
+ originalNoCategoryCols: any[];
831
+ skeletonRowsLength: number;
832
+ skeletonColsLength: number;
833
+ skeletonRows: any;
834
+ skeletonCols: any;
749
835
  private removeMouseMove;
750
836
  private removeMouseUp;
751
837
  private rafId;
752
838
  private removeDragOver;
753
839
  private removeDrop;
840
+ private originalExpandedKeys;
754
841
  filterOptions: {
755
842
  label: string;
756
843
  value: string;
@@ -764,11 +851,35 @@ declare class CommonTreeTableComponent<T = any> implements OnChanges, DoCheck, A
764
851
  private fallbackKey;
765
852
  private fallbackSeq;
766
853
  private resolvedTreeColumnField?;
854
+ activeColumns: CatsTreeTableColumn[];
855
+ categorizedCols: any;
856
+ noCategoryCols: any[];
857
+ objectKeys: {
858
+ (o: object): string[];
859
+ (o: {}): string[];
860
+ };
861
+ allActiveDefault: boolean;
862
+ allActiveColMap: Record<string, boolean>;
767
863
  constructor(renderer: Renderer2, zone: NgZone, cd: ChangeDetectorRef);
768
864
  ngAfterViewInit(): void;
769
865
  ngOnDestroy(): void;
866
+ getUpdatedColDefs(colDefs: any[]): any[];
867
+ cloneColDefs(colDefs: any[]): any[];
868
+ resetDefaultColConfig(): void;
869
+ normalizeSetFilterType(value: any, key: string): any[] | undefined;
770
870
  ngOnChanges(changes: SimpleChanges): void;
771
871
  ngDoCheck(): void;
872
+ getColConfigCategory(colDefs: any[]): {
873
+ categorized: Record<string, any[]>;
874
+ noCategory: any[];
875
+ };
876
+ onColConfigSearch(event: any): void;
877
+ showAllDefaultSelection(): void;
878
+ rebuildView(): void;
879
+ showAllCategorySelection(category: string): void;
880
+ toggleSelectedCol(col: any): void;
881
+ updateGlobalState(): void;
882
+ getActiveCols(): void;
772
883
  protected get treeColumn(): CatsTreeTableColumn;
773
884
  /**
774
885
  * Initialize column properties for filtering, sorting, and customization
@@ -790,10 +901,10 @@ declare class CommonTreeTableComponent<T = any> implements OnChanges, DoCheck, A
790
901
  * Apply sorting to the row data
791
902
  */
792
903
  private applySort;
793
- /**
794
- * Apply all active filters
795
- */
796
- applyAllFilters(): void;
904
+ applyAllFilters(col?: any): void;
905
+ private filterTreeByColumn;
906
+ private matchesSingleColumn;
907
+ private expandAllParentsAfterFilter;
797
908
  /**
798
909
  * Evaluate text filter condition
799
910
  */
@@ -885,7 +996,27 @@ declare class CommonTreeTableComponent<T = any> implements OnChanges, DoCheck, A
885
996
  */
886
997
  protected openMenu(event: MouseEvent, col: CatsTreeTableColumn, index: number): void;
887
998
  /**
888
- * On header checkbox change
999
+ * Recursively select all children of a node
1000
+ */
1001
+ private selectAllChildren;
1002
+ /**
1003
+ * Recursively deselect all children of a node
1004
+ */
1005
+ private deselectAllChildren;
1006
+ /**
1007
+ * Recursively select all nodes in the tree
1008
+ */
1009
+ private selectAllNodes;
1010
+ /**
1011
+ * Recursively deselect all nodes in the tree
1012
+ */
1013
+ private deselectAllNodes;
1014
+ /**
1015
+ * Update parent node selection based on children state
1016
+ */
1017
+ private updateParentSelection;
1018
+ /**
1019
+ * On header checkbox change - select all nodes hierarchically
889
1020
  */
890
1021
  protected onHeaderCheckboxChange(event: any): void;
891
1022
  /**
@@ -904,11 +1035,31 @@ declare class CommonTreeTableComponent<T = any> implements OnChanges, DoCheck, A
904
1035
  * Check if row is selected
905
1036
  */
906
1037
  protected isRowSelected(node: T): boolean;
1038
+ /**
1039
+ * Check if a node has indeterminate selection state (some but not all children selected)
1040
+ */
1041
+ protected isNodeIndeterminate(node: T): boolean;
1042
+ /**
1043
+ * Check header checkbox indeterminate state
1044
+ */
1045
+ protected checkHeaderIndeterminate(): boolean;
1046
+ /**
1047
+ * Check if header checkbox should be checked
1048
+ */
1049
+ protected checkHeaderChecked(): boolean;
907
1050
  protected toggle(node: T, level: number, path: T[]): void;
1051
+ /**
1052
+ * Recursively collapse all children of a node
1053
+ */
1054
+ private collapseAllChildren;
908
1055
  protected isExpanded(node: T): boolean;
1056
+ protected showExpandAllControl(col: CatsTreeTableColumn): boolean;
1057
+ protected toggleAllNodes(): void;
1058
+ protected allNodesExpanded(): boolean;
909
1059
  protected onCheckboxChange(node: T, level: number, path: T[], checked: boolean): void;
910
1060
  protected isChecked(node: T): boolean;
911
- protected onLinkClicked(e: MouseEvent, node: T, level: number, path: T[]): void;
1061
+ protected onLinkClicked(e: MouseEvent, node: T, level: number, path: T[], col: CatsTreeTableColumn): void;
1062
+ protected onLinkDoubleClicked(e: MouseEvent, node: T, level: number, path: T[], col: CatsTreeTableColumn): void;
912
1063
  protected resolveIconSrc(icon: string | null): string | null;
913
1064
  protected getValue(node: T, fieldPath: string): any;
914
1065
  protected isNodeRow(row: RowView<T>): boolean;
@@ -922,7 +1073,52 @@ declare class CommonTreeTableComponent<T = any> implements OnChanges, DoCheck, A
922
1073
  protected toggleIconFor(row: RowView<T>): string;
923
1074
  protected nodeIconFor(row: RowView<T>): string | null;
924
1075
  protected linkUrlFor(row: RowView<T>): string | null;
1076
+ /**
1077
+ * Set page count based on total records and page size
1078
+ */
1079
+ protected setPageCount(): void;
1080
+ /**
1081
+ * On page size changed
1082
+ */
1083
+ protected onPageSizeChanged(event: any): void;
1084
+ /**
1085
+ * On first button click
1086
+ */
1087
+ protected onBtFirstClick(): void;
1088
+ /**
1089
+ * On previous button click
1090
+ */
1091
+ protected onBtPrevClick(): void;
1092
+ /**
1093
+ * On next button click
1094
+ */
1095
+ protected onBtNextClick(): void;
1096
+ /**
1097
+ * On last button click
1098
+ */
1099
+ protected onBtLastClick(): void;
1100
+ /**
1101
+ * Go to selected page
1102
+ */
1103
+ protected goToSelectedPage(event: any): void;
1104
+ /**
1105
+ * @description method to reset table configuration
1106
+ * @author Tarun Kumar
1107
+ * @param none
1108
+ * @returns void
1109
+ */
1110
+ resetPagination(): void;
1111
+ /**
1112
+ * Convert to number
1113
+ */
1114
+ protected convertToNumber(val: any): number;
925
1115
  private getChildren;
1116
+ private applyExpandAllInputState;
1117
+ private setAllNodesExpandedState;
1118
+ private collectExpandableNodeKeys;
1119
+ private areAllExpandableNodesExpanded;
1120
+ private hasExpandableNodes;
1121
+ private syncOriginalExpandedKeys;
926
1122
  private rebuildRows;
927
1123
  private walk;
928
1124
  private getNodeKey;
@@ -951,9 +1147,127 @@ declare class CommonTreeTableComponent<T = any> implements OnChanges, DoCheck, A
951
1147
  * Save column state
952
1148
  */
953
1149
  private saveColumnState;
1150
+ /**
1151
+ * Returns filtered hierarchy based on column filters with AND/OR logic, including number filter support
1152
+ */
1153
+ getFilteredHierarchy(): T[];
1154
+ /**
1155
+ * Evaluate number filter condition
1156
+ */
1157
+ private evaluateNumberFilterCondition;
1158
+ dateTimeSelected(date: any): void;
1159
+ /**
1160
+ * @description
1161
+ * Checks whether all options inside a Set Filter are currently selected.
1162
+ * @author Anand Pandey
1163
+ * @param col - Column definition object
1164
+ * @returns boolean - TRUE if all options are selected, otherwise FALSE.
1165
+ */
1166
+ isAllSelected(col: any): boolean;
1167
+ /**
1168
+ * @description * Selects or deselects all checkbox options in the Set Filter.
1169
+ * @author Anand Pandey
1170
+ * @param col - Column definition object
1171
+ * @param event - Checkbox change event
1172
+ * @returns void
1173
+ */
1174
+ toggleSelectAll(col: any, event: any): void;
954
1175
  static ɵfac: i0.ɵɵFactoryDeclaration<CommonTreeTableComponent<any>, never>;
955
- static ɵcmp: i0.ɵɵComponentDeclaration<CommonTreeTableComponent<any>, "cats-tree-table", never, { "data": { "alias": "data"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "idField": { "alias": "idField"; "required": false; }; "labelField": { "alias": "labelField"; "required": false; }; "childrenField": { "alias": "childrenField"; "required": false; }; "treeColumnField": { "alias": "treeColumnField"; "required": false; }; "indentPx": { "alias": "indentPx"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "expandIcon": { "alias": "expandIcon"; "required": false; }; "collapseIcon": { "alias": "collapseIcon"; "required": false; }; "iconBasePath": { "alias": "iconBasePath"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; "showNodeIcon": { "alias": "showNodeIcon"; "required": false; }; "noDataText": { "alias": "noDataText"; "required": false; }; "loadingText": { "alias": "loadingText"; "required": false; }; "emitExpandAlways": { "alias": "emitExpandAlways"; "required": false; }; "sortingRequired": { "alias": "sortingRequired"; "required": false; }; "filterRequired": { "alias": "filterRequired"; "required": false; }; "threeDotsMenuRequired": { "alias": "threeDotsMenuRequired"; "required": false; }; "settingsRequired": { "alias": "settingsRequired"; "required": false; }; "settingsClicked": { "alias": "settingsClicked"; "required": false; }; "checkBoxSelection": { "alias": "checkBoxSelection"; "required": false; }; "checkboxSelectionType": { "alias": "checkboxSelectionType"; "required": false; }; "isExpandable": { "alias": "isExpandable"; "required": false; }; "rowOptionsResolver": { "alias": "rowOptionsResolver"; "required": false; }; "nodeIconResolver": { "alias": "nodeIconResolver"; "required": false; }; "linkResolver": { "alias": "linkResolver"; "required": false; }; }, { "nodeToggle": "nodeToggle"; "selectionChange": "selectionChange"; "linkClick": "linkClick"; "onHideSettings": "onHideSettings"; }, never, never, true, never>;
1176
+ static ɵcmp: i0.ɵɵComponentDeclaration<CommonTreeTableComponent<any>, "cats-tree-table", never, { "data": { "alias": "data"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "tableOptions": { "alias": "tableOptions"; "required": false; }; "idField": { "alias": "idField"; "required": false; }; "labelField": { "alias": "labelField"; "required": false; }; "childrenField": { "alias": "childrenField"; "required": false; }; "treeColumnField": { "alias": "treeColumnField"; "required": false; }; "indentPx": { "alias": "indentPx"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "expandIcon": { "alias": "expandIcon"; "required": false; }; "collapseIcon": { "alias": "collapseIcon"; "required": false; }; "iconBasePath": { "alias": "iconBasePath"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; "showNodeIcon": { "alias": "showNodeIcon"; "required": false; }; "noDataText": { "alias": "noDataText"; "required": false; }; "loadingText": { "alias": "loadingText"; "required": false; }; "expandAllNodes": { "alias": "expandAllNodes"; "required": false; }; "emitExpandAlways": { "alias": "emitExpandAlways"; "required": false; }; "sortingRequired": { "alias": "sortingRequired"; "required": false; }; "filterRequired": { "alias": "filterRequired"; "required": false; }; "threeDotsMenuRequired": { "alias": "threeDotsMenuRequired"; "required": false; }; "settingsRequired": { "alias": "settingsRequired"; "required": false; }; "settingsClicked": { "alias": "settingsClicked"; "required": false; }; "checkBoxSelection": { "alias": "checkBoxSelection"; "required": false; }; "checkboxSelectionType": { "alias": "checkboxSelectionType"; "required": false; }; "paginationRequired": { "alias": "paginationRequired"; "required": false; }; "pageSizeList": { "alias": "pageSizeList"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "resetPage": { "alias": "resetPage"; "required": false; }; "isExpandable": { "alias": "isExpandable"; "required": false; }; "rowOptionsResolver": { "alias": "rowOptionsResolver"; "required": false; }; "nodeIconResolver": { "alias": "nodeIconResolver"; "required": false; }; "linkResolver": { "alias": "linkResolver"; "required": false; }; "showSkeleton": { "alias": "showSkeleton"; "required": false; }; "skeletonRowsLength": { "alias": "skeletonRowsLength"; "required": false; }; "skeletonColsLength": { "alias": "skeletonColsLength"; "required": false; }; }, { "nodeToggle": "nodeToggle"; "selectionChange": "selectionChange"; "linkClick": "linkClick"; "linkDoubleClick": "linkDoubleClick"; "onHideSettings": "onHideSettings"; "onPaginationChange": "onPaginationChange"; "onColConfigChange": "onColConfigChange"; }, never, never, true, never>;
1177
+ }
1178
+
1179
+ type TooltipPosition = 'top' | 'bottom' | 'left' | 'right' | 'adaptive';
1180
+ declare class TooltipDirective implements OnInit, OnDestroy {
1181
+ private elementRef;
1182
+ private renderer;
1183
+ private appRef;
1184
+ private injector;
1185
+ private ngZone;
1186
+ content: string;
1187
+ tooltipPosition: TooltipPosition;
1188
+ tooltipDelay: number;
1189
+ tooltipBgColor: string;
1190
+ tooltipTextColor: string;
1191
+ tooltipPadding: string;
1192
+ tooltipFontSize: string;
1193
+ tooltipBorderRadius: string;
1194
+ tooltipMaxWidth: string;
1195
+ followCursor: boolean;
1196
+ tooltipParentContainer: HTMLElement | null;
1197
+ private tooltipElement;
1198
+ private showTimeout;
1199
+ private elementRect;
1200
+ private currentPosition;
1201
+ private componentRef;
1202
+ private cursorX;
1203
+ private cursorY;
1204
+ private isTooltipShown;
1205
+ constructor(elementRef: ElementRef<HTMLElement>, renderer: Renderer2, appRef: ApplicationRef, injector: Injector, ngZone: NgZone);
1206
+ ngOnInit(): void;
1207
+ onMouseEnter(event: MouseEvent): void;
1208
+ onMouseLeave(): void;
1209
+ onMouseMove(event: MouseEvent): void;
1210
+ private show;
1211
+ private calculateAdaptivePosition;
1212
+ private findParentContainer;
1213
+ private positionTooltip;
1214
+ private hide;
1215
+ ngOnDestroy(): void;
1216
+ static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, never>;
1217
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[appTooltip]", never, { "content": { "alias": "appTooltip"; "required": false; }; "tooltipPosition": { "alias": "tooltipPosition"; "required": false; }; "tooltipDelay": { "alias": "tooltipDelay"; "required": false; }; "tooltipBgColor": { "alias": "tooltipBgColor"; "required": false; }; "tooltipTextColor": { "alias": "tooltipTextColor"; "required": false; }; "tooltipPadding": { "alias": "tooltipPadding"; "required": false; }; "tooltipFontSize": { "alias": "tooltipFontSize"; "required": false; }; "tooltipBorderRadius": { "alias": "tooltipBorderRadius"; "required": false; }; "tooltipMaxWidth": { "alias": "tooltipMaxWidth"; "required": false; }; "followCursor": { "alias": "followCursor"; "required": false; }; "tooltipParentContainer": { "alias": "tooltipParentContainer"; "required": false; }; }, {}, never, never, true, never>;
1218
+ }
1219
+
1220
+ declare class TooltipComponent {
1221
+ content: string;
1222
+ position: TooltipPosition;
1223
+ bgColor: string;
1224
+ textColor: string;
1225
+ padding: string;
1226
+ fontSize: string;
1227
+ borderRadius: string;
1228
+ maxWidth: string;
1229
+ get styleObj(): {
1230
+ 'background-color': string;
1231
+ color: string;
1232
+ padding: string;
1233
+ 'font-size': string;
1234
+ 'border-radius': string;
1235
+ 'max-width': string;
1236
+ };
1237
+ static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
1238
+ static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "app-tooltip", never, { "content": { "alias": "content"; "required": false; }; "position": { "alias": "position"; "required": false; }; "bgColor": { "alias": "bgColor"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "fontSize": { "alias": "fontSize"; "required": false; }; "borderRadius": { "alias": "borderRadius"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; }, {}, never, never, true, never>;
1239
+ }
1240
+
1241
+ declare class AdaptivePositionDirective implements AfterViewInit, OnDestroy {
1242
+ private host;
1243
+ dropdown: HTMLElement;
1244
+ trigger: HTMLElement;
1245
+ parentContainer: HTMLElement;
1246
+ matchWidth: boolean;
1247
+ closeOnOutside: boolean;
1248
+ isAction: boolean;
1249
+ isColumnActionMenu: boolean;
1250
+ resizeObserver: ResizeObserver;
1251
+ isOpen: boolean;
1252
+ menuItems: HTMLElement[];
1253
+ focusedIndex: number;
1254
+ constructor(host: ElementRef);
1255
+ ngAfterViewInit(): void;
1256
+ open(): void;
1257
+ close(): void;
1258
+ positionDropdown(): void;
1259
+ handleKeys(e: KeyboardEvent): void;
1260
+ moveFocus(delta: number): void;
1261
+ focusItem(index: number): void;
1262
+ selectFocused(): void;
1263
+ prepareItems(): void;
1264
+ handleOutsideClick: (e: Event) => void;
1265
+ setupBaseStyles(): void;
1266
+ observeResize(): void;
1267
+ ngOnDestroy(): void;
1268
+ static ɵfac: i0.ɵɵFactoryDeclaration<AdaptivePositionDirective, never>;
1269
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AdaptivePositionDirective, "[adaptivePosition]", never, { "dropdown": { "alias": "adaptive"; "required": false; }; "trigger": { "alias": "trigger"; "required": false; }; "parentContainer": { "alias": "parentContainer"; "required": false; }; "matchWidth": { "alias": "matchWidth"; "required": false; }; "closeOnOutside": { "alias": "closeOnOutside"; "required": false; }; "isAction": { "alias": "isAction"; "required": false; }; "isColumnActionMenu": { "alias": "isColumnActionMenu"; "required": false; }; }, {}, never, never, true, never>;
956
1270
  }
957
1271
 
958
- export { CatsDataGridComponent, CatsDataGridService, ColDefs, CommonRendererComponent, CommonTreeTableComponent };
959
- export type { CatsTreeExpandEvent, CatsTreeLinkClickEvent, CatsTreeRowOptions, CatsTreeSelectionChangeEvent, CatsTreeTableColumn, ColumnFilter, FilterCondition, TreeFilterCondition };
1272
+ export { AdaptivePositionDirective, CatsDataGridComponent, CatsDataGridService, ColDefs, CommonRendererComponent, CommonTreeTableComponent, TooltipComponent, TooltipDirective };
1273
+ export type { CatsTreeExpandEvent, CatsTreeLinkClickEvent, CatsTreeRowOptions, CatsTreeSelectionChangeEvent, CatsTreeTableColumn, ColumnFilter, FilterCondition, TooltipPosition, TreeFilterCondition };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cats-data-grid",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "peerDependencies": {
5
5
  "@angular/core": ">=18 <22",
6
6
  "@angular/common": ">=18 <22"