cat-documents-ng 0.2.38 → 0.2.40
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/Shared/constant/SHARED.d.ts +4 -13
- package/fesm2022/cat-documents-ng.mjs +270 -135
- package/fesm2022/cat-documents-ng.mjs.map +1 -1
- package/lib/document/components/document-history/document-history.component.d.ts +31 -3
- package/lib/document/constant/DOCUMENT_HISTORY.d.ts +41 -0
- package/lib/document/services/document-history-style.service.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
1
|
import { DocumentHistoryItem, DocumentHistorySection } from '../../models/document-history.model';
|
|
3
2
|
import { DocumentHistoryStyleService } from '../../services/document-history-style.service';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
@@ -11,11 +10,13 @@ interface ProcessedDocumentHistoryItem extends DocumentHistoryItem {
|
|
|
11
10
|
}
|
|
12
11
|
interface ProcessedDocumentHistorySection extends DocumentHistorySection {
|
|
13
12
|
list: ProcessedDocumentHistoryItem[];
|
|
13
|
+
accordionClass?: string;
|
|
14
|
+
hasValidContent?: boolean;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Component for displaying document history in a timeline format.
|
|
17
18
|
*/
|
|
18
|
-
export declare class DocumentHistoryComponent
|
|
19
|
+
export declare class DocumentHistoryComponent {
|
|
19
20
|
private documentHistoryStyleService;
|
|
20
21
|
/**
|
|
21
22
|
* Input data for document history sections
|
|
@@ -25,8 +26,35 @@ export declare class DocumentHistoryComponent implements OnInit {
|
|
|
25
26
|
* Whether to show the history component
|
|
26
27
|
*/
|
|
27
28
|
showHistory: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Active accordion index for controlling expand/collapse
|
|
31
|
+
*/
|
|
32
|
+
activeAccordionIndex: number;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the accordion is expanded
|
|
35
|
+
*/
|
|
36
|
+
isAccordionExpanded: boolean;
|
|
28
37
|
constructor(documentHistoryStyleService: DocumentHistoryStyleService);
|
|
29
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Handle accordion open event
|
|
40
|
+
*/
|
|
41
|
+
onAccordionOpen(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Handle accordion close event
|
|
44
|
+
*/
|
|
45
|
+
onAccordionClose(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Toggle accordion state
|
|
48
|
+
*/
|
|
49
|
+
toggleAccordion(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Get the CSS class for accordion styling based on the section's label
|
|
52
|
+
*/
|
|
53
|
+
private getAccordionClass;
|
|
54
|
+
/**
|
|
55
|
+
* Check if a section has valid content to display
|
|
56
|
+
*/
|
|
57
|
+
private checkValidContent;
|
|
30
58
|
/**
|
|
31
59
|
* Process history data to add computed properties
|
|
32
60
|
*/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants for Document History labels and styling
|
|
3
|
+
*/
|
|
4
|
+
export declare const DOCUMENT_HISTORY: {
|
|
5
|
+
LABELS: {
|
|
6
|
+
DOCUMENT_REQUESTED: string;
|
|
7
|
+
DOCUMENT_UPLOADED: string;
|
|
8
|
+
DOCUMENT_REJECTED: string;
|
|
9
|
+
DOCUMENT_ACCEPTED: string;
|
|
10
|
+
};
|
|
11
|
+
ICONS: {
|
|
12
|
+
DOCUMENT_REQUESTED: string;
|
|
13
|
+
DOCUMENT_UPLOADED: string;
|
|
14
|
+
DOCUMENT_REJECTED: string;
|
|
15
|
+
DOCUMENT_ACCEPTED: string;
|
|
16
|
+
};
|
|
17
|
+
TEXT_COLORS: {
|
|
18
|
+
DOCUMENT_REQUESTED: string;
|
|
19
|
+
DOCUMENT_UPLOADED: string;
|
|
20
|
+
DOCUMENT_REJECTED: string;
|
|
21
|
+
DOCUMENT_ACCEPTED: string;
|
|
22
|
+
};
|
|
23
|
+
BG_COLORS: {
|
|
24
|
+
DOCUMENT_REQUESTED: string;
|
|
25
|
+
DOCUMENT_UPLOADED: string;
|
|
26
|
+
DOCUMENT_REJECTED: string;
|
|
27
|
+
DOCUMENT_ACCEPTED: string;
|
|
28
|
+
};
|
|
29
|
+
BORDER_COLORS: {
|
|
30
|
+
DOCUMENT_REQUESTED: string;
|
|
31
|
+
DOCUMENT_UPLOADED: string;
|
|
32
|
+
DOCUMENT_REJECTED: string;
|
|
33
|
+
DOCUMENT_ACCEPTED: string;
|
|
34
|
+
};
|
|
35
|
+
ICON_BG_COLORS: {
|
|
36
|
+
DOCUMENT_REQUESTED: string;
|
|
37
|
+
DOCUMENT_UPLOADED: string;
|
|
38
|
+
DOCUMENT_REJECTED: string;
|
|
39
|
+
DOCUMENT_ACCEPTED: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -24,6 +24,11 @@ export declare class DocumentHistoryStyleService {
|
|
|
24
24
|
* Get the appropriate icon background color class based on the action label
|
|
25
25
|
*/
|
|
26
26
|
getActionIconBgColor(label: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Check if a section has valid content to display
|
|
29
|
+
*/
|
|
30
|
+
checkValidContent(section: any): boolean;
|
|
31
|
+
getAccordionClass(section: any): string;
|
|
27
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHistoryStyleService, never>;
|
|
28
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentHistoryStyleService>;
|
|
29
34
|
}
|