cat-documents-ng 0.5.15 → 0.5.17

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.
@@ -9,6 +9,7 @@ export declare class DocumentSearchComponent implements OnInit, OnDestroy {
9
9
  readonly SHARED: typeof SHARED;
10
10
  contextId: string;
11
11
  onActionClick: EventEmitter<void>;
12
+ onRequestClick: EventEmitter<void>;
12
13
  searchTerm: string;
13
14
  private destroy$;
14
15
  private searchSubject;
@@ -47,5 +48,5 @@ export declare class DocumentSearchComponent implements OnInit, OnDestroy {
47
48
  */
48
49
  get shouldShowClearAll(): boolean;
49
50
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentSearchComponent, never>;
50
- static ɵcmp: i0.ɵɵComponentDeclaration<DocumentSearchComponent, "document-search", never, { "contextId": { "alias": "contextId"; "required": false; }; }, { "onActionClick": "onActionClick"; }, never, never, false, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<DocumentSearchComponent, "document-search", never, { "contextId": { "alias": "contextId"; "required": false; }; }, { "onActionClick": "onActionClick"; "onRequestClick": "onRequestClick"; }, never, never, false, never>;
51
52
  }
@@ -29,8 +29,11 @@ export declare class DocumentUploadComponent implements OnInit, OnChanges, OnDes
29
29
  private dataService;
30
30
  /** The context ID for the document upload operation */
31
31
  contextId: string;
32
+ /** Indicates if the document save button has been clicked */
32
33
  isDocumentSaveBtnClicked: boolean;
34
+ /** Indicates if the document sidebar is closed */
33
35
  isDocumentSidebarClosed: boolean;
36
+ /** Whether there are unsaved changes in the form */
34
37
  hasUnsavedChanges: boolean;
35
38
  /** Whether to hide the form and show only upload functionality */
36
39
  isFormHide: boolean;
@@ -6,6 +6,7 @@ import { UserListModel } from '../../models/user-list.model';
6
6
  import { StatusDataModel } from '../../models/status-data.model';
7
7
  import { DocumentCategory } from '../../models/document-category.model';
8
8
  import { DocumentUploadComponent } from '../document-upload/document-upload.component';
9
+ import { RequestDocumentComponent } from '../request-document/request-document.component';
9
10
  import { DocumentHelperService } from '../../services/document.service';
10
11
  import { SidebarComponent } from '../sidebar/sidebar.component';
11
12
  import * as i0 from "@angular/core";
@@ -60,22 +61,34 @@ export declare class FolderContainerComponent implements OnInit {
60
61
  * Controls the visibility of the document upload sidebar
61
62
  */
62
63
  isDocumentUploadSidebarOpen: boolean;
64
+ /**
65
+ * Controls the visibility of the request document sidebar
66
+ */
67
+ isRequestDocumentSidebarOpen: boolean;
63
68
  /**
64
69
  * Reference to the document upload component
65
70
  */
66
71
  documentUploadComponent: DocumentUploadComponent;
67
72
  /**
68
- * Reference to the sidebar component
73
+ * References to the sidebars
69
74
  */
70
- sidebarComponent: SidebarComponent;
75
+ uploadSidebarComponent: SidebarComponent;
76
+ requestSidebarComponent: SidebarComponent;
77
+ requestDocumentComponent: RequestDocumentComponent;
71
78
  /**
72
79
  * Tracks whether the save button should be disabled
73
80
  */
74
81
  isSaveButtonDisabled: boolean;
82
+ /** Tracks save button disabled for request document */
83
+ isRequestSaveButtonDisabled: boolean;
75
84
  /**
76
85
  * Tracks whether there are unsaved changes in the document upload form
77
86
  */
78
87
  hasUnsavedChanges: boolean;
88
+ /**
89
+ * Tracks whether there are unsaved changes in the request document form
90
+ */
91
+ requestHasUnsavedChanges: boolean;
79
92
  constructor(documentQuery: DocumentQuery, documentHelperService: DocumentHelperService);
80
93
  ngOnInit(): void;
81
94
  /**
@@ -90,6 +103,8 @@ export declare class FolderContainerComponent implements OnInit {
90
103
  * Handles form validation changes from the document upload component
91
104
  */
92
105
  onFormValidationChange(): void;
106
+ /** Updates request save button disabled state */
107
+ onRequestFormValidationChange(): void;
93
108
  /**
94
109
  * Checks if there are unsaved changes in the document upload form
95
110
  */
@@ -98,6 +113,10 @@ export declare class FolderContainerComponent implements OnInit {
98
113
  * Opens the document upload sidebar
99
114
  */
100
115
  openDocumentUploadSidebar(): void;
116
+ /**
117
+ * Opens the request document sidebar
118
+ */
119
+ openRequestDocumentSidebar(): void;
101
120
  /**
102
121
  * Handles the document upload sidebar hide event
103
122
  */
@@ -110,6 +129,22 @@ export declare class FolderContainerComponent implements OnInit {
110
129
  * Handles the document upload sidebar close with unsaved changes event
111
130
  */
112
131
  onDocumentUploadSidebarCloseWithUnsavedChanges(): void;
132
+ /**
133
+ * Handles the request document sidebar hide event
134
+ */
135
+ onRequestDocumentSidebarHide(): void;
136
+ /**
137
+ * Handles the request document sidebar close with unsaved changes event
138
+ */
139
+ onRequestDocumentSidebarCloseWithUnsavedChanges(): void;
140
+ /** Invoked from sidebar Save button for request document */
141
+ onRequestDocumentSave(): void;
142
+ /** Request success handler */
143
+ onRequestDocumentSuccess(): void;
144
+ /** Request error handler */
145
+ onRequestDocumentError(error: any): void;
146
+ /** Handle unsaved changes state from request form */
147
+ onRequestUnsavedChange(hasChanges: boolean): void;
113
148
  /**
114
149
  * Handles the document upload save event
115
150
  */
@@ -0,0 +1,69 @@
1
+ import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit, SimpleChanges, OnChanges } from '@angular/core';
2
+ import { UserListModel } from '../../models/user-list.model';
3
+ import { DocumentCategory } from '../../models/document-category.model';
4
+ import { DocumentTypeModel } from '../../models/document-type.model';
5
+ import { DocumentUploadService } from '../../services/document-upload.service';
6
+ import { DocumentUploadFormService } from '../../services/document-upload-form.service';
7
+ import { DocumentUploadDataService } from '../../services/document-upload-data.service';
8
+ import { DocumentHttpService } from '../../services/document-http.service';
9
+ import { SessionService } from '../../../../Shared/services/session.service';
10
+ import * as i0 from "@angular/core";
11
+ export declare class RequestDocumentComponent implements OnInit, OnChanges, OnDestroy {
12
+ documentUpload: DocumentUploadService;
13
+ private formService;
14
+ private dataService;
15
+ private cdr;
16
+ private documentHttpService;
17
+ private sessionService;
18
+ contextId: string;
19
+ isRequestSaveBtnClicked: boolean;
20
+ isRequestSidebarClosed: boolean;
21
+ onFormValidationChange: EventEmitter<void>;
22
+ onRequestSuccess: EventEmitter<void>;
23
+ onRequestError: EventEmitter<any>;
24
+ hasUnsavedChangesChange: EventEmitter<boolean>;
25
+ selectedAssignmentType: 'Applicant' | 'Application' | null;
26
+ selectedApplicant: string;
27
+ selectedCategory: string;
28
+ selectedDocumentType: string;
29
+ description: string;
30
+ applicantList: UserListModel[];
31
+ filteredApplicantList: UserListModel[];
32
+ categoryOptions: DocumentCategory[];
33
+ documentTypeOptions: DocumentTypeModel[];
34
+ isLoadingApplicants: boolean;
35
+ isLoadingCategories: boolean;
36
+ isLoadingDocumentTypes: boolean;
37
+ isSaving: boolean;
38
+ isFormValid: boolean;
39
+ private destroy$;
40
+ constructor(documentUpload: DocumentUploadService, formService: DocumentUploadFormService, dataService: DocumentUploadDataService, cdr: ChangeDetectorRef, documentHttpService: DocumentHttpService, sessionService: SessionService);
41
+ ngOnInit(): void;
42
+ ngOnChanges(changes: SimpleChanges): void;
43
+ onAssignmentTypeChange(): void;
44
+ onCategoryChange(): void;
45
+ onDocumentTypeChange(): void;
46
+ onApplicantSelectionChange(): void;
47
+ onDescriptionChange(): void;
48
+ loadApplicants(): void;
49
+ loadCategories(): void;
50
+ loadDocumentTypes(): void;
51
+ getSaveButtonDisabled(): boolean;
52
+ saveRequestDocument(): void;
53
+ resetForm(): void;
54
+ resetSelections(): void;
55
+ resetDocumentType(): void;
56
+ handleApplicantLoading(): void;
57
+ handleApplicantsLoaded(applicants: UserListModel[]): void;
58
+ handleCategoriesLoaded(categories: DocumentCategory[]): void;
59
+ handleDocumentTypesLoaded(documentTypes: DocumentTypeModel[]): void;
60
+ filterApplicants(): void;
61
+ validateForm(): void;
62
+ validateAndEmit(): void;
63
+ /** Emits unsaved changes state based on any field being non-empty */
64
+ private emitUnsavedChanges;
65
+ handleError(_title: string, _error: any, resetLoading: () => void): void;
66
+ ngOnDestroy(): void;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<RequestDocumentComponent, never>;
68
+ static ɵcmp: i0.ɵɵComponentDeclaration<RequestDocumentComponent, "lib-request-document", never, { "contextId": { "alias": "contextId"; "required": false; }; "isRequestSaveBtnClicked": { "alias": "isRequestSaveBtnClicked"; "required": false; }; "isRequestSidebarClosed": { "alias": "isRequestSidebarClosed"; "required": false; }; }, { "onFormValidationChange": "onFormValidationChange"; "onRequestSuccess": "onRequestSuccess"; "onRequestError": "onRequestError"; "hasUnsavedChangesChange": "hasUnsavedChangesChange"; }, never, never, false, never>;
69
+ }
@@ -17,34 +17,35 @@ import * as i15 from "./components/document-status/document-status.component";
17
17
  import * as i16 from "./components/document-actions/document-actions.component";
18
18
  import * as i17 from "./components/document-search/document-search.component";
19
19
  import * as i18 from "./components/sidebar/sidebar.component";
20
- import * as i19 from "@angular/common";
21
- import * as i20 from "primeng/accordion";
22
- import * as i21 from "@angular/common/http";
23
- import * as i22 from "primeng/button";
24
- import * as i23 from "primeng/sidebar";
25
- import * as i24 from "primeng/fileupload";
26
- import * as i25 from "primeng/progressbar";
27
- import * as i26 from "primeng/badge";
28
- import * as i27 from "primeng/listbox";
29
- import * as i28 from "primeng/checkbox";
30
- import * as i29 from "primeng/radiobutton";
31
- import * as i30 from "primeng/timeline";
32
- import * as i31 from "primeng/inputtextarea";
33
- import * as i32 from "@angular/forms";
34
- import * as i33 from "ng2-pdf-viewer";
35
- import * as i34 from "ngx-doc-viewer";
36
- import * as i35 from "primeng/dialog";
37
- import * as i36 from "primeng/dropdown";
38
- import * as i37 from "primeng/inputtext";
39
- import * as i38 from "primeng/menu";
40
- import * as i39 from "primeng/panelmenu";
41
- import * as i40 from "primeng/card";
42
- import * as i41 from "primeng/table";
43
- import * as i42 from "../../Shared/shared.module";
44
- import * as i43 from "primeng/toast";
45
- import * as i44 from "primeng/tooltip";
46
- import * as i45 from "primeng/messages";
47
- import * as i46 from "primeng/message";
20
+ import * as i19 from "./components/request-document/request-document.component";
21
+ import * as i20 from "@angular/common";
22
+ import * as i21 from "primeng/accordion";
23
+ import * as i22 from "@angular/common/http";
24
+ import * as i23 from "primeng/button";
25
+ import * as i24 from "primeng/sidebar";
26
+ import * as i25 from "primeng/fileupload";
27
+ import * as i26 from "primeng/progressbar";
28
+ import * as i27 from "primeng/badge";
29
+ import * as i28 from "primeng/listbox";
30
+ import * as i29 from "primeng/checkbox";
31
+ import * as i30 from "primeng/radiobutton";
32
+ import * as i31 from "primeng/timeline";
33
+ import * as i32 from "primeng/inputtextarea";
34
+ import * as i33 from "@angular/forms";
35
+ import * as i34 from "ng2-pdf-viewer";
36
+ import * as i35 from "ngx-doc-viewer";
37
+ import * as i36 from "primeng/dialog";
38
+ import * as i37 from "primeng/dropdown";
39
+ import * as i38 from "primeng/inputtext";
40
+ import * as i39 from "primeng/menu";
41
+ import * as i40 from "primeng/panelmenu";
42
+ import * as i41 from "primeng/card";
43
+ import * as i42 from "primeng/table";
44
+ import * as i43 from "../../Shared/shared.module";
45
+ import * as i44 from "primeng/toast";
46
+ import * as i45 from "primeng/tooltip";
47
+ import * as i46 from "primeng/messages";
48
+ import * as i47 from "primeng/message";
48
49
  /**
49
50
  * @module DocumentModule
50
51
  *
@@ -54,6 +55,6 @@ import * as i46 from "primeng/message";
54
55
  */
55
56
  export declare class DocumentModule {
56
57
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentModule, never>;
57
- static ɵmod: i0.ɵɵNgModuleDeclaration<DocumentModule, [typeof i1.DocumentContainerComponent, typeof i2.FolderContainerComponent, typeof i3.FolderBlockComponent, typeof i4.DocumentListComponent, typeof i5.DocumentListItemComponent, typeof i6.DocumentUploadComponent, typeof i7.DocumentViewerComponent, typeof i8.DocumentHistoryComponent, typeof i9.DocumentContentViewerComponent, typeof i10.DocumentZoomControlsComponent, typeof i11.DocumentDirective, typeof i12.LinkedDocumentComponent, typeof i13.DocumentsMenuComponent, typeof i14.UserListComponent, typeof i15.DocumentStatusComponent, typeof i16.DocumentActionsComponent, typeof i17.DocumentSearchComponent, typeof i18.SidebarComponent], [typeof i19.CommonModule, typeof i20.AccordionModule, typeof i21.HttpClientModule, typeof i22.ButtonModule, typeof i23.SidebarModule, typeof i24.FileUploadModule, typeof i25.ProgressBarModule, typeof i26.BadgeModule, typeof i27.ListboxModule, typeof i28.CheckboxModule, typeof i29.RadioButtonModule, typeof i30.TimelineModule, typeof i31.InputTextareaModule, typeof i32.FormsModule, typeof i33.PdfViewerModule, typeof i34.NgxDocViewerModule, typeof i35.DialogModule, typeof i36.DropdownModule, typeof i37.InputTextModule, typeof i38.MenuModule, typeof i39.PanelMenuModule, typeof i40.CardModule, typeof i41.TableModule, typeof i42.SharedModule, typeof i31.InputTextareaModule, typeof i43.ToastModule, typeof i44.TooltipModule, typeof i45.MessagesModule, typeof i46.MessageModule], [typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent, typeof i9.DocumentContentViewerComponent, typeof i10.DocumentZoomControlsComponent, typeof i16.DocumentActionsComponent, typeof i4.DocumentListComponent, typeof i6.DocumentUploadComponent, typeof i11.DocumentDirective, typeof i17.DocumentSearchComponent, typeof i18.SidebarComponent]>;
58
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DocumentModule, [typeof i1.DocumentContainerComponent, typeof i2.FolderContainerComponent, typeof i3.FolderBlockComponent, typeof i4.DocumentListComponent, typeof i5.DocumentListItemComponent, typeof i6.DocumentUploadComponent, typeof i7.DocumentViewerComponent, typeof i8.DocumentHistoryComponent, typeof i9.DocumentContentViewerComponent, typeof i10.DocumentZoomControlsComponent, typeof i11.DocumentDirective, typeof i12.LinkedDocumentComponent, typeof i13.DocumentsMenuComponent, typeof i14.UserListComponent, typeof i15.DocumentStatusComponent, typeof i16.DocumentActionsComponent, typeof i17.DocumentSearchComponent, typeof i18.SidebarComponent, typeof i19.RequestDocumentComponent], [typeof i20.CommonModule, typeof i21.AccordionModule, typeof i22.HttpClientModule, typeof i23.ButtonModule, typeof i24.SidebarModule, typeof i25.FileUploadModule, typeof i26.ProgressBarModule, typeof i27.BadgeModule, typeof i28.ListboxModule, typeof i29.CheckboxModule, typeof i30.RadioButtonModule, typeof i31.TimelineModule, typeof i32.InputTextareaModule, typeof i33.FormsModule, typeof i34.PdfViewerModule, typeof i35.NgxDocViewerModule, typeof i36.DialogModule, typeof i37.DropdownModule, typeof i38.InputTextModule, typeof i39.MenuModule, typeof i40.PanelMenuModule, typeof i41.CardModule, typeof i42.TableModule, typeof i43.SharedModule, typeof i32.InputTextareaModule, typeof i44.ToastModule, typeof i45.TooltipModule, typeof i46.MessagesModule, typeof i47.MessageModule], [typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent, typeof i9.DocumentContentViewerComponent, typeof i10.DocumentZoomControlsComponent, typeof i16.DocumentActionsComponent, typeof i4.DocumentListComponent, typeof i6.DocumentUploadComponent, typeof i11.DocumentDirective, typeof i17.DocumentSearchComponent, typeof i18.SidebarComponent, typeof i19.RequestDocumentComponent]>;
58
59
  static ɵinj: i0.ɵɵInjectorDeclaration<DocumentModule>;
59
60
  }
@@ -167,6 +167,7 @@ export declare class DocumentHttpService {
167
167
  * @returns Observable of file content as text
168
168
  */
169
169
  downloadEmailFile(documentUrl: string): Observable<string>;
170
+ documentRequest(payload: any): Observable<any>;
170
171
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHttpService, never>;
171
172
  static ɵprov: i0.ɵɵInjectableDeclaration<DocumentHttpService>;
172
173
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cat-documents-ng",
3
- "version": "0.5.15",
3
+ "version": "0.5.17",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"
package/public-api.d.ts CHANGED
@@ -9,6 +9,7 @@ export * from './lib/document/components/document-history/document-history.compo
9
9
  export * from './lib/document/components/document-list/document-list.component';
10
10
  export * from './lib/document/components/document-search/document-search.component';
11
11
  export * from './lib/document/components/sidebar/sidebar.component';
12
+ export * from './lib/document/components/request-document/request-document.component';
12
13
  export * from './lib/document/models/document-history.model';
13
14
  export * from './lib/document/models/uploaded-file-response.model';
14
15
  export * from './lib/document/services/document-table-builder.service';