@cqa-lib/cqa-ui 0.1.1 → 1.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.
Files changed (121) hide show
  1. package/esm2020/lib/action-menu/action-menu.component.mjs +42 -0
  2. package/esm2020/lib/assets/images/image-assets.constants.mjs +28 -0
  3. package/esm2020/lib/badge/badge.component.mjs +141 -0
  4. package/esm2020/lib/button/button.component.mjs +232 -0
  5. package/esm2020/lib/column-visibility/column-visibility.component.mjs +69 -0
  6. package/esm2020/lib/dashboards/chart-card/chart-card.component.mjs +22 -0
  7. package/esm2020/lib/dashboards/coverage-module-card/coverage-module-card.component.mjs +104 -0
  8. package/esm2020/lib/dashboards/dashboard-header/dashboard-header.component.mjs +82 -0
  9. package/esm2020/lib/dashboards/failed-test-cases-card/failed-test-cases-card.component.mjs +60 -0
  10. package/esm2020/lib/dashboards/heat-error-map-cell/heat-error-map-cell.component.mjs +45 -0
  11. package/esm2020/lib/dashboards/insight-card/insight-card.component.mjs +201 -0
  12. package/esm2020/lib/dashboards/metrics-card/metrics-block.component.mjs +41 -0
  13. package/esm2020/lib/dashboards/metrics-card/metrics-card-item.interface.mjs +2 -0
  14. package/esm2020/lib/dashboards/metrics-card/metrics-card.component.mjs +62 -0
  15. package/esm2020/lib/dashboards/progress-text-card/progress-text-card.component.mjs +46 -0
  16. package/esm2020/lib/dashboards/test-distribution-card/test-distribution-card.component.mjs +35 -0
  17. package/esm2020/lib/dialog/dialog.component.mjs +127 -0
  18. package/esm2020/lib/dropdown-button/dropdown-button.component.mjs +189 -0
  19. package/esm2020/lib/dynamic-select/dynamic-select-field.component.mjs +160 -0
  20. package/esm2020/lib/empty-state/empty-state.component.mjs +37 -0
  21. package/esm2020/lib/filters/dynamic-filter/dynamic-filter.component.mjs +239 -0
  22. package/esm2020/lib/full-table-loader/full-table-loader.component.mjs +16 -0
  23. package/esm2020/lib/inline-sort/inline-sort.component.mjs +58 -0
  24. package/esm2020/lib/other-button/other-button.component.mjs +76 -0
  25. package/esm2020/lib/pagination/pagination.component.mjs +102 -0
  26. package/{dist/cqa-ui/esm2020 → esm2020}/lib/search-bar/search-bar.component.mjs +3 -3
  27. package/{dist/cqa-ui/esm2020 → esm2020}/lib/segment-control/segment-control.component.mjs +3 -3
  28. package/esm2020/lib/selected-filters/selected-filters.component.mjs +27 -0
  29. package/esm2020/lib/table/dynamic-table/dynamic-cell.directive.mjs +35 -0
  30. package/esm2020/lib/table/dynamic-table/dynamic-table.component.mjs +258 -0
  31. package/esm2020/lib/table-action-toolbar/table-action-toolbar.component.mjs +52 -0
  32. package/esm2020/lib/table-data-loader/table-data-loader.component.mjs +19 -0
  33. package/esm2020/lib/templates/table-template.component.mjs +365 -0
  34. package/esm2020/lib/ui-kit.module.mjs +248 -0
  35. package/esm2020/lib/utils/metadata-colors.util.mjs +100 -0
  36. package/esm2020/lib/utils/tw-overlay-container.mjs +22 -0
  37. package/esm2020/public-api.mjs +38 -0
  38. package/fesm2015/cqa-lib-cqa-ui.mjs +3661 -0
  39. package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -0
  40. package/fesm2020/cqa-lib-cqa-ui.mjs +3615 -0
  41. package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -0
  42. package/lib/action-menu/action-menu.component.d.ts +17 -0
  43. package/lib/assets/images/image-assets.constants.d.ts +20 -0
  44. package/lib/badge/badge.component.d.ts +25 -0
  45. package/{dist/cqa-ui/lib → lib}/button/button.component.d.ts +6 -5
  46. package/lib/column-visibility/column-visibility.component.d.ts +33 -0
  47. package/lib/dashboards/chart-card/chart-card.component.d.ts +8 -0
  48. package/lib/dashboards/coverage-module-card/coverage-module-card.component.d.ts +44 -0
  49. package/lib/dashboards/dashboard-header/dashboard-header.component.d.ts +30 -0
  50. package/lib/dashboards/failed-test-cases-card/failed-test-cases-card.component.d.ts +28 -0
  51. package/lib/dashboards/heat-error-map-cell/heat-error-map-cell.component.d.ts +14 -0
  52. package/lib/dashboards/insight-card/insight-card.component.d.ts +73 -0
  53. package/lib/dashboards/metrics-card/metrics-block.component.d.ts +12 -0
  54. package/lib/dashboards/metrics-card/metrics-card-item.interface.d.ts +12 -0
  55. package/lib/dashboards/metrics-card/metrics-card.component.d.ts +17 -0
  56. package/lib/dashboards/progress-text-card/progress-text-card.component.d.ts +13 -0
  57. package/lib/dashboards/test-distribution-card/test-distribution-card.component.d.ts +29 -0
  58. package/lib/dropdown-button/dropdown-button.component.d.ts +32 -0
  59. package/lib/dynamic-select/dynamic-select-field.component.d.ts +43 -0
  60. package/lib/empty-state/empty-state.component.d.ts +20 -0
  61. package/lib/filters/dynamic-filter/dynamic-filter.component.d.ts +56 -0
  62. package/lib/full-table-loader/full-table-loader.component.d.ts +6 -0
  63. package/lib/inline-sort/inline-sort.component.d.ts +12 -0
  64. package/lib/other-button/other-button.component.d.ts +37 -0
  65. package/lib/pagination/pagination.component.d.ts +37 -0
  66. package/lib/selected-filters/selected-filters.component.d.ts +17 -0
  67. package/lib/table/dynamic-table/dynamic-cell.directive.d.ts +16 -0
  68. package/lib/table/dynamic-table/dynamic-table.component.d.ts +72 -0
  69. package/lib/table-action-toolbar/table-action-toolbar.component.d.ts +34 -0
  70. package/lib/table-data-loader/table-data-loader.component.d.ts +7 -0
  71. package/lib/templates/table-template.component.d.ts +90 -0
  72. package/lib/ui-kit.module.d.ts +52 -0
  73. package/lib/utils/metadata-colors.util.d.ts +50 -0
  74. package/lib/utils/tw-overlay-container.d.ts +12 -0
  75. package/package.json +23 -49
  76. package/public-api.d.ts +37 -0
  77. package/src/lib/assets/images/.gitkeep +0 -0
  78. package/src/lib/assets/images/DashboardIcon.png +0 -0
  79. package/src/lib/assets/images/FilesIcon.png +0 -0
  80. package/src/lib/assets/images/README.md +66 -0
  81. package/src/lib/assets/images/ReportsIcon.png +0 -0
  82. package/src/lib/assets/images/SearchIcon.png +0 -0
  83. package/src/lib/assets/images/StepsIcon.png +0 -0
  84. package/src/lib/assets/images/TestCaseIcon.png +0 -0
  85. package/src/lib/assets/images/analytics-chart-icon.svg +11 -0
  86. package/src/lib/assets/images/checklist-add-icon.svg +10 -0
  87. package/src/lib/assets/images/document-gear-icon.svg +9 -0
  88. package/src/lib/assets/images/empty-state-default-icon.svg +8 -0
  89. package/src/lib/assets/images/image-assets.constants.ts +38 -0
  90. package/src/lib/assets/images/search-debug-icon.svg +8 -0
  91. package/src/lib/assets/images/test-case-icon.svg +9 -0
  92. package/src/lib/assets/images/upload-folder-icon.svg +7 -0
  93. package/src/lib/utils/metadata-colors.constants.js +33 -0
  94. package/storybook-static/assets/images/README.md +66 -0
  95. package/styles.css +1 -0
  96. package/dist/cqa-ui/README.md +0 -226
  97. package/dist/cqa-ui/esm2020/lib/button/button.component.mjs +0 -257
  98. package/dist/cqa-ui/esm2020/lib/dialog/dialog.component.mjs +0 -127
  99. package/dist/cqa-ui/esm2020/lib/ui-kit.module.mjs +0 -69
  100. package/dist/cqa-ui/esm2020/public-api.mjs +0 -10
  101. package/dist/cqa-ui/fesm2015/cqa-lib-cqa-ui.mjs +0 -895
  102. package/dist/cqa-ui/fesm2015/cqa-lib-cqa-ui.mjs.map +0 -1
  103. package/dist/cqa-ui/fesm2020/cqa-lib-cqa-ui.mjs +0 -881
  104. package/dist/cqa-ui/fesm2020/cqa-lib-cqa-ui.mjs.map +0 -1
  105. package/dist/cqa-ui/lib/ui-kit.module.d.ts +0 -15
  106. package/dist/cqa-ui/package.json +0 -56
  107. package/dist/cqa-ui/public-api.d.ts +0 -9
  108. package/dist/cqa-ui/styles.css +0 -1
  109. /package/{dist/cqa-ui/cqa-lib-cqa-ui.d.ts → cqa-lib-cqa-ui.d.ts} +0 -0
  110. /package/{dist/cqa-ui/esm2020 → esm2020}/cqa-lib-cqa-ui.mjs +0 -0
  111. /package/{dist/cqa-ui/esm2020 → esm2020}/lib/dialog/dialog-ref.mjs +0 -0
  112. /package/{dist/cqa-ui/esm2020 → esm2020}/lib/dialog/dialog.models.mjs +0 -0
  113. /package/{dist/cqa-ui/esm2020 → esm2020}/lib/dialog/dialog.service.mjs +0 -0
  114. /package/{dist/cqa-ui/esm2020 → esm2020}/lib/dialog/dialog.tokens.mjs +0 -0
  115. /package/{dist/cqa-ui/lib → lib}/dialog/dialog-ref.d.ts +0 -0
  116. /package/{dist/cqa-ui/lib → lib}/dialog/dialog.component.d.ts +0 -0
  117. /package/{dist/cqa-ui/lib → lib}/dialog/dialog.models.d.ts +0 -0
  118. /package/{dist/cqa-ui/lib → lib}/dialog/dialog.service.d.ts +0 -0
  119. /package/{dist/cqa-ui/lib → lib}/dialog/dialog.tokens.d.ts +0 -0
  120. /package/{dist/cqa-ui/lib → lib}/search-bar/search-bar.component.d.ts +0 -0
  121. /package/{dist/cqa-ui/lib → lib}/segment-control/segment-control.component.d.ts +0 -0
@@ -0,0 +1,37 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface PaginationChange {
4
+ pageIndex: number;
5
+ pageSize: number;
6
+ }
7
+ export declare class PaginationComponent {
8
+ totalElements: number;
9
+ totalPages?: number | null;
10
+ pageIndex: number;
11
+ pageSize: number;
12
+ pageItemCount: number;
13
+ pageSizeOptions: number[];
14
+ pageIndexChange: EventEmitter<number>;
15
+ pageSizeChange: EventEmitter<number>;
16
+ paginate: EventEmitter<PaginationChange>;
17
+ pageSizeOpen: boolean;
18
+ pagesOption: {
19
+ placeholder: string;
20
+ disabled: boolean;
21
+ multiple: boolean;
22
+ searchable: boolean;
23
+ options: {
24
+ id: number;
25
+ name: string;
26
+ }[];
27
+ };
28
+ get computedTotalPages(): number;
29
+ getStartItem(): number;
30
+ getEndItem(): number;
31
+ togglePageSizeMenu(): void;
32
+ selectPageSize(size: number): void;
33
+ onPageSizeChange(): void;
34
+ goToPage(index: number): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "cqa-pagination", never, { "totalElements": "totalElements"; "totalPages": "totalPages"; "pageIndex": "pageIndex"; "pageSize": "pageSize"; "pageItemCount": "pageItemCount"; "pageSizeOptions": "pageSizeOptions"; }, { "pageIndexChange": "pageIndexChange"; "pageSizeChange": "pageSizeChange"; "paginate": "paginate"; }, never, never>;
37
+ }
@@ -0,0 +1,17 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface SelectedFilterChip {
4
+ key?: string;
5
+ label?: string;
6
+ text: string;
7
+ fullText?: string;
8
+ hasMore?: boolean;
9
+ }
10
+ export declare class SelectedFiltersComponent {
11
+ filterApplied: boolean;
12
+ chips: SelectedFilterChip[];
13
+ removeChip: EventEmitter<SelectedFilterChip>;
14
+ clearAll: EventEmitter<void>;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectedFiltersComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectedFiltersComponent, "cqa-selected-filters", never, { "filterApplied": "filterApplied"; "chips": "chips"; }, { "removeChip": "removeChip"; "clearAll": "clearAll"; }, never, never>;
17
+ }
@@ -0,0 +1,16 @@
1
+ import { TemplateRef } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class DynamicCellTemplateDirective {
4
+ template: TemplateRef<any>;
5
+ name: string;
6
+ constructor(template: TemplateRef<any>);
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicCellTemplateDirective, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicCellTemplateDirective, "ng-template[dynamicCell]", never, { "name": "dynamicCell"; }, {}, never>;
9
+ }
10
+ export declare class DynamicHeaderTemplateDirective {
11
+ template: TemplateRef<any>;
12
+ name: string;
13
+ constructor(template: TemplateRef<any>);
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicHeaderTemplateDirective, never>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicHeaderTemplateDirective, "ng-template[dynamicHeader]", never, { "name": "dynamicHeader"; }, {}, never>;
16
+ }
@@ -0,0 +1,72 @@
1
+ import { QueryList, TemplateRef, EventEmitter } from "@angular/core";
2
+ import { DynamicCellTemplateDirective, DynamicHeaderTemplateDirective } from "./dynamic-cell.directive";
3
+ import * as i0 from "@angular/core";
4
+ export interface DynamicTableColumn {
5
+ fieldId: string;
6
+ fieldName?: string;
7
+ fieldValue?: string;
8
+ isDefault?: boolean;
9
+ sortable?: boolean;
10
+ isShow?: boolean;
11
+ weight?: number;
12
+ fixedPx?: number;
13
+ responsive?: {
14
+ xs?: boolean;
15
+ sm?: boolean;
16
+ md?: boolean;
17
+ };
18
+ }
19
+ export declare class DynamicTableComponent {
20
+ data: any[];
21
+ columns: DynamicTableColumn[];
22
+ /**
23
+ * Optional configuration object used when no custom empty template is provided.
24
+ */
25
+ emptyState?: {
26
+ title?: string;
27
+ description?: string;
28
+ imageUrl?: string;
29
+ actions?: any[];
30
+ };
31
+ gridTemplateColumns?: string;
32
+ screenWidth?: number;
33
+ enableSelectAll: boolean;
34
+ enableLocalSort: boolean;
35
+ isTableLoading?: boolean;
36
+ isTableDataLoading?: boolean;
37
+ sortChange: EventEmitter<{
38
+ fieldId: string;
39
+ fieldValue?: string;
40
+ direction: 'asc' | 'desc' | null;
41
+ }>;
42
+ cellTemplates: QueryList<DynamicCellTemplateDirective>;
43
+ headerTemplates: QueryList<DynamicHeaderTemplateDirective>;
44
+ emptyTableTpl?: TemplateRef<any>;
45
+ private get isXs();
46
+ private get isSm();
47
+ private get isMd();
48
+ get visibleColumns(): DynamicTableColumn[];
49
+ getHeaderTemplate(colId: string): TemplateRef<any> | null;
50
+ getCellTemplate(colId: string): TemplateRef<any> | null;
51
+ getCellValue(row: any, path?: string): any;
52
+ trackByIndex(index: number): number;
53
+ get computedGridTemplate(): string;
54
+ get computedColumnWidths(): string[];
55
+ get allSelected(): boolean;
56
+ get someSelected(): boolean;
57
+ onSelectAllChange(event: Event): void;
58
+ onRowSelectChange(event: Event, row: any): void;
59
+ toggleSelectAll(checked: boolean): void;
60
+ private _sortActive?;
61
+ private _sortDirection;
62
+ get computedData(): any[];
63
+ get showTableLoading(): boolean;
64
+ get showTableDataLoading(): boolean;
65
+ get isEmpty(): boolean;
66
+ isSortedAsc(colId: string): boolean;
67
+ isSortedDesc(colId: string): boolean;
68
+ toggleSort(col: DynamicTableColumn): void;
69
+ private compareValues;
70
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicTableComponent, never>;
71
+ static ɵcmp: i0.ɵɵComponentDeclaration<DynamicTableComponent, "app-dynamic-table", never, { "data": "data"; "columns": "columns"; "emptyState": "emptyState"; "gridTemplateColumns": "gridTemplateColumns"; "screenWidth": "screenWidth"; "enableSelectAll": "enableSelectAll"; "enableLocalSort": "enableLocalSort"; "isTableLoading": "isTableLoading"; "isTableDataLoading": "isTableDataLoading"; }, { "sortChange": "sortChange"; }, ["emptyTableTpl", "cellTemplates", "headerTemplates"], never>;
72
+ }
@@ -0,0 +1,34 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export interface TableAction {
4
+ id: string;
5
+ label: string;
6
+ icon: string;
7
+ tooltip?: string;
8
+ show?: (context: {
9
+ selected: any[];
10
+ }) => boolean;
11
+ disabled?: (context: {
12
+ selected: any[];
13
+ }) => boolean;
14
+ onClick?: (context: {
15
+ id: string;
16
+ selected: any[];
17
+ }) => void;
18
+ }
19
+ export declare class TableActionToolbarComponent {
20
+ selectedItems: any[];
21
+ actions: TableAction[];
22
+ actionClick: EventEmitter<{
23
+ id: string;
24
+ selected: any[];
25
+ }>;
26
+ get hasSelection(): boolean;
27
+ get isSingleSelection(): boolean;
28
+ get selectionLabel(): string;
29
+ visibleActions(): TableAction[];
30
+ isDisabled(action: TableAction): boolean;
31
+ onAction(action: TableAction): void;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableActionToolbarComponent, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableActionToolbarComponent, "cqa-table-action-toolbar", never, { "selectedItems": "selectedItems"; "actions": "actions"; }, { "actionClick": "actionClick"; }, never, never>;
34
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TableDataLoaderComponent {
3
+ label: string;
4
+ size: number;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableDataLoaderComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableDataLoaderComponent, "cqa-table-data-loader", never, { "label": "label"; "size": "size"; }, {}, never, never>;
7
+ }
@@ -0,0 +1,90 @@
1
+ import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { DynamicFilterItem } from '../filters/dynamic-filter/dynamic-filter.component';
3
+ import { DynamicTableColumn } from '../table/dynamic-table/dynamic-table.component';
4
+ import { ColumnVisibilityConfig } from '../column-visibility/column-visibility.component';
5
+ import { TableAction } from '../table-action-toolbar/table-action-toolbar.component';
6
+ import { EmptyStateAction } from '../empty-state/empty-state.component';
7
+ import * as i0 from "@angular/core";
8
+ export interface EmptyStateConfig {
9
+ title: string;
10
+ description: string;
11
+ imageUrl: string;
12
+ actions: EmptyStateAction[];
13
+ }
14
+ export declare class TableTemplateComponent implements OnInit, OnChanges {
15
+ searchPlaceholder: string;
16
+ searchValue: string;
17
+ showClear: boolean;
18
+ showSearchBar: boolean;
19
+ filterConfig: DynamicFilterItem[];
20
+ showFilterPanel: boolean;
21
+ showFilterButton: boolean;
22
+ otherButtonLabel: string;
23
+ otherButtonVariant: 'filled' | 'outlined' | 'text' | 'elevated' | 'tonal' | 'grey-solid';
24
+ showOtherButton: boolean;
25
+ showActionButton: boolean;
26
+ showSettingsButton: boolean;
27
+ showAutoRefreshButton: boolean;
28
+ data: any[];
29
+ isEmptyState: boolean;
30
+ emptyStateConfig: EmptyStateConfig;
31
+ actions: TableAction[];
32
+ chips: Array<{
33
+ key?: string;
34
+ label?: string;
35
+ text: string;
36
+ fullText?: string;
37
+ hasMore?: boolean;
38
+ }>;
39
+ filterApplied: boolean;
40
+ columns: DynamicTableColumn[];
41
+ selectedAutoRefreshInterval: number;
42
+ pageIndex: number;
43
+ pageSize: number;
44
+ isTableLoading?: boolean;
45
+ isTableDataLoading?: boolean;
46
+ private _columnVisibility;
47
+ private _cachedVisibilityColumns;
48
+ filteredRows: any[];
49
+ pagedRows: any[];
50
+ get computedColumns(): DynamicTableColumn[];
51
+ get visibilityColumns(): Array<{
52
+ id: string;
53
+ label: string;
54
+ }>;
55
+ get columnVisibility(): ColumnVisibilityConfig;
56
+ ngOnInit(): void;
57
+ ngOnChanges(changes: SimpleChanges): void;
58
+ private initializeComponent;
59
+ private initializeColumnVisibility;
60
+ get anyRowSelected(): boolean;
61
+ get currentSelectedItems(): any[];
62
+ actionClick(data: any): void;
63
+ view(id: number | string): void;
64
+ edit(row: any): void;
65
+ delete(row: any): void;
66
+ onRowCheckboxChange(event: Event, row: any): void;
67
+ toggleFilter(): void;
68
+ onColumnVisibilityChange(cfg: ColumnVisibilityConfig): void;
69
+ onAutoRefreshChange(intervalMs: number): void;
70
+ valueChange(value: string): void;
71
+ search(value: string): void;
72
+ cleared(): void;
73
+ resultBadgeClass(result?: string | null): string;
74
+ onEmptyAction(action: any): void;
75
+ onFiltersChanged(current: any): void;
76
+ onFiltersApplied(_: any): void;
77
+ onPaginate(e: {
78
+ pageIndex: number;
79
+ pageSize: number;
80
+ }): void;
81
+ onPageSizeChange(size: number): void;
82
+ onRemoveChip(chip: any): void;
83
+ onClearAllChips(): void;
84
+ private applyPagination;
85
+ private mapVisibilityColumns;
86
+ private normalizeDate;
87
+ private passFilters;
88
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableTemplateComponent, never>;
89
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableTemplateComponent, "cqa-table-template", never, { "searchPlaceholder": "searchPlaceholder"; "searchValue": "searchValue"; "showClear": "showClear"; "showSearchBar": "showSearchBar"; "filterConfig": "filterConfig"; "showFilterPanel": "showFilterPanel"; "showFilterButton": "showFilterButton"; "otherButtonLabel": "otherButtonLabel"; "otherButtonVariant": "otherButtonVariant"; "showOtherButton": "showOtherButton"; "showActionButton": "showActionButton"; "showSettingsButton": "showSettingsButton"; "showAutoRefreshButton": "showAutoRefreshButton"; "data": "data"; "isEmptyState": "isEmptyState"; "emptyStateConfig": "emptyStateConfig"; "actions": "actions"; "chips": "chips"; "filterApplied": "filterApplied"; "columns": "columns"; "selectedAutoRefreshInterval": "selectedAutoRefreshInterval"; "pageIndex": "pageIndex"; "pageSize": "pageSize"; "isTableLoading": "isTableLoading"; "isTableDataLoading": "isTableDataLoading"; }, {}, never, never>;
90
+ }
@@ -0,0 +1,52 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./button/button.component";
3
+ import * as i2 from "./search-bar/search-bar.component";
4
+ import * as i3 from "./segment-control/segment-control.component";
5
+ import * as i4 from "./dialog/dialog.component";
6
+ import * as i5 from "./table/dynamic-table/dynamic-table.component";
7
+ import * as i6 from "./table/dynamic-table/dynamic-cell.directive";
8
+ import * as i7 from "./inline-sort/inline-sort.component";
9
+ import * as i8 from "./pagination/pagination.component";
10
+ import * as i9 from "./action-menu/action-menu.component";
11
+ import * as i10 from "./other-button/other-button.component";
12
+ import * as i11 from "./filters/dynamic-filter/dynamic-filter.component";
13
+ import * as i12 from "./column-visibility/column-visibility.component";
14
+ import * as i13 from "./table-action-toolbar/table-action-toolbar.component";
15
+ import * as i14 from "./dashboards/metrics-card/metrics-card.component";
16
+ import * as i15 from "./dashboards/metrics-card/metrics-block.component";
17
+ import * as i16 from "./dashboards/chart-card/chart-card.component";
18
+ import * as i17 from "./dashboards/progress-text-card/progress-text-card.component";
19
+ import * as i18 from "./dashboards/dashboard-header/dashboard-header.component";
20
+ import * as i19 from "./dashboards/coverage-module-card/coverage-module-card.component";
21
+ import * as i20 from "./dashboards/test-distribution-card/test-distribution-card.component";
22
+ import * as i21 from "./dashboards/failed-test-cases-card/failed-test-cases-card.component";
23
+ import * as i22 from "./dynamic-select/dynamic-select-field.component";
24
+ import * as i23 from "./selected-filters/selected-filters.component";
25
+ import * as i24 from "./dashboards/insight-card/insight-card.component";
26
+ import * as i25 from "./badge/badge.component";
27
+ import * as i26 from "./dropdown-button/dropdown-button.component";
28
+ import * as i27 from "./dashboards/heat-error-map-cell/heat-error-map-cell.component";
29
+ import * as i28 from "./empty-state/empty-state.component";
30
+ import * as i29 from "./templates/table-template.component";
31
+ import * as i30 from "./full-table-loader/full-table-loader.component";
32
+ import * as i31 from "./table-data-loader/table-data-loader.component";
33
+ import * as i32 from "@angular/common";
34
+ import * as i33 from "@angular/forms";
35
+ import * as i34 from "@angular/material/icon";
36
+ import * as i35 from "@angular/material/tooltip";
37
+ import * as i36 from "@angular/material/menu";
38
+ import * as i37 from "@angular/material/button";
39
+ import * as i38 from "@angular/material/form-field";
40
+ import * as i39 from "@angular/material/select";
41
+ import * as i40 from "@angular/material/core";
42
+ import * as i41 from "@angular/material/checkbox";
43
+ import * as i42 from "@angular/material/radio";
44
+ import * as i43 from "@angular/material/datepicker";
45
+ import * as i44 from "@angular/material/progress-spinner";
46
+ import * as i45 from "@angular/cdk/overlay";
47
+ import * as i46 from "@angular/cdk/portal";
48
+ export declare class UiKitModule {
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiKitModule, never>;
50
+ static ɵmod: i0.ɵɵNgModuleDeclaration<UiKitModule, [typeof i1.ButtonComponent, typeof i2.SearchBarComponent, typeof i3.SegmentControlComponent, typeof i4.DialogComponent, typeof i5.DynamicTableComponent, typeof i6.DynamicCellTemplateDirective, typeof i6.DynamicHeaderTemplateDirective, typeof i7.InlineSortComponent, typeof i8.PaginationComponent, typeof i9.ActionMenuButtonComponent, typeof i10.OtherButtonComponent, typeof i11.DynamicFilterComponent, typeof i12.ColumnVisibilityComponent, typeof i13.TableActionToolbarComponent, typeof i14.MetricsCardComponent, typeof i15.MetricsBlockComponent, typeof i16.ChartCardComponent, typeof i17.ProgressTextCardComponent, typeof i18.DashboardHeaderComponent, typeof i19.CoverageModuleCardComponent, typeof i20.TestDistributionCardComponent, typeof i21.FailedTestCasesCardComponent, typeof i22.DynamicSelectFieldComponent, typeof i23.SelectedFiltersComponent, typeof i24.InsightCardComponent, typeof i25.BadgeComponent, typeof i26.DropdownButtonComponent, typeof i27.HeatErrorMapCellComponent, typeof i28.EmptyStateComponent, typeof i29.TableTemplateComponent, typeof i30.FullTableLoaderComponent, typeof i31.TableDataLoaderComponent], [typeof i32.CommonModule, typeof i33.FormsModule, typeof i33.ReactiveFormsModule, typeof i34.MatIconModule, typeof i35.MatTooltipModule, typeof i36.MatMenuModule, typeof i37.MatButtonModule, typeof i38.MatFormFieldModule, typeof i39.MatSelectModule, typeof i40.MatOptionModule, typeof i41.MatCheckboxModule, typeof i42.MatRadioModule, typeof i43.MatDatepickerModule, typeof i40.MatNativeDateModule, typeof i44.MatProgressSpinnerModule, typeof i45.OverlayModule, typeof i46.PortalModule], [typeof i1.ButtonComponent, typeof i2.SearchBarComponent, typeof i3.SegmentControlComponent, typeof i4.DialogComponent, typeof i5.DynamicTableComponent, typeof i6.DynamicCellTemplateDirective, typeof i6.DynamicHeaderTemplateDirective, typeof i7.InlineSortComponent, typeof i8.PaginationComponent, typeof i9.ActionMenuButtonComponent, typeof i10.OtherButtonComponent, typeof i11.DynamicFilterComponent, typeof i12.ColumnVisibilityComponent, typeof i13.TableActionToolbarComponent, typeof i14.MetricsCardComponent, typeof i16.ChartCardComponent, typeof i17.ProgressTextCardComponent, typeof i18.DashboardHeaderComponent, typeof i19.CoverageModuleCardComponent, typeof i20.TestDistributionCardComponent, typeof i21.FailedTestCasesCardComponent, typeof i22.DynamicSelectFieldComponent, typeof i23.SelectedFiltersComponent, typeof i24.InsightCardComponent, typeof i25.BadgeComponent, typeof i26.DropdownButtonComponent, typeof i27.HeatErrorMapCellComponent, typeof i28.EmptyStateComponent, typeof i29.TableTemplateComponent, typeof i30.FullTableLoaderComponent, typeof i31.TableDataLoaderComponent]>;
51
+ static ɵinj: i0.ɵɵInjectorDeclaration<UiKitModule>;
52
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Utility for getting consistent colors for metadata values
3
+ * Used across Status, Priority, and Result fields
4
+ *
5
+ * Colors are defined here and also exported in metadata-colors.constants.js for tailwind.config.js
6
+ */
7
+ export declare type MetadataKey = 'priority' | 'result' | 'status';
8
+ export interface MetadataColorMap {
9
+ [key: string]: string;
10
+ }
11
+ /**
12
+ * Color mappings for Priority values
13
+ */
14
+ export declare const PRIORITY_COLORS: MetadataColorMap;
15
+ /**
16
+ * Color mappings for Result values
17
+ */
18
+ export declare const RESULT_COLORS: MetadataColorMap;
19
+ /**
20
+ * Color mappings for Status values
21
+ */
22
+ export declare const STATUS_COLORS: MetadataColorMap;
23
+ /**
24
+ * Default color for metadata values
25
+ */
26
+ export declare const DEFAULT_METADATA_COLOR = "#101828";
27
+ /**
28
+ * Gets the color for a metadata value based on its key and value
29
+ * @param key - The metadata key (priority, result, or status)
30
+ * @param value - The metadata value (string or object with value property)
31
+ * @returns Color hex code as a string
32
+ */
33
+ export declare function getMetadataColor(key: string, value: string | {
34
+ label: string;
35
+ value: string;
36
+ highlight?: boolean;
37
+ }): string;
38
+ /**
39
+ * Gets inline style object for metadata value color
40
+ * @param key - The metadata key
41
+ * @param value - The metadata value
42
+ * @returns Style object with color property
43
+ */
44
+ export declare function getMetadataValueStyle(key: string, value: string | {
45
+ label: string;
46
+ value: string;
47
+ highlight?: boolean;
48
+ }): {
49
+ [key: string]: string;
50
+ };
@@ -0,0 +1,12 @@
1
+ import { OverlayContainer } from '@angular/cdk/overlay';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Ensures Angular CDK overlay content (e.g., MatSelect, Datepicker panels)
5
+ * is nested under an element with id="cqa-ui-root" so Tailwind utilities
6
+ * configured with important: '#cqa-ui-root' are applied inside overlays.
7
+ */
8
+ export declare class TailwindOverlayContainer extends OverlayContainer {
9
+ protected _createContainer(): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<TailwindOverlayContainer, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<TailwindOverlayContainer>;
12
+ }
package/package.json CHANGED
@@ -1,18 +1,7 @@
1
1
  {
2
2
  "name": "@cqa-lib/cqa-ui",
3
- "version": "0.1.1",
3
+ "version": "1.0.0",
4
4
  "description": "UI Kit library for Angular 13.4",
5
- "scripts": {
6
- "build:cqa-ui": "ng-packagr -p ng-package.json && npm run build:tailwind && npm run fix:package",
7
- "build:tailwind": "tailwindcss -i ./src/lib/styles/tailwind.css -o ./dist/cqa-ui/styles.css --minify",
8
- "watch:tailwind": "tailwindcss -i ./src/lib/styles/tailwind.css -o ./dist/cqa-ui/styles.css --watch",
9
- "fix:package": "node -e \"const fs=require('fs');const p=JSON.parse(fs.readFileSync('dist/cqa-ui/package.json','utf8'));delete p.files;if(!p.publishConfig){p.publishConfig={};}p.publishConfig.access='public';fs.writeFileSync('dist/cqa-ui/package.json',JSON.stringify(p,null,2)+'\\n')\"",
10
- "storybook": "start-storybook -p 6006",
11
- "build-storybook": "build-storybook"
12
- },
13
- "files": [
14
- "dist/"
15
- ],
16
5
  "keywords": [
17
6
  "angular",
18
7
  "library",
@@ -41,42 +30,27 @@
41
30
  "@angular/material": "^13.3.9",
42
31
  "rxjs": "^6.6.7 || ^7.5.0"
43
32
  },
44
- "devDependencies": {
45
- "@angular-devkit/architect": "^0.1303.11",
46
- "@angular-devkit/build-angular": "^13.3.11",
47
- "@angular-devkit/core": "^13.3.11",
48
- "@angular/animations": "^13.4.0",
49
- "@angular/cdk": "^13.3.9",
50
- "@angular/cli": "^13.3.11",
51
- "@angular/common": "^13.4.0",
52
- "@angular/compiler": "^13.4.0",
53
- "@angular/compiler-cli": "^13.4.0",
54
- "@angular/core": "^13.4.0",
55
- "@angular/forms": "^13.4.0",
56
- "@angular/material": "^13.3.9",
57
- "@angular/platform-browser": "^13.4.0",
58
- "@angular/platform-browser-dynamic": "^13.4.0",
59
- "@storybook/addon-a11y": "6.5.16",
60
- "@storybook/addon-actions": "^6.5.16",
61
- "@storybook/addon-essentials": "^6.5.16",
62
- "@storybook/addon-links": "^6.5.16",
63
- "@storybook/angular": "^6.5.16",
64
- "@storybook/builder-webpack5": "^6.5.16",
65
- "@storybook/manager-webpack5": "^6.5.16",
66
- "@types/glob": "^8.1.0",
67
- "@types/lodash": "4.14.191",
68
- "@types/minimatch": "^5.1.2",
69
- "@types/node": "^14.18.36",
70
- "autoprefixer": "^10.4.21",
71
- "glob": "7.2.3",
72
- "minimatch": "5.1.6",
73
- "ng-packagr": "^13.3.0",
74
- "postcss": "^8.5.6",
75
- "postcss-loader": "7.3.3",
76
- "rxjs": "^7.5.0",
77
- "tailwindcss": "^2.2.19",
78
- "tslib": "^2.3.0",
79
- "typescript": "~4.6.4",
80
- "zone.js": "~0.11.8"
33
+ "module": "fesm2015/cqa-lib-cqa-ui.mjs",
34
+ "es2020": "fesm2020/cqa-lib-cqa-ui.mjs",
35
+ "esm2020": "esm2020/cqa-lib-cqa-ui.mjs",
36
+ "fesm2020": "fesm2020/cqa-lib-cqa-ui.mjs",
37
+ "fesm2015": "fesm2015/cqa-lib-cqa-ui.mjs",
38
+ "typings": "cqa-lib-cqa-ui.d.ts",
39
+ "exports": {
40
+ "./package.json": {
41
+ "default": "./package.json"
42
+ },
43
+ ".": {
44
+ "types": "./cqa-lib-cqa-ui.d.ts",
45
+ "esm2020": "./esm2020/cqa-lib-cqa-ui.mjs",
46
+ "es2020": "./fesm2020/cqa-lib-cqa-ui.mjs",
47
+ "es2015": "./fesm2015/cqa-lib-cqa-ui.mjs",
48
+ "node": "./fesm2015/cqa-lib-cqa-ui.mjs",
49
+ "default": "./fesm2020/cqa-lib-cqa-ui.mjs"
50
+ }
51
+ },
52
+ "sideEffects": false,
53
+ "dependencies": {
54
+ "tslib": "^2.3.0"
81
55
  }
82
56
  }
@@ -0,0 +1,37 @@
1
+ export * from './lib/ui-kit.module';
2
+ export * from './lib/button/button.component';
3
+ export * from './lib/search-bar/search-bar.component';
4
+ export * from './lib/segment-control/segment-control.component';
5
+ export * from './lib/dialog/dialog.component';
6
+ export * from './lib/dialog/dialog.service';
7
+ export * from './lib/dialog/dialog.models';
8
+ export * from './lib/dialog/dialog.tokens';
9
+ export * from './lib/dialog/dialog-ref';
10
+ export * from './lib/table/dynamic-table/dynamic-table.component';
11
+ export * from './lib/table/dynamic-table/dynamic-cell.directive';
12
+ export * from './lib/inline-sort/inline-sort.component';
13
+ export * from './lib/pagination/pagination.component';
14
+ export * from './lib/action-menu/action-menu.component';
15
+ export * from './lib/other-button/other-button.component';
16
+ export * from './lib/filters/dynamic-filter/dynamic-filter.component';
17
+ export * from './lib/column-visibility/column-visibility.component';
18
+ export * from './lib/table-action-toolbar/table-action-toolbar.component';
19
+ export * from './lib/dashboards/metrics-card/metrics-card.component';
20
+ export * from './lib/dashboards/chart-card/chart-card.component';
21
+ export * from './lib/dashboards/progress-text-card/progress-text-card.component';
22
+ export * from './lib/dashboards/dashboard-header/dashboard-header.component';
23
+ export * from './lib/dashboards/coverage-module-card/coverage-module-card.component';
24
+ export * from './lib/dashboards/test-distribution-card/test-distribution-card.component';
25
+ export * from './lib/dashboards/failed-test-cases-card/failed-test-cases-card.component';
26
+ export * from './lib/dynamic-select/dynamic-select-field.component';
27
+ export * from './lib/selected-filters/selected-filters.component';
28
+ export * from './lib/dashboards/insight-card/insight-card.component';
29
+ export * from './lib/badge/badge.component';
30
+ export * from './lib/dropdown-button/dropdown-button.component';
31
+ export * from './lib/dashboards/heat-error-map-cell/heat-error-map-cell.component';
32
+ export * from './lib/empty-state/empty-state.component';
33
+ export * from './lib/templates/table-template.component';
34
+ export * from './lib/assets/images/image-assets.constants';
35
+ export * from './lib/utils/metadata-colors.util';
36
+ export * from './lib/full-table-loader/full-table-loader.component';
37
+ export * from './lib/table-data-loader/table-data-loader.component';
File without changes
@@ -0,0 +1,66 @@
1
+ # Image Assets
2
+
3
+ This folder contains all image assets used by the UI library components.
4
+
5
+ ## Structure
6
+
7
+ - Place all image files (PNG, SVG, JPG, etc.) in this directory
8
+ - Use descriptive file names (e.g., `test-case-icon.svg`, `empty-state-default.png`)
9
+ - For component-specific images, consider creating subdirectories if needed
10
+
11
+ ## Available Images
12
+
13
+ The following images are configured for use in empty state components:
14
+
15
+ - `TestCaseIcon.png` - Test case/document with gear icon
16
+ - `SearchIcon.png` - Magnifying glass with question mark
17
+ - `FilesIcon.png` - Folder/upload icon
18
+ - `DashboardIcon.png` - Dashboard overview cards
19
+ - `StepsIcon.png` - Checklist / tasks icon
20
+ - `document-gear-icon.svg` - Document with gear overlay
21
+ - `ReportsIcon.png` - Analytics/Reports chart icon
22
+ - `SearchIcon.png` - Default fallback icon
23
+
24
+ ## Usage
25
+
26
+ ### Using Image Constants
27
+
28
+ Import the image constants for type-safe access:
29
+
30
+ ```typescript
31
+ import { EMPTY_STATE_IMAGES } from '../assets/images/image-assets.constants';
32
+
33
+ // In component
34
+ imageUrl: EMPTY_STATE_IMAGES.TEST_CASE
35
+ ```
36
+
37
+ ### Direct Path Reference
38
+
39
+ You can also reference images directly:
40
+
41
+ ```typescript
42
+ // Example in component
43
+ imageUrl: 'assets/images/test-case-icon.svg'
44
+ ```
45
+
46
+ ### In Storybook
47
+
48
+ Images are automatically available in Storybook stories:
49
+
50
+ ```typescript
51
+ import { EMPTY_STATE_IMAGES } from '../assets/images/image-assets.constants';
52
+
53
+ export const MyStory = Template.bind({});
54
+ MyStory.args = {
55
+ imageUrl: EMPTY_STATE_IMAGES.TEST_CASE,
56
+ // ...
57
+ };
58
+ ```
59
+
60
+ ## Notes
61
+
62
+ - Keep image file sizes optimized for web
63
+ - Use SVG format when possible for scalability
64
+ - Ensure all images are properly licensed for use in the library
65
+ - Images will be included in the built library and available to consuming applications
66
+
@@ -0,0 +1,11 @@
1
+ <svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="80" height="80" rx="24" fill="#EEF2FF"/>
3
+ <rect x="22" y="22" width="36" height="36" rx="10" fill="#FFFFFF" stroke="#4F46E5" stroke-width="2"/>
4
+ <path d="M30 50L30 42" stroke="#8B5CF6" stroke-width="4" stroke-linecap="round"/>
5
+ <path d="M38 50V36" stroke="#4F46E5" stroke-width="4" stroke-linecap="round"/>
6
+ <path d="M46 50V40" stroke="#7C3AED" stroke-width="4" stroke-linecap="round"/>
7
+ <path d="M54 50V34" stroke="#A78BFA" stroke-width="4" stroke-linecap="round"/>
8
+ <circle cx="58" cy="26" r="6" fill="#4F46E5"/>
9
+ <path d="M58 23V29" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round"/>
10
+ <path d="M55 26H61" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round"/>
11
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg width="80" height="80" viewBox="0 0 80 80" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="80" height="80" rx="24" fill="#EEF2FF"/>
3
+ <rect x="22" y="18" width="36" height="48" rx="12" fill="#FFFFFF" stroke="#4F46E5" stroke-width="2"/>
4
+ <path d="M32 34L36 38L44 30" stroke="#4F46E5" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <rect x="30" y="44" width="20" height="4" rx="2" fill="#C7D2FE"/>
6
+ <rect x="30" y="52" width="16" height="4" rx="2" fill="#C7D2FE"/>
7
+ <circle cx="55" cy="26" r="6" fill="#4F46E5"/>
8
+ <path d="M55 23V29" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round"/>
9
+ <path d="M52 26H58" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round"/>
10
+ </svg>