cats-data-grid 2.0.53 → 2.0.55

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
@@ -51,6 +51,7 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
51
51
  settingsRequired: boolean;
52
52
  settingsClicked: boolean;
53
53
  resetPage: boolean;
54
+ rowId: any;
54
55
  showDropdown: boolean;
55
56
  height: number;
56
57
  groupByRequired: boolean;
@@ -109,6 +110,9 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
109
110
  activeGroupsEvent: EventEmitter<any[]>;
110
111
  dynamicGroupingFiltering: boolean;
111
112
  atLeastOneColumnChecked: boolean;
113
+ draggedRowData: any;
114
+ firstCol: any;
115
+ isRowSelected: boolean;
112
116
  constructor(renderer: Renderer2, zone: NgZone, cd: ChangeDetectorRef);
113
117
  ngOnInit(): void;
114
118
  ngOnChanges(changes: SimpleChanges): void;
@@ -456,8 +460,13 @@ declare class CatsDataGridComponent implements OnChanges, OnInit {
456
460
  dateTimeSelected(date: any): void;
457
461
  convertToNumber(value: number | string): number;
458
462
  hideSettings(): void;
463
+ dragRow(e: Event, row: any): void;
464
+ allowRowDrop(e: Event): void;
465
+ dropRow(targetRow: any): void;
466
+ moveRow(from: number, to: number): void;
467
+ clearAllFilter(): void;
459
468
  static ɵfac: i0.ɵɵFactoryDeclaration<CatsDataGridComponent, never>;
460
- 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; }; "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; }; "dynamicGroupingFiltering": { "alias": "dynamicGroupingFiltering"; "required": false; }; }, { "onPaginationChange": "onPaginationChange"; "onCheckboxSelection": "onCheckboxSelection"; "onScrollEmitter": "onScrollEmitter"; "filter": "filter"; "onHideSettings": "onHideSettings"; "appliedFiltersEvent": "appliedFiltersEvent"; "activeGroupsEvent": "activeGroupsEvent"; }, never, never, true, never>;
469
+ 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; }; "dynamicGroupingFiltering": { "alias": "dynamicGroupingFiltering"; "required": false; }; }, { "onPaginationChange": "onPaginationChange"; "onCheckboxSelection": "onCheckboxSelection"; "onScrollEmitter": "onScrollEmitter"; "filter": "filter"; "onHideSettings": "onHideSettings"; "appliedFiltersEvent": "appliedFiltersEvent"; "activeGroupsEvent": "activeGroupsEvent"; }, never, never, true, never>;
461
470
  }
462
471
 
463
472
  declare class CommonRendererComponent {
@@ -466,6 +475,8 @@ declare class CommonRendererComponent {
466
475
  private static _activeTagId;
467
476
  activeRowId: i0.WritableSignal<number | null>;
468
477
  activeTagId: i0.WritableSignal<string | null>;
478
+ clickTimer: any;
479
+ clickDelay: number;
469
480
  maxVisible: number;
470
481
  cellInit(params: any, data: any): void;
471
482
  /**
@@ -540,19 +551,13 @@ declare class CommonRendererComponent {
540
551
  * @author Anand Pandey
541
552
  * @returns {string[]}
542
553
  */
543
- get allTags(): {
544
- tagValue: any;
545
- class: any;
546
- }[];
554
+ get allTags(): any;
547
555
  /**
548
556
  * @description Returns the subset of tags that should be visibly displayed in the UI based on maxVisible count.
549
557
  * @author Anand Pandey
550
558
  * @returns {string[]}
551
559
  */
552
- get visibleTags(): {
553
- tagValue: any;
554
- class: any;
555
- }[];
560
+ get visibleTags(): any;
556
561
  /**
557
562
  * @description Returns the count of tags hidden behind the "+" more indicator.
558
563
  * @author Anand Pandey
@@ -579,6 +584,24 @@ declare class CommonRendererComponent {
579
584
  * @returns {void}
580
585
  */
581
586
  closeDropdown(event: MouseEvent): void;
587
+ /**
588
+ * @description Returns normalized link values derived from the cell `value`.
589
+ * Uses the configured `linkKey` from `cellParams` to extract display data
590
+ * @author Anand Pandey
591
+ * @returns {Array<{ linkValue: string; class: string }>} Normalized link values
592
+ */
593
+ get linkVal(): any;
594
+ /**
595
+ * @description Normalizes the component `value` into a consistent array structure.
596
+ * @author Anand Pandey
597
+ * @param {string} key Key in `cellParams` used to determine which field to read from object values
598
+ * @param {string} valueProp Property name assigned to the normalized output value
599
+ * @returns {Array<{ [key: string]: string; class: string }>} Array of normalized value objects
600
+ */
601
+ transformValue(key: string, valueProp: any): {
602
+ [valueProp]: any;
603
+ class: any;
604
+ }[];
582
605
  static ɵfac: i0.ɵɵFactoryDeclaration<CommonRendererComponent, never>;
583
606
  static ɵcmp: i0.ɵɵComponentDeclaration<CommonRendererComponent, "lib-common-renderer", never, {}, {}, never, never, true, never>;
584
607
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cats-data-grid",
3
- "version": "2.0.53",
3
+ "version": "2.0.55",
4
4
  "peerDependencies": {
5
5
  "@angular/core": ">=18 <22",
6
6
  "@angular/common": ">=18 <22"
@@ -1,3 +1,3 @@
1
- @forward "sass-utils";
2
- @forward "component";
3
- @forward "base";
1
+ @forward "sass-utils";
2
+ @forward "component";
3
+ @forward "base";
@@ -1,74 +1,74 @@
1
- // @use url("https://fonts.googleapis.com/css2?family=Rethink+Sans:ital,wght@0,400..800;1,400..800&display=swap");
2
-
3
- @use "../sass-utils" as *;
4
-
5
- :root {
6
- --fs-6: 6px;
7
- --fs-12: 12px;
8
- --fs-14: 14px;
9
- --fs-16: 16px;
10
- --fs-18: 18px;
11
- --fs-20: 20px;
12
- --fs-24: 24px;
13
- --fs-28: 28px;
14
- --fs-30: 30px;
15
- --fs-32: 32px;
16
- --fs-42: 42px;
17
- --fs-48: 48px;
18
- --img-w: 28px;
19
- --scale: 1;
20
- }
21
-
22
- @include width-range($tablet, $mediumDesktop) {
23
- :root {
24
- --scale: 1.5;
25
- --fs-6: calc(6px / var(--scale));
26
- --fs-12: calc(12px / var(--scale));
27
- --fs-14: calc(14px / var(--scale));
28
- --fs-16: calc(16px / var(--scale));
29
- --fs-18: calc(18px / var(--scale));
30
- --fs-20: calc(20px / var(--scale));
31
- --fs-24: calc(24px / var(--scale));
32
- --fs-28: calc(28px / var(--scale));
33
- --fs-30: calc(30px / var(--scale));
34
- --fs-32: calc(32px / var(--scale));
35
- --fs-42: calc(42px / var(--scale));
36
- --fs-48: calc(48px / var(--scale));
37
- }
38
- }
39
-
40
- @include width-range($largeDesktop, $extraLargeDesktop) {
41
- :root {
42
- --scale: 1.33;
43
- --fs-6: calc(6px / var(--scale));
44
- --fs-12: calc(12px / var(--scale));
45
- --fs-14: calc(14px / var(--scale));
46
- --fs-16: calc(16px / var(--scale));
47
- --fs-18: calc(18px / var(--scale));
48
- --fs-20: calc(20px / var(--scale));
49
- --fs-24: calc(24px / var(--scale));
50
- --fs-28: calc(28px / var(--scale));
51
- --fs-30: calc(30px / var(--scale));
52
- --fs-32: calc(32px / var(--scale));
53
- --fs-42: calc(42px / var(--scale));
54
- --fs-48: calc(48px / var(--scale));
55
- }
56
- }
57
-
58
- @include width-range($xxlargeDesktop, $ultraWideDesktop) {
59
- :root {
60
- --scale: 1.25;
61
- --fs-6: calc(6px / var(--scale));
62
- --fs-12: calc(12px / var(--scale));
63
- --fs-14: calc(14px / var(--scale));
64
- --fs-16: calc(16px / var(--scale));
65
- --fs-18: calc(18px / var(--scale));
66
- --fs-20: calc(20px / var(--scale));
67
- --fs-24: calc(24px / var(--scale));
68
- --fs-28: calc(28px / var(--scale));
69
- --fs-30: calc(30px / var(--scale));
70
- --fs-32: calc(32px / var(--scale));
71
- --fs-42: calc(42px / var(--scale));
72
- --fs-48: calc(48px / var(--scale));
73
- }
74
- }
1
+ // @use url("https://fonts.googleapis.com/css2?family=Rethink+Sans:ital,wght@0,400..800;1,400..800&display=swap");
2
+
3
+ @use "../sass-utils" as *;
4
+
5
+ :root {
6
+ --fs-6: 6px;
7
+ --fs-12: 12px;
8
+ --fs-14: 14px;
9
+ --fs-16: 16px;
10
+ --fs-18: 18px;
11
+ --fs-20: 20px;
12
+ --fs-24: 24px;
13
+ --fs-28: 28px;
14
+ --fs-30: 30px;
15
+ --fs-32: 32px;
16
+ --fs-42: 42px;
17
+ --fs-48: 48px;
18
+ --img-w: 28px;
19
+ --scale: 1;
20
+ }
21
+
22
+ @include width-range($tablet, $mediumDesktop) {
23
+ :root {
24
+ --scale: 1.5;
25
+ --fs-6: calc(6px / var(--scale));
26
+ --fs-12: calc(12px / var(--scale));
27
+ --fs-14: calc(14px / var(--scale));
28
+ --fs-16: calc(16px / var(--scale));
29
+ --fs-18: calc(18px / var(--scale));
30
+ --fs-20: calc(20px / var(--scale));
31
+ --fs-24: calc(24px / var(--scale));
32
+ --fs-28: calc(28px / var(--scale));
33
+ --fs-30: calc(30px / var(--scale));
34
+ --fs-32: calc(32px / var(--scale));
35
+ --fs-42: calc(42px / var(--scale));
36
+ --fs-48: calc(48px / var(--scale));
37
+ }
38
+ }
39
+
40
+ @include width-range($largeDesktop, $extraLargeDesktop) {
41
+ :root {
42
+ --scale: 1.33;
43
+ --fs-6: calc(6px / var(--scale));
44
+ --fs-12: calc(12px / var(--scale));
45
+ --fs-14: calc(14px / var(--scale));
46
+ --fs-16: calc(16px / var(--scale));
47
+ --fs-18: calc(18px / var(--scale));
48
+ --fs-20: calc(20px / var(--scale));
49
+ --fs-24: calc(24px / var(--scale));
50
+ --fs-28: calc(28px / var(--scale));
51
+ --fs-30: calc(30px / var(--scale));
52
+ --fs-32: calc(32px / var(--scale));
53
+ --fs-42: calc(42px / var(--scale));
54
+ --fs-48: calc(48px / var(--scale));
55
+ }
56
+ }
57
+
58
+ @include width-range($xxlargeDesktop, $ultraWideDesktop) {
59
+ :root {
60
+ --scale: 1.25;
61
+ --fs-6: calc(6px / var(--scale));
62
+ --fs-12: calc(12px / var(--scale));
63
+ --fs-14: calc(14px / var(--scale));
64
+ --fs-16: calc(16px / var(--scale));
65
+ --fs-18: calc(18px / var(--scale));
66
+ --fs-20: calc(20px / var(--scale));
67
+ --fs-24: calc(24px / var(--scale));
68
+ --fs-28: calc(28px / var(--scale));
69
+ --fs-30: calc(30px / var(--scale));
70
+ --fs-32: calc(32px / var(--scale));
71
+ --fs-42: calc(42px / var(--scale));
72
+ --fs-48: calc(48px / var(--scale));
73
+ }
74
+ }
@@ -1,2 +1,2 @@
1
- @forward "./reset";
1
+ @forward "./reset";
2
2
  @forward "./fonts";
@@ -1,60 +1,60 @@
1
- // Box Sizing
2
- *,
3
- *::before,
4
- *::after {
5
- box-sizing: border-box;
6
- margin: 0;
7
- padding: 0;
8
- // font-family: "Open Sans", sans-serif;
9
- }
10
-
11
- body {
12
- font-size: 100%;
13
- }
14
-
15
- // Font-inflation
16
- html {
17
- -moz-text-size-adjust: none;
18
- -webkit-text-size-adjust: none;
19
- -ms-text-size-adjust: none;
20
- text-size-adjust: none;
21
- }
22
-
23
- // Remove default margin and padding
24
- h1,
25
- h2,
26
- h3,
27
- h4,
28
- h5,
29
- h6,
30
- ul,
31
- ol,
32
- p {
33
- margin: 0;
34
- padding: 0;
35
- text-wrap: pretty;
36
- }
37
-
38
- // Remove list styles on ul, ol elements
39
- ul[role="list"],
40
- ol[role="list"] {
41
- list-style: none;
42
- }
43
-
44
- ul {
45
- list-style: none;
46
- }
47
-
48
- // images
49
- img,
50
- picture {
51
- max-width: 100%;
52
- display: block;
53
- }
54
-
55
- input,
56
- select,
57
- textarea {
58
- outline: none;
59
- box-shadow: none;
60
- }
1
+ // Box Sizing
2
+ *,
3
+ *::before,
4
+ *::after {
5
+ box-sizing: border-box;
6
+ margin: 0;
7
+ padding: 0;
8
+ // font-family: "Open Sans", sans-serif;
9
+ }
10
+
11
+ body {
12
+ font-size: 100%;
13
+ }
14
+
15
+ // Font-inflation
16
+ html {
17
+ -moz-text-size-adjust: none;
18
+ -webkit-text-size-adjust: none;
19
+ -ms-text-size-adjust: none;
20
+ text-size-adjust: none;
21
+ }
22
+
23
+ // Remove default margin and padding
24
+ h1,
25
+ h2,
26
+ h3,
27
+ h4,
28
+ h5,
29
+ h6,
30
+ ul,
31
+ ol,
32
+ p {
33
+ margin: 0;
34
+ padding: 0;
35
+ text-wrap: pretty;
36
+ }
37
+
38
+ // Remove list styles on ul, ol elements
39
+ ul[role="list"],
40
+ ol[role="list"] {
41
+ list-style: none;
42
+ }
43
+
44
+ ul {
45
+ list-style: none;
46
+ }
47
+
48
+ // images
49
+ img,
50
+ picture {
51
+ max-width: 100%;
52
+ display: block;
53
+ }
54
+
55
+ input,
56
+ select,
57
+ textarea {
58
+ outline: none;
59
+ box-shadow: none;
60
+ }