cat-documents-ng 1.0.35 → 1.0.36

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,4 +1,4 @@
1
- import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
1
+ import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { DocumentHistorySection, HistoryDocument } from '../../models/document-history.model';
3
3
  import { DocumentHistoryService } from '../../services/document-history.service';
4
4
  import { DocumentViewerService } from '../../services/document-viewer.service';
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
10
10
  /**
11
11
  * Component for displaying document history in a timeline format.
12
12
  */
13
- export declare class DocumentHistoryComponent implements OnChanges {
13
+ export declare class DocumentHistoryComponent implements OnChanges, OnInit, OnDestroy {
14
14
  private documentHistoryService;
15
15
  private documentViewerService;
16
16
  private documentActionsService;
@@ -38,6 +38,7 @@ export declare class DocumentHistoryComponent implements OnChanges {
38
38
  * Set false to hide document intelligence UI (default off until enabled).
39
39
  */
40
40
  isDocumentIntelligence: boolean;
41
+ isDocumentAiFeatureEnabled: boolean;
41
42
  /**
42
43
  * Event emitted when delete task is requested
43
44
  */
@@ -62,7 +63,17 @@ export declare class DocumentHistoryComponent implements OnChanges {
62
63
  * Whether the actions dropdown menu is visible
63
64
  */
64
65
  showActionsMenu: boolean;
66
+ private destroy$;
67
+ /**
68
+ * Combines local input control and remote feature flag control.
69
+ * @returns {boolean} True when AI menu/sidebar should be visible.
70
+ */
71
+ get showDocumentAiUi(): boolean;
65
72
  constructor(documentHistoryService: DocumentHistoryService, documentViewerService: DocumentViewerService, documentActionsService: DocumentActionsService, confirmationService: ConfirmationService, documentHttpService: DocumentHttpService, documentHistoryAiService: DocumentHistoryAiService);
73
+ /**
74
+ * Reads Configs and enables AI only when `docIntelligence.data.enabled` is true.
75
+ */
76
+ ngOnInit(): void;
66
77
  /**
67
78
  * Handles changes to input properties
68
79
  * @param {SimpleChanges} changes - Changed input values.
@@ -207,6 +218,10 @@ export declare class DocumentHistoryComponent implements OnChanges {
207
218
  * @param {Event} event - Click event from document.
208
219
  */
209
220
  onDocumentClickOutside(event: Event): void;
221
+ /**
222
+ * Cleans up subscriptions.
223
+ */
224
+ ngOnDestroy(): void;
210
225
  static ɵfac: i0.ɵɵFactoryDeclaration<DocumentHistoryComponent, never>;
211
226
  static ɵcmp: i0.ɵɵComponentDeclaration<DocumentHistoryComponent, "document-history", never, { "historyData": { "alias": "historyData"; "required": false; }; "showHistory": { "alias": "showHistory"; "required": false; }; "contextId": { "alias": "contextId"; "required": false; }; "selectedDocument": { "alias": "selectedDocument"; "required": false; }; "isDocumentIntelligence": { "alias": "isDocumentIntelligence"; "required": false; }; }, { "deleteTaskRequested": "deleteTaskRequested"; "documentSelected": "documentSelected"; }, never, ["*", "[actions-component]"], false, never>;
212
227
  }
@@ -42,6 +42,12 @@ export declare class DocumentHttpService {
42
42
  * @type {string}
43
43
  */
44
44
  get apiUrl(): string;
45
+ /**
46
+ * Fetches application Configs from QW (`catQwUrl` + `Configs`), same shape as host `getApiConfig`.
47
+ * Used for feature flags such as `SHARED.DOCUMENT_CHATBOT` with `data.enabled`.
48
+ * @returns {Observable<any[]>} Config rows or empty array if URL missing or request fails.
49
+ */
50
+ getAppConfigs(): Observable<any[]>;
45
51
  /**
46
52
  * Returns base URL for document intelligence APIs.
47
53
  * @returns {string} Base URL for AI endpoints.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cat-documents-ng",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0"