cat-documents-ng 0.2.60 → 0.2.62

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.
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { SHARED } from '../../../../Shared/constant/SHARED';
3
3
  import { DocumentActionsService, DocumentAction } from '../../services/document-actions.service';
4
+ import { ConfirmationDialogComponent } from '../../../../Shared/components/confirmation-dialog/confirmation-dialog.component';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class DocumentActionsComponent implements OnChanges {
6
7
  private documentActionsService;
@@ -22,6 +23,7 @@ export declare class DocumentActionsComponent implements OnChanges {
22
23
  rejectButtonClass: string;
23
24
  acceptButtonClass: string;
24
25
  isRejectNoteEmpty: boolean;
26
+ confirmationDialog: ConfirmationDialogComponent;
25
27
  constructor(documentActionsService: DocumentActionsService);
26
28
  get rejectNote(): string;
27
29
  set rejectNote(value: string);
@@ -89,6 +89,7 @@ export declare class DocumentListComponent implements OnInit, OnDestroy, OnChang
89
89
  * Completion counts for each category
90
90
  */
91
91
  categoryCompletionCounts: string[];
92
+ deleteMessage: Message[];
92
93
  /**
93
94
  * Getter to format category labels with proper suffix
94
95
  */
@@ -107,14 +108,6 @@ export declare class DocumentListComponent implements OnInit, OnDestroy, OnChang
107
108
  * Initializes the component by setting up document list subscription.
108
109
  */
109
110
  ngOnInit(): void;
110
- /**
111
- * Handles the save click event to update the document's file name.
112
- * This method creates a payload with the updated file name and calls the
113
- * updateDocumentName() method from the documentHttpService. On a successful update,
114
- * it logs a message with the document's ID.
115
- * @returns {void}
116
- */
117
- handleSaveClick(): void;
118
111
  /**
119
112
  * Handles the visibility of the sidebar.
120
113
  * @param {boolean} isVisible - Indicates whether the sidebar should be visible or not.
@@ -138,10 +131,15 @@ export declare class DocumentListComponent implements OnInit, OnDestroy, OnChang
138
131
  * @param {any} rowData - The row data containing the document to delete
139
132
  */
140
133
  handleDeleteAction(rowData: any): void;
134
+ /**
135
+ * Closes the document viewer dialog and resets the selected document
136
+ */
137
+ handleCloseModal(): void;
141
138
  /**
142
139
  * Refreshes the document list after a status update
140
+ * @param {boolean} isDeleteAction - Optional flag indicating if this refresh is due to a delete action
143
141
  */
144
- refreshDocumentList(): void;
142
+ refreshDocumentList(isDeleteAction?: boolean): void;
145
143
  /**
146
144
  * Cleanup subscriptions on component destroy
147
145
  */
@@ -36,7 +36,9 @@ export declare class DocumentViewerComponent implements OnChanges, OnDestroy {
36
36
  * Event emitted when document status is updated to refresh the document list
37
37
  * @type {EventEmitter<void>}
38
38
  */
39
- documentStatusUpdated: EventEmitter<void>;
39
+ documentStatusUpdated: EventEmitter<{
40
+ actionType?: string;
41
+ }>;
40
42
  /**
41
43
  * Indicates whether a checkbox is selected.
42
44
  * @type {boolean}
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { EventEmitter, OnInit, OnChanges, SimpleChanges, ChangeDetectorRef } from '@angular/core';
2
2
  import { DocumentStore } from '../../state/document.store';
3
3
  import { DocumentQuery } from '../../state/document.query';
4
4
  import { UserListModel } from '../../models/user-list.model';
@@ -11,6 +11,7 @@ export declare class UserListComponent implements OnInit, OnChanges {
11
11
  private documentStore;
12
12
  private documentQuery;
13
13
  private userListService;
14
+ private cdr;
14
15
  userList: UserListModel[];
15
16
  categories: DocumentCategory[];
16
17
  userSelected: EventEmitter<string>;
@@ -18,12 +19,15 @@ export declare class UserListComponent implements OnInit, OnChanges {
18
19
  filteredUserData: UserListModel[];
19
20
  selectedUser: string | undefined;
20
21
  shouldShowContainer: boolean;
21
- constructor(documentService: DocumentHelperService, documentStore: DocumentStore, documentQuery: DocumentQuery, userListService: UserListService);
22
+ private userListSubscription;
23
+ private categoriesSubscription;
24
+ constructor(documentService: DocumentHelperService, documentStore: DocumentStore, documentQuery: DocumentQuery, userListService: UserListService, cdr: ChangeDetectorRef);
22
25
  ngOnChanges(changes: SimpleChanges): void;
23
- private initializeUserData;
24
- private updateFilteredUserData;
26
+ initializeUserData(): void;
27
+ updateFilteredUserData(): void;
25
28
  ngOnInit(): void;
26
29
  onUserSelect(username: string, id: string): void;
30
+ ngOnDestroy(): void;
27
31
  static ɵfac: i0.ɵɵFactoryDeclaration<UserListComponent, never>;
28
32
  static ɵcmp: i0.ɵɵComponentDeclaration<UserListComponent, "lib-user-list", never, { "userList": { "alias": "userList"; "required": false; }; "categories": { "alias": "categories"; "required": false; }; }, { "userSelected": "userSelected"; }, never, never, false, never>;
29
33
  }
@@ -38,6 +38,8 @@ import * as i36 from "primeng/panelmenu";
38
38
  import * as i37 from "primeng/card";
39
39
  import * as i38 from "primeng/table";
40
40
  import * as i39 from "../../Shared/shared.module";
41
+ import * as i40 from "primeng/toast";
42
+ import * as i41 from "primeng/confirmdialog";
41
43
  /**
42
44
  * @module DocumentModule
43
45
  *
@@ -47,6 +49,6 @@ import * as i39 from "../../Shared/shared.module";
47
49
  */
48
50
  export declare class DocumentModule {
49
51
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentModule, never>;
50
- 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.DocumentDirective, typeof i10.LinkedDocumentComponent, typeof i11.DocumentsMenuComponent, typeof i12.UserListComponent, typeof i13.DocumentStatusComponent, typeof i14.DocumentActionsComponent, typeof i15.DocumentSearchComponent, typeof i16.SidebarComponent], [typeof i17.CommonModule, typeof i18.AccordionModule, typeof i19.HttpClientModule, typeof i20.ButtonModule, typeof i21.SidebarModule, typeof i22.FileUploadModule, typeof i23.ProgressBarModule, typeof i24.BadgeModule, typeof i25.ListboxModule, typeof i26.CheckboxModule, typeof i27.RadioButtonModule, typeof i28.TimelineModule, typeof i29.InputTextareaModule, typeof i30.FormsModule, typeof i31.PdfViewerModule, typeof i32.DialogModule, typeof i33.DropdownModule, typeof i34.InputTextModule, typeof i35.MenuModule, typeof i36.PanelMenuModule, typeof i37.CardModule, typeof i38.TableModule, typeof i39.SharedModule, typeof i29.InputTextareaModule], [typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent, typeof i14.DocumentActionsComponent, typeof i4.DocumentListComponent, typeof i9.DocumentDirective, typeof i15.DocumentSearchComponent, typeof i16.SidebarComponent]>;
52
+ 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.DocumentDirective, typeof i10.LinkedDocumentComponent, typeof i11.DocumentsMenuComponent, typeof i12.UserListComponent, typeof i13.DocumentStatusComponent, typeof i14.DocumentActionsComponent, typeof i15.DocumentSearchComponent, typeof i16.SidebarComponent], [typeof i17.CommonModule, typeof i18.AccordionModule, typeof i19.HttpClientModule, typeof i20.ButtonModule, typeof i21.SidebarModule, typeof i22.FileUploadModule, typeof i23.ProgressBarModule, typeof i24.BadgeModule, typeof i25.ListboxModule, typeof i26.CheckboxModule, typeof i27.RadioButtonModule, typeof i28.TimelineModule, typeof i29.InputTextareaModule, typeof i30.FormsModule, typeof i31.PdfViewerModule, typeof i32.DialogModule, typeof i33.DropdownModule, typeof i34.InputTextModule, typeof i35.MenuModule, typeof i36.PanelMenuModule, typeof i37.CardModule, typeof i38.TableModule, typeof i39.SharedModule, typeof i29.InputTextareaModule, typeof i40.ToastModule, typeof i41.ConfirmDialogModule], [typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent, typeof i14.DocumentActionsComponent, typeof i4.DocumentListComponent, typeof i9.DocumentDirective, typeof i15.DocumentSearchComponent, typeof i16.SidebarComponent]>;
51
53
  static ɵinj: i0.ɵɵInjectorDeclaration<DocumentModule>;
52
54
  }
@@ -46,6 +46,11 @@ export declare class DocumentQuery extends QueryEntity<DocumentState> {
46
46
  * @returns {Observable<DocumentCategory[]>} Observable that emits the document categories.
47
47
  */
48
48
  selectDocumentCategories(): Observable<DocumentCategory[]>;
49
+ /**
50
+ * Gets the current document categories value (synchronous).
51
+ * @returns {DocumentCategory[]} The current document categories.
52
+ */
53
+ getDocumentCategories(): DocumentCategory[];
49
54
  /**
50
55
  * Selects the currently selected menu item.
51
56
  * @returns {Observable<string | null>} Observable that emits the currently selected menu item _id (not the label).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cat-documents-ng",
3
- "version": "0.2.60",
3
+ "version": "0.2.62",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"
package/public-api.d.ts CHANGED
@@ -10,3 +10,8 @@ export * from './lib/document/models/document-history.model';
10
10
  export * from './lib/document/services/document-table-builder.service';
11
11
  export * from './lib/document/directives/document.directive';
12
12
  export * from './lib/document/directives/permission.directive';
13
+ export * from './Shared/components/confirmation-dialog/confirmation-dialog.component';
14
+ export * from './Shared/components/table-primary/table-primary.component';
15
+ export * from './Shared/components/table-primary/table-primary.model';
16
+ export * from './Shared/constant/SHARED';
17
+ export * from './Shared/shared.module';