cat-documents-ng 0.2.32 → 0.2.35

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 (33) hide show
  1. package/Shared/components/table-primary/table-primary.component.d.ts +25 -0
  2. package/Shared/constant/ERROR.d.ts +1 -0
  3. package/Shared/constant/SHARED.d.ts +96 -5
  4. package/Shared/constant/URLS.d.ts +22 -0
  5. package/Shared/shared.module.d.ts +11 -0
  6. package/fesm2022/cat-documents-ng.mjs +2154 -524
  7. package/fesm2022/cat-documents-ng.mjs.map +1 -1
  8. package/lib/document/components/document-container/document-container.component.d.ts +36 -34
  9. package/lib/document/components/document-list/document-list.component.d.ts +63 -26
  10. package/lib/document/components/document-status/document-status.component.d.ts +22 -0
  11. package/lib/document/components/document-viewer/document-viewer.component.d.ts +6 -6
  12. package/lib/document/components/documents-menu/documents-menu.component.d.ts +40 -3
  13. package/lib/document/components/folder-container/folder-container.component.d.ts +33 -3
  14. package/lib/document/components/linked-document/linked-document.component.d.ts +5 -4
  15. package/lib/document/components/user-list/user-list.component.d.ts +29 -0
  16. package/lib/document/directives/document.directive.d.ts +2 -2
  17. package/lib/document/document.module.d.ts +25 -21
  18. package/lib/document/models/document-category.model.d.ts +19 -0
  19. package/lib/document/models/document-list-response.model.d.ts +24 -0
  20. package/lib/document/models/status-data.model.d.ts +27 -0
  21. package/lib/document/models/user-list.model.d.ts +8 -0
  22. package/lib/document/services/document-http.service.d.ts +35 -0
  23. package/lib/document/services/document-menu.service.d.ts +65 -0
  24. package/lib/document/services/document-table-builder.service.d.ts +56 -0
  25. package/lib/document/services/document.service.d.ts +83 -6
  26. package/lib/document/services/status-calculator.service.d.ts +20 -0
  27. package/lib/document/services/user-list.service.d.ts +36 -0
  28. package/lib/document/state/document.query.d.ts +94 -0
  29. package/lib/document/state/document.state.d.ts +13 -0
  30. package/lib/document/state/document.store.d.ts +15 -0
  31. package/package.json +1 -1
  32. package/public-api.d.ts +1 -0
  33. package/src/assets/config/api.config.json +0 -20
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Model representing status data for documents.
3
+ * @interface StatusDataModel
4
+ */
5
+ export interface StatusDataModel {
6
+ /**
7
+ * The status name (e.g., 'Approved', 'Pending', 'Rejected')
8
+ * @type {string}
9
+ */
10
+ status: string;
11
+ /**
12
+ * The count of documents with this status
13
+ * @type {number}
14
+ */
15
+ count: number;
16
+ /**
17
+ * The color associated with this status for UI display
18
+ * @type {string}
19
+ */
20
+ color?: string;
21
+ /**
22
+ * The icon class associated with this status
23
+ * @type {string}
24
+ */
25
+ icon?: string;
26
+ _id?: string;
27
+ }
@@ -0,0 +1,8 @@
1
+ export declare class UserListModel {
2
+ _id: string;
3
+ name: string;
4
+ approved: number;
5
+ pending: number;
6
+ initials?: string;
7
+ color?: string;
8
+ }
@@ -6,6 +6,9 @@ import { DocumentTypeModel } from '../models/document-type.model';
6
6
  import { DocumentAlertModel } from '../models/document-alert.model';
7
7
  import { DocumentModel } from '../models/document.model';
8
8
  import { FolderBlockModel } from '../models/folder.model';
9
+ import { DocumentCategory } from '../models/document-category.model';
10
+ import { UserListModel } from '../models/user-list.model';
11
+ import { StatusDataModel } from '../models/status-data.model';
9
12
  import * as i0 from "@angular/core";
10
13
  /**
11
14
  * Service for making HTTP requests related to documents.
@@ -36,6 +39,13 @@ export declare class DocumentHttpService {
36
39
  * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
37
40
  */
38
41
  getFoldersData(contextId: string | undefined): Observable<FolderBlockModel[]>;
42
+ /**
43
+ * Fetches a document catagories by its path name.
44
+ * Includes error handling for failed API requests.
45
+ * @param {string} contextId - The context ID to fetch the document.
46
+ * @returns {Observable<any>} Observable that emits the transformed data for dropdown options.
47
+ */
48
+ getDocumentCatagories(contextId: string): Observable<DocumentCategory[]>;
39
49
  /**
40
50
  * Fetches a document by its path name and transforms the response for dropdown options.
41
51
  * Includes error handling for failed API requests.
@@ -64,6 +74,31 @@ export declare class DocumentHttpService {
64
74
  * @returns {Observable<DocumentModel>} An observable that emits the updated DocumentModel.
65
75
  */
66
76
  updateDocumentName(documentId: string, payload: any): Observable<DocumentModel>;
77
+ /**
78
+ * Fetches a userlist by its path name.
79
+ * @param {string} contextId - The document ID to fetch the document.
80
+ * @returns {Observable<UserListModel[]>} Observable that emits the user list data.
81
+ */
82
+ getUserListByContextId(contextId: string): Observable<UserListModel[]>;
83
+ /**
84
+ * Fetches document status count data by application ID with optional context ID and category parameters.
85
+ * @param {string} applicationId - The application ID to fetch status data.
86
+ * @param {string | null} contextId - The context ID (applicant ID) to filter by. If null, uses applicationId.
87
+ * @param {string | null} categoryId - The category ID to filter by.
88
+ * @returns {Observable<StatusDataModel[]>} Observable that emits the status data.
89
+ */
90
+ getStatusDocumentCount(applicationId: string, contextId?: string | null, categoryId?: string | null): Observable<StatusDataModel[]>;
91
+ /**
92
+ * Fetches documents based on selection criteria (menu item, user ID, status, and search key).
93
+ * This method sends an HTTP GET request with query parameters for the selected filters.
94
+ * @param {string} contextId - The context ID (applicationId or applicantId).
95
+ * @param {string | null} menuItem - The selected menu item filter.
96
+ * @param {string | null} userId - The selected user ID filter.
97
+ * @param {string | null} status - The selected status filter.
98
+ * @param {string | null} searchKey - The search key filter.
99
+ * @returns {Observable<any>} An observable that emits the filtered document data.
100
+ */
101
+ getDocumentsBySelection(contextId: string, menuItem: string | null, userId: string | null, status: string | null, searchKey?: string | null): Observable<any>;
67
102
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHttpService, never>;
68
103
  static ɵprov: i0.ɵɵInjectableDeclaration<DocumentHttpService>;
69
104
  }
@@ -0,0 +1,65 @@
1
+ import { DocumentCategory, DocumentCategoryItem } from '../models/document-category.model';
2
+ import { DocumentStore } from '../state/document.store';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DocumentMenuService {
5
+ private documentStore;
6
+ constructor(documentStore: DocumentStore);
7
+ /**
8
+ * Gets the category name for a given menu item _id
9
+ * @param menuItemId - The _id of the menu item
10
+ * @param categories - The list of document categories
11
+ * @returns The category name or null if not found
12
+ */
13
+ getMenuItemCategory(menuItemId: string, categories: DocumentCategory[]): string | null;
14
+ /**
15
+ * Gets the menu item by its _id
16
+ * @param menuItemId - The _id of the menu item
17
+ * @param categories - The list of document categories
18
+ * @returns The menu item or null if not found
19
+ */
20
+ getMenuItemById(menuItemId: string, categories: DocumentCategory[]): DocumentCategoryItem | null;
21
+ /**
22
+ * Handles user list visibility based on menu item category
23
+ * @param menuItemId - The _id of the menu item
24
+ * @param categories - The list of document categories
25
+ */
26
+ handleUserListVisibility(menuItemId: string, categories: DocumentCategory[]): void;
27
+ /**
28
+ * Handles document status based on selected menu item
29
+ * @param menuItemId - The _id of the selected menu item
30
+ * @param categories - The list of document categories
31
+ */
32
+ handleDocumentStatus(menuItemId: string, categories: DocumentCategory[]): void;
33
+ /**
34
+ * Calculates total documents for a menu item
35
+ * @param item - The menu item
36
+ * @returns Total number of documents
37
+ */
38
+ getTotalDocuments(item: DocumentCategoryItem): number;
39
+ /**
40
+ * Calculates completed documents for a menu item
41
+ * @param item - The menu item
42
+ * @returns Number of completed documents
43
+ */
44
+ getCompletedDocuments(item: DocumentCategoryItem): number;
45
+ /**
46
+ * Gets badge value for a menu item
47
+ * @param item - The menu item
48
+ * @returns Badge value string (e.g., "1/2")
49
+ */
50
+ getBadgeValue(item: DocumentCategoryItem): string;
51
+ /**
52
+ * Gets badge severity based on status
53
+ * @param item - The menu item
54
+ * @returns Badge severity for PrimeNG
55
+ */
56
+ getBadgeSeverity(item: DocumentCategoryItem): 'success' | 'info' | 'warning' | 'danger';
57
+ /**
58
+ * Checks if badge should be shown for a menu item
59
+ * @param item - The menu item
60
+ * @returns True if badge should be shown
61
+ */
62
+ shouldShowBadge(item: DocumentCategoryItem): boolean;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<DocumentMenuService, never>;
64
+ static ɵprov: i0.ɵɵInjectableDeclaration<DocumentMenuService>;
65
+ }
@@ -0,0 +1,56 @@
1
+ import { TableData } from '../../../Shared/components/table-primary/table-primary.component';
2
+ import { DocumentListResponse, DocumentListItem } from '../models/document-list-response.model';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DocumentTableBuilderService {
5
+ constructor();
6
+ /**
7
+ * Gets document type from file name extension
8
+ * @param fileName File name with extension
9
+ * @returns Document type string
10
+ */
11
+ private getDocumentTypeFromFileName;
12
+ /**
13
+ * Builds table data for document categories
14
+ * @param categories Array of document categories
15
+ * @returns Array of TableData objects
16
+ */
17
+ buildDocumentCategoriesTables(categories: DocumentListResponse[]): TableData[];
18
+ /**
19
+ * Builds table data for a single document category
20
+ * @param category Document category
21
+ * @returns TableData object
22
+ */
23
+ private buildTableForCategory;
24
+ /**
25
+ * Builds a single table from document list items
26
+ * @param documents Array of document list items
27
+ * @returns TableData object
28
+ */
29
+ buildDocumentTable(documents: DocumentListItem[]): TableData;
30
+ /**
31
+ * Gets completion count for a category
32
+ * @param category Document category
33
+ * @returns Completion string (e.g., "2/4")
34
+ */
35
+ getCompletionCount(category: DocumentListResponse): string;
36
+ /**
37
+ * Gets pending document count for a category
38
+ * @param category Document category
39
+ * @returns Number of pending documents
40
+ */
41
+ getPendingDocumentCount(category: DocumentListResponse): number;
42
+ /**
43
+ * Gets approved document count for a category
44
+ * @param category Document category
45
+ * @returns Number of approved documents
46
+ */
47
+ getApprovedDocumentCount(category: DocumentListResponse): number;
48
+ /**
49
+ * Transforms document model to document list item
50
+ * @param documents Array of DocumentModel
51
+ * @returns Array of DocumentListItem
52
+ */
53
+ transformDocumentModelToListItem(documents: any[]): DocumentListItem[];
54
+ static ɵfac: i0.ɵɵFactoryDeclaration<DocumentTableBuilderService, never>;
55
+ static ɵprov: i0.ɵɵInjectableDeclaration<DocumentTableBuilderService>;
56
+ }
@@ -1,10 +1,27 @@
1
+ import { Observable } from "rxjs";
1
2
  import { DocumentModel } from "../models/document.model";
3
+ import { DocumentStore } from "../state/document.store";
4
+ import { DocumentQuery } from "../state/document.query";
5
+ import { DocumentHttpService } from "./document-http.service";
2
6
  import * as i0 from "@angular/core";
3
7
  /**
4
- * Service to manage the document data
8
+ * Service to manage the document data and selection state
5
9
  */
6
- export declare class DocumentService {
7
- private documentSubject$;
10
+ export declare class DocumentHelperService {
11
+ private documentStore;
12
+ private documentQuery;
13
+ private documentHttpService;
14
+ constructor(documentStore: DocumentStore, documentQuery: DocumentQuery, documentHttpService: DocumentHttpService);
15
+ /**
16
+ * Initialize watcher for selection state changes
17
+ * @param contextId - The context ID to use for API calls
18
+ */
19
+ initializeSelectionWatcher(contextId: string): void;
20
+ /**
21
+ * Initialize watcher for selection state changes with initial load
22
+ * @param contextId - The context ID to use for API calls
23
+ */
24
+ initializeSelectionWatcherWithInitialLoad(contextId: string): void;
8
25
  /**
9
26
  * Set the document data
10
27
  * @param document the document data
@@ -14,7 +31,67 @@ export declare class DocumentService {
14
31
  * Get the document data
15
32
  * @returns the document data
16
33
  */
17
- get(): import("rxjs").Observable<DocumentModel | null>;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<DocumentService, never>;
19
- static ɵprov: i0.ɵɵInjectableDeclaration<DocumentService>;
34
+ get(): Observable<DocumentModel | null>;
35
+ /**
36
+ * Get the current document value synchronously
37
+ * @returns the current document value
38
+ */
39
+ getValue(): DocumentModel | null;
40
+ /**
41
+ * Set the selected menu item
42
+ * @param menuItem the selected menu item _id (not the label)
43
+ */
44
+ setSelectedMenuItem(menuItem: string | null): void;
45
+ /**
46
+ * Set the selected user ID
47
+ * @param userId the selected user ID
48
+ */
49
+ setSelectedUserId(userId: string | null): void;
50
+ /**
51
+ * Set the selected status
52
+ * @param status the selected status
53
+ */
54
+ setSelectedStatus(status: string | null): void;
55
+ /**
56
+ * Set all selection state at once
57
+ * @param menuItem the selected menu item _id (not the label)
58
+ * @param userId the selected user ID
59
+ * @param status the selected status
60
+ */
61
+ setSelectionState(menuItem: string | null, userId: string | null, status: string | null): void;
62
+ /**
63
+ * Clear all selection state
64
+ */
65
+ clearSelectionState(): void;
66
+ /**
67
+ * Set user list visibility
68
+ * @param show whether to show the user list
69
+ */
70
+ setShowUserList(show: boolean): void;
71
+ /**
72
+ * Get the current selection state
73
+ * @returns observable of the current selection state
74
+ */
75
+ getSelectionState(): Observable<{
76
+ menuItem: string | null;
77
+ userId: string | null;
78
+ status: string | null;
79
+ }>;
80
+ /**
81
+ * Get observable for filtered documents
82
+ * @returns Observable that emits filtered document responses
83
+ */
84
+ getFilteredDocuments(): Observable<any>;
85
+ /**
86
+ * Manually trigger API call with current selection state
87
+ * @param contextId - The context ID to use for the API call
88
+ */
89
+ refreshDocumentsWithCurrentSelection(contextId: string): void;
90
+ /**
91
+ * Force refresh documents with no filters
92
+ * @param contextId - The context ID to use for the API call
93
+ */
94
+ refreshDocumentsWithoutFilters(contextId: string): void;
95
+ static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHelperService, never>;
96
+ static ɵprov: i0.ɵɵInjectableDeclaration<DocumentHelperService>;
20
97
  }
@@ -0,0 +1,20 @@
1
+ import * as i0 from "@angular/core";
2
+ export interface StatusData {
3
+ status: string;
4
+ count: number;
5
+ color?: string;
6
+ icon?: string;
7
+ _id?: string;
8
+ }
9
+ export interface CalculatedStatusData extends StatusData {
10
+ percentage: number;
11
+ isSelected: boolean;
12
+ statusClass: string;
13
+ iconClass: string;
14
+ }
15
+ export declare class StatusCalculatorService {
16
+ calculateTotalCount(statusData: StatusData[]): number;
17
+ calculateStatusDataWithPercentages(statusData: StatusData[], selectedStatusId: string | null): CalculatedStatusData[];
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatusCalculatorService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<StatusCalculatorService>;
20
+ }
@@ -0,0 +1,36 @@
1
+ import { UserListModel } from '../models/user-list.model';
2
+ import { DocumentStore } from '../state/document.store';
3
+ import { DocumentQuery } from '../state/document.query';
4
+ import { DocumentCategory } from '../models/document-category.model';
5
+ import * as i0 from "@angular/core";
6
+ export declare class UserListService {
7
+ private documentStore;
8
+ private documentQuery;
9
+ constructor(documentStore: DocumentStore, documentQuery: DocumentQuery);
10
+ getInitials(name: string): string;
11
+ getColorByIndex(index: number): string;
12
+ getColorValue(colorName: string): string;
13
+ processUserData(userList: UserListModel[]): UserListModel[];
14
+ /**
15
+ * Finds the selected menu item from categories
16
+ * @param selectedMenuItemId - The ID of the selected menu item
17
+ * @param categories - The document categories
18
+ * @returns The selected menu item or null
19
+ */
20
+ private findSelectedMenuItem;
21
+ /**
22
+ * Filters user list based on selected menu item category
23
+ * @param userList - The complete user list
24
+ * @param categories - The document categories
25
+ * @returns Filtered user list
26
+ */
27
+ filterUsersByCategory(userList: UserListModel[], categories: DocumentCategory[]): UserListModel[];
28
+ selectUser(userId: string, userData: UserListModel[]): {
29
+ selectedUser: string | undefined;
30
+ name: string | undefined;
31
+ };
32
+ unselectUser(): void;
33
+ isUserSelected(userId: string, userData: UserListModel[], selectedUser: string | undefined): boolean;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserListService, never>;
35
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserListService>;
36
+ }
@@ -4,6 +4,10 @@ import { DocumentState } from './document.state';
4
4
  import { Observable } from 'rxjs';
5
5
  import { Message } from 'primeng/api';
6
6
  import { DocumentModel } from '../models/document.model';
7
+ import { DocumentCategory } from '../models/document-category.model';
8
+ import { UserListModel } from '../models/user-list.model';
9
+ import { StatusDataModel } from '../models/status-data.model';
10
+ import { DocumentListResponse } from '../models/document-list-response.model';
7
11
  import * as i0 from "@angular/core";
8
12
  /**
9
13
  * Query service for managing document state.
@@ -35,6 +39,96 @@ export declare class DocumentQuery extends QueryEntity<DocumentState> {
35
39
  * @returns {Observable<DocumentModel[]>} Observable that emits the documets.
36
40
  */
37
41
  selectDocumets(): Observable<DocumentModel[]>;
42
+ /**
43
+ * Selects the document categories.
44
+ * @returns {Observable<DocumentCategory[]>} Observable that emits the document categories.
45
+ */
46
+ selectDocumentCategories(): Observable<DocumentCategory[]>;
47
+ /**
48
+ * Selects the currently selected menu item.
49
+ * @returns {Observable<string | null>} Observable that emits the currently selected menu item _id (not the label).
50
+ */
51
+ selectSelectedMenuItem(): Observable<string | null>;
52
+ /**
53
+ * Selects the currently selected user ID.
54
+ * @returns {Observable<string | null>} Observable that emits the currently selected user ID.
55
+ */
56
+ selectSelectedUserId(): Observable<string | null>;
57
+ /**
58
+ * Selects the currently selected status.
59
+ * @returns {Observable<string | null>} Observable that emits the currently selected status.
60
+ */
61
+ selectSelectedStatus(): Observable<string | null>;
62
+ /**
63
+ * Selects all selection state properties (menu item, user ID, status).
64
+ * @returns {Observable<{menuItem: string | null, userId: string | null, status: string | null}>} Observable that emits the current selection state.
65
+ * Note: menuItem is the _id of the selected menu item, not the label.
66
+ */
67
+ selectSelectionState(): Observable<{
68
+ menuItem: string | null;
69
+ userId: string | null;
70
+ status: string | null;
71
+ }>;
72
+ /**
73
+ * Gets the current selection state values (synchronous).
74
+ * @returns {Object} The current selection state values.
75
+ * Note: menuItem is the _id of the selected menu item, not the label.
76
+ */
77
+ getSelectionState(): {
78
+ menuItem: string | null;
79
+ userId: string | null;
80
+ status: string | null;
81
+ };
82
+ /**
83
+ * Selects the user list visibility state.
84
+ * @returns {Observable<boolean>} Observable that emits the current user list visibility.
85
+ */
86
+ selectShowUserList(): Observable<boolean>;
87
+ /**
88
+ * Gets the current user list visibility value (synchronous).
89
+ * @returns {boolean} The current user list visibility.
90
+ */
91
+ getShowUserList(): boolean;
92
+ /**
93
+ * Selects the current document.
94
+ * @returns {Observable<DocumentModel | null>} Observable that emits the current document.
95
+ */
96
+ selectCurrentDocument(): Observable<DocumentModel | null>;
97
+ /**
98
+ * Gets the current document value (synchronous).
99
+ * @returns {DocumentModel | null} The current document.
100
+ */
101
+ getCurrentDocument(): DocumentModel | null;
102
+ /**
103
+ * Selects the user list.
104
+ * @returns {Observable<UserListModel[]>} Observable that emits the user list.
105
+ */
106
+ selectUserList(): Observable<UserListModel[]>;
107
+ /**
108
+ * Gets the current user list value (synchronous).
109
+ * @returns {UserListModel[]} The current user list.
110
+ */
111
+ getUserList(): UserListModel[];
112
+ /**
113
+ * Selects the status data.
114
+ * @returns {Observable<StatusDataModel[]>} Observable that emits the status data.
115
+ */
116
+ selectStatusData(): Observable<StatusDataModel[]>;
117
+ /**
118
+ * Gets the current status data value (synchronous).
119
+ * @returns {StatusDataModel[]} The current status data.
120
+ */
121
+ getStatusData(): StatusDataModel[];
122
+ /**
123
+ * Selects the document list response.
124
+ * @returns {Observable<DocumentListResponse[] | null>} Observable that emits the document list response.
125
+ */
126
+ selectDocumentListResponse(): Observable<DocumentListResponse[] | null>;
127
+ /**
128
+ * Gets the current document list response value (synchronous).
129
+ * @returns {DocumentListResponse[] | null} The current document list response.
130
+ */
131
+ getDocumentListResponse(): DocumentListResponse[] | null;
38
132
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentQuery, never>;
39
133
  static ɵprov: i0.ɵɵInjectableDeclaration<DocumentQuery>;
40
134
  }
@@ -3,7 +3,11 @@ import { DocumentModel } from '../models/document.model';
3
3
  import { DocumentTypeModel } from '../models/document-type.model';
4
4
  import { DocumentAlertModel } from '../models/document-alert.model';
5
5
  import { FolderBlockModel } from '../models/folder.model';
6
+ import { DocumentCategory } from '../models/document-category.model';
6
7
  import { Message } from 'primeng/api';
8
+ import { UserListModel } from '../models/user-list.model';
9
+ import { StatusDataModel } from '../models/status-data.model';
10
+ import { DocumentListResponse } from '../models/document-list-response.model';
7
11
  /**
8
12
  * Represents the state of the documents in the application.
9
13
  * This interface extends Akita's `EntityState` to include additional properties
@@ -26,6 +30,15 @@ export interface DocumentState extends EntityState<DocumentModel, string> {
26
30
  folders: FolderBlockModel[];
27
31
  messages: Message[];
28
32
  documentList: DocumentModel[];
33
+ documentCategories: DocumentCategory[];
34
+ selectedMenuItem: string | null;
35
+ selectedUserId: string | null;
36
+ selectedStatus: string | null;
37
+ showUserList: boolean;
38
+ currentDocument: DocumentModel | null;
39
+ userList: UserListModel[];
40
+ statusData: StatusDataModel[];
41
+ documentListResponse: DocumentListResponse[] | null;
29
42
  }
30
43
  /**
31
44
  * Creates the initial state for the `DocumentState` store.
@@ -1,7 +1,11 @@
1
1
  import { EntityStore } from '@datorama/akita';
2
2
  import { DocumentState } from './document.state';
3
+ import { DocumentCategory } from '../models/document-category.model';
3
4
  import { Message } from 'primeng/api';
4
5
  import { DocumentModel } from '../models/document.model';
6
+ import { UserListModel } from '../models/user-list.model';
7
+ import { StatusDataModel } from '../models/status-data.model';
8
+ import { DocumentListResponse } from '../models/document-list-response.model';
5
9
  import * as i0 from "@angular/core";
6
10
  /**
7
11
  * Store that manages the state of documents in the application.
@@ -22,6 +26,17 @@ export declare class DocumentStore extends EntityStore<DocumentState> {
22
26
  setParentDocumentTypeId(parentDocumentTypeId: string): void;
23
27
  setMessage(message: Message[]): void;
24
28
  setDocumentList(documents: DocumentModel[]): void;
29
+ setDocumentCategories(categories: DocumentCategory[]): void;
30
+ setSelectedMenuItem(menuItem: string | null): void;
31
+ setSelectedUserId(userId: string | null): void;
32
+ setSelectedStatus(status: string | null): void;
33
+ setSelectionState(menuItem: string | null, userId: string | null, status: string | null): void;
34
+ clearSelectionState(): void;
35
+ setShowUserList(show: boolean): void;
36
+ setCurrentDocument(document: DocumentModel | null): void;
37
+ setUserList(userList: UserListModel[]): void;
38
+ setStatusData(statusData: StatusDataModel[]): void;
39
+ setDocumentListResponse(response: DocumentListResponse[] | null): void;
25
40
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentStore, never>;
26
41
  static ɵprov: i0.ɵɵInjectableDeclaration<DocumentStore>;
27
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cat-documents-ng",
3
- "version": "0.2.32",
3
+ "version": "0.2.35",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"
package/public-api.d.ts CHANGED
@@ -2,5 +2,6 @@ export * from './lib/document/document.module';
2
2
  export * from './lib/document/components/document-container/document-container.component';
3
3
  export * from './lib/document/components/document-viewer/document-viewer.component';
4
4
  export * from './lib/document/components/document-list/document-list.component';
5
+ export * from './lib/document/services/document-table-builder.service';
5
6
  export * from './lib/document/directives/document.directive';
6
7
  export * from './lib/document/directives/permission.directive';
@@ -1,20 +0,0 @@
1
- {
2
- "catQwUrl": "https://qa-qw-api.dynamatix.com/api/",
3
- "apiUrl": "https://gatehouse-qa.dynamatix.com/api/",
4
- "swaggerUrl": "https://qa-qw-api.dynamatix.com/api-docs/",
5
- "adminEmail": "neeraj.kumar@catura.co.uk",
6
- "interactBaseApi": "https://qa-interact-api.dynamatix.com/api/",
7
- "actionBaseApi": "https://qa-qw-api.dynamatix.com/api/",
8
- "documentApiUrl": "http://localhost:5100/api/",
9
- "adminPhoneNumber": "+447380300545",
10
- "visibilityOption": {
11
- "isRationalVisible": false,
12
- "isChecklistVisible": false,
13
- "isAudit": false,
14
- "isConversation": true,
15
- "isOverview": true,
16
- "isDocuments": true
17
- },
18
- "env": "qa"
19
-
20
- }