cat-documents-ng 0.3.31 → 0.3.33

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.
@@ -174,11 +174,11 @@ export declare class DocumentContentViewerComponent implements OnChanges, OnInit
174
174
  */
175
175
  ngOnInit(): void;
176
176
  /**
177
- * Downloads the document
177
+ * Downloads the document using a robust approach that bypasses Angular Router interception
178
178
  */
179
179
  downloadDocument(): void;
180
180
  /**
181
- * Opens the document in a new tab
181
+ * Opens the document in a new tab using a robust approach that bypasses Angular Router interception
182
182
  */
183
183
  openInNewTab(): void;
184
184
  /**
@@ -55,35 +55,9 @@ export declare class DocumentHistoryComponent {
55
55
  */
56
56
  toggleAccordion(): void;
57
57
  /**
58
- * Process history data to add computed properties
59
- */
58
+ * Process history data to add computed properties
59
+ */
60
60
  get processedHistoryData(): ProcessedDocumentHistorySection[];
61
- /**
62
- * Downloads a document when clicked
63
- * @param documentUrl - The URL of the document to download
64
- * @param docName - The name of the document
65
- */
66
- downloadDocument(documentUrl: string, docName?: string): void;
67
- /**
68
- * Test method to verify click events are working
69
- */
70
- testClick(): void;
71
- /**
72
- * Test method to verify download functionality
73
- */
74
- testDownload(): void;
75
- /**
76
- * Debug method for mouse down events
77
- */
78
- onMouseDown(itemName: string | undefined): void;
79
- /**
80
- * Debug method for mouse up events
81
- */
82
- onMouseUp(itemName: string | undefined): void;
83
- /**
84
- * Debug method for click events
85
- */
86
- onElementClick(itemName: string | undefined, documentUrl: string | undefined): void;
87
61
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHistoryComponent, never>;
88
62
  static ɵcmp: i0.ɵɵComponentDeclaration<DocumentHistoryComponent, "document-history", never, { "historyData": { "alias": "historyData"; "required": false; }; "showHistory": { "alias": "showHistory"; "required": false; }; }, {}, never, never, false, never>;
89
63
  }
@@ -0,0 +1,19 @@
1
+ import { ElementRef, Renderer2 } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Directive to handle external links and ensure they work regardless of Angular Router configuration.
5
+ * This bypasses any router interception and ensures the link opens as expected.
6
+ */
7
+ export declare class ExternalLinkDirective {
8
+ private el;
9
+ private renderer;
10
+ externalLink: string;
11
+ target: string;
12
+ download?: string;
13
+ constructor(el: ElementRef, renderer: Renderer2);
14
+ onClick(event: Event): void;
15
+ private handleDownload;
16
+ private openInNewTab;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExternalLinkDirective, never>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ExternalLinkDirective, "[externalLink]", never, { "externalLink": { "alias": "externalLink"; "required": false; }; "target": { "alias": "target"; "required": false; }; "download": { "alias": "download"; "required": false; }; }, {}, never, never, true, never>;
19
+ }
@@ -30,20 +30,21 @@ import * as i28 from "primeng/radiobutton";
30
30
  import * as i29 from "primeng/timeline";
31
31
  import * as i30 from "primeng/inputtextarea";
32
32
  import * as i31 from "@angular/forms";
33
- import * as i32 from "ng2-pdf-viewer";
34
- import * as i33 from "ngx-doc-viewer";
35
- import * as i34 from "primeng/dialog";
36
- import * as i35 from "primeng/dropdown";
37
- import * as i36 from "primeng/inputtext";
38
- import * as i37 from "primeng/menu";
39
- import * as i38 from "primeng/panelmenu";
40
- import * as i39 from "primeng/card";
41
- import * as i40 from "primeng/table";
42
- import * as i41 from "../../Shared/shared.module";
43
- import * as i42 from "primeng/toast";
44
- import * as i43 from "primeng/tooltip";
45
- import * as i44 from "primeng/messages";
46
- import * as i45 from "primeng/message";
33
+ import * as i32 from "./directives/external-link.directive";
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";
47
48
  /**
48
49
  * @module DocumentModule
49
50
  *
@@ -53,6 +54,6 @@ import * as i45 from "primeng/message";
53
54
  */
54
55
  export declare class DocumentModule {
55
56
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentModule, never>;
56
- 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.DocumentDirective, typeof i11.LinkedDocumentComponent, typeof i12.DocumentsMenuComponent, typeof i13.UserListComponent, typeof i14.DocumentStatusComponent, typeof i15.DocumentActionsComponent, typeof i16.DocumentSearchComponent, typeof i17.SidebarComponent], [typeof i18.CommonModule, typeof i19.AccordionModule, typeof i20.HttpClientModule, typeof i21.ButtonModule, typeof i22.SidebarModule, typeof i23.FileUploadModule, typeof i24.ProgressBarModule, typeof i25.BadgeModule, typeof i26.ListboxModule, typeof i27.CheckboxModule, typeof i28.RadioButtonModule, typeof i29.TimelineModule, typeof i30.InputTextareaModule, typeof i31.FormsModule, typeof i32.PdfViewerModule, typeof i33.NgxDocViewerModule, typeof i34.DialogModule, typeof i35.DropdownModule, typeof i36.InputTextModule, typeof i37.MenuModule, typeof i38.PanelMenuModule, typeof i39.CardModule, typeof i40.TableModule, typeof i41.SharedModule, typeof i30.InputTextareaModule, typeof i42.ToastModule, typeof i43.TooltipModule, typeof i44.MessagesModule, typeof i45.MessageModule], [typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent, typeof i9.DocumentContentViewerComponent, typeof i15.DocumentActionsComponent, typeof i4.DocumentListComponent, typeof i10.DocumentDirective, typeof i16.DocumentSearchComponent, typeof i17.SidebarComponent]>;
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.DocumentDirective, typeof i11.LinkedDocumentComponent, typeof i12.DocumentsMenuComponent, typeof i13.UserListComponent, typeof i14.DocumentStatusComponent, typeof i15.DocumentActionsComponent, typeof i16.DocumentSearchComponent, typeof i17.SidebarComponent], [typeof i18.CommonModule, typeof i19.AccordionModule, typeof i20.HttpClientModule, typeof i21.ButtonModule, typeof i22.SidebarModule, typeof i23.FileUploadModule, typeof i24.ProgressBarModule, typeof i25.BadgeModule, typeof i26.ListboxModule, typeof i27.CheckboxModule, typeof i28.RadioButtonModule, typeof i29.TimelineModule, typeof i30.InputTextareaModule, typeof i31.FormsModule, typeof i32.ExternalLinkDirective, 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 i30.InputTextareaModule, typeof i43.ToastModule, typeof i44.TooltipModule, typeof i45.MessagesModule, typeof i46.MessageModule], [typeof i1.DocumentContainerComponent, typeof i7.DocumentViewerComponent, typeof i9.DocumentContentViewerComponent, typeof i15.DocumentActionsComponent, typeof i4.DocumentListComponent, typeof i10.DocumentDirective, typeof i16.DocumentSearchComponent, typeof i17.SidebarComponent]>;
57
58
  static ɵinj: i0.ɵɵInjectorDeclaration<DocumentModule>;
58
59
  }
@@ -31,17 +31,11 @@ export declare class DocumentHistoryService {
31
31
  */
32
32
  processHistoryData(historyData: DocumentHistorySection[]): ProcessedDocumentHistorySection[];
33
33
  /**
34
- * Downloads a document when clicked
34
+ * Downloads a document when clicked using a robust approach that bypasses Angular Router interception
35
35
  * @param documentUrl - The URL of the document to download
36
36
  * @param docName - The name of the document
37
37
  */
38
38
  downloadDocument(documentUrl: string, docName?: string): void;
39
- /**
40
- * Alternative download method for CORS issues
41
- * @param documentUrl - The URL of the document to download
42
- * @param docName - The name of the document
43
- */
44
- private downloadWithAlternativeMethod;
45
39
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHistoryService, never>;
46
40
  static ɵprov: i0.ɵɵInjectableDeclaration<DocumentHistoryService>;
47
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cat-documents-ng",
3
- "version": "0.3.31",
3
+ "version": "0.3.33",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"
package/public-api.d.ts CHANGED
@@ -12,6 +12,7 @@ export * from './lib/document/models/uploaded-file-response.model';
12
12
  export * from './lib/document/services/document-table-builder.service';
13
13
  export * from './lib/document/services/document-content-type.service';
14
14
  export * from './lib/document/directives/document.directive';
15
+ export * from './lib/document/directives/external-link.directive';
15
16
  export * from './lib/document/directives/permission.directive';
16
17
  export * from './Shared/components/confirmation-dialog/confirmation-dialog.component';
17
18
  export * from './Shared/components/table-primary/table-primary.component';