@memberjunction/ng-dashboards 5.7.0 → 5.8.0

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 (53) hide show
  1. package/dist/Integration/components/connection-studio/connection-studio.component.d.ts +81 -0
  2. package/dist/Integration/components/connection-studio/connection-studio.component.d.ts.map +1 -0
  3. package/dist/Integration/components/connection-studio/connection-studio.component.js +960 -0
  4. package/dist/Integration/components/connection-studio/connection-studio.component.js.map +1 -0
  5. package/dist/Integration/components/control-tower/control-tower.component.d.ts +43 -0
  6. package/dist/Integration/components/control-tower/control-tower.component.d.ts.map +1 -0
  7. package/dist/Integration/components/control-tower/control-tower.component.js +446 -0
  8. package/dist/Integration/components/control-tower/control-tower.component.js.map +1 -0
  9. package/dist/Integration/components/mapping-workspace/mapping-workspace.component.d.ts +43 -0
  10. package/dist/Integration/components/mapping-workspace/mapping-workspace.component.d.ts.map +1 -0
  11. package/dist/Integration/components/mapping-workspace/mapping-workspace.component.js +467 -0
  12. package/dist/Integration/components/mapping-workspace/mapping-workspace.component.js.map +1 -0
  13. package/dist/Integration/components/sync-activity/sync-activity.component.d.ts +65 -0
  14. package/dist/Integration/components/sync-activity/sync-activity.component.d.ts.map +1 -0
  15. package/dist/Integration/components/sync-activity/sync-activity.component.js +671 -0
  16. package/dist/Integration/components/sync-activity/sync-activity.component.js.map +1 -0
  17. package/dist/Integration/components/widgets/integration-card.component.d.ts +22 -0
  18. package/dist/Integration/components/widgets/integration-card.component.d.ts.map +1 -0
  19. package/dist/Integration/components/widgets/integration-card.component.js +262 -0
  20. package/dist/Integration/components/widgets/integration-card.component.js.map +1 -0
  21. package/dist/Integration/components/widgets/run-history-panel.component.d.ts +29 -0
  22. package/dist/Integration/components/widgets/run-history-panel.component.d.ts.map +1 -0
  23. package/dist/Integration/components/widgets/run-history-panel.component.js +398 -0
  24. package/dist/Integration/components/widgets/run-history-panel.component.js.map +1 -0
  25. package/dist/Integration/index.d.ts +9 -0
  26. package/dist/Integration/index.d.ts.map +1 -0
  27. package/dist/Integration/index.js +16 -0
  28. package/dist/Integration/index.js.map +1 -0
  29. package/dist/Integration/integration.module.d.ts +22 -0
  30. package/dist/Integration/integration.module.d.ts.map +1 -0
  31. package/dist/Integration/integration.module.js +88 -0
  32. package/dist/Integration/integration.module.js.map +1 -0
  33. package/dist/Integration/services/integration-data.service.d.ts +154 -0
  34. package/dist/Integration/services/integration-data.service.d.ts.map +1 -0
  35. package/dist/Integration/services/integration-data.service.js +292 -0
  36. package/dist/Integration/services/integration-data.service.js.map +1 -0
  37. package/dist/__tests__/connection-studio.test.d.ts +2 -0
  38. package/dist/__tests__/connection-studio.test.d.ts.map +1 -0
  39. package/dist/__tests__/connection-studio.test.js +186 -0
  40. package/dist/__tests__/connection-studio.test.js.map +1 -0
  41. package/dist/__tests__/integration-data-service.test.d.ts +2 -0
  42. package/dist/__tests__/integration-data-service.test.d.ts.map +1 -0
  43. package/dist/__tests__/integration-data-service.test.js +131 -0
  44. package/dist/__tests__/integration-data-service.test.js.map +1 -0
  45. package/dist/module.d.ts +2 -1
  46. package/dist/module.d.ts.map +1 -1
  47. package/dist/module.js +17 -6
  48. package/dist/module.js.map +1 -1
  49. package/dist/public-api.d.ts +2 -1
  50. package/dist/public-api.d.ts.map +1 -1
  51. package/dist/public-api.js +3 -1
  52. package/dist/public-api.js.map +1 -1
  53. package/package.json +40 -39
@@ -0,0 +1,186 @@
1
+ /**
2
+ * Tests for ConnectionStudioComponent logic
3
+ * Tests the resolveIntegrationIcon function and component state management
4
+ */
5
+ import { describe, it, expect, vi } from 'vitest';
6
+ // Mock Angular before any component imports
7
+ vi.mock('@angular/core', () => ({
8
+ Injectable: () => (target) => target,
9
+ Component: () => (target) => target,
10
+ NgModule: () => (target) => target,
11
+ Input: () => () => { },
12
+ Output: () => () => { },
13
+ EventEmitter: class {
14
+ emit() { }
15
+ subscribe() { }
16
+ },
17
+ ChangeDetectorRef: class {
18
+ detectChanges() { }
19
+ markForCheck() { }
20
+ },
21
+ ViewContainerRef: class {
22
+ },
23
+ inject: () => ({}),
24
+ OnInit: class {
25
+ },
26
+ }));
27
+ vi.mock('@memberjunction/global', () => ({
28
+ RegisterClass: () => (target) => target,
29
+ UUIDsEqual: (a, b) => {
30
+ if (a == null || b == null)
31
+ return a === b;
32
+ return a.toLowerCase() === b.toLowerCase();
33
+ },
34
+ }));
35
+ vi.mock('@memberjunction/ng-shared', () => ({
36
+ BaseResourceComponent: class {
37
+ get RunViewToUse() { return null; }
38
+ },
39
+ }));
40
+ vi.mock('@memberjunction/core-entities', () => ({
41
+ ResourceData: class {
42
+ },
43
+ MJCredentialEntity: class {
44
+ },
45
+ MJCredentialTypeEntity: class {
46
+ },
47
+ }));
48
+ vi.mock('@memberjunction/core', () => ({
49
+ Metadata: class {
50
+ },
51
+ }));
52
+ vi.mock('@memberjunction/ng-credentials', () => ({
53
+ CredentialDialogService: class {
54
+ getCredentialTypes() { return Promise.resolve([]); }
55
+ createCredential() { return Promise.resolve({ success: false, action: 'cancelled' }); }
56
+ editCredential() { return Promise.resolve({ success: false, action: 'cancelled' }); }
57
+ },
58
+ }));
59
+ vi.mock('../../services/integration-data.service', () => ({
60
+ IntegrationDataService: class {
61
+ LoadIntegrationDefinitions() { return Promise.resolve([]); }
62
+ LoadSourceTypes() { return Promise.resolve([]); }
63
+ },
64
+ }));
65
+ // Test the icon resolution logic directly
66
+ const INTEGRATION_ICONS = {
67
+ hubspot: 'fa-brands fa-hubspot',
68
+ salesforce: 'fa-brands fa-salesforce',
69
+ yourmembership: 'fa-solid fa-id-card-clip',
70
+ csv: 'fa-solid fa-file-csv',
71
+ excel: 'fa-solid fa-file-excel',
72
+ file: 'fa-solid fa-file-import',
73
+ };
74
+ function resolveIntegrationIcon(name) {
75
+ const lower = name.toLowerCase();
76
+ for (const [pattern, icon] of Object.entries(INTEGRATION_ICONS)) {
77
+ if (lower.includes(pattern))
78
+ return icon;
79
+ }
80
+ return 'fa-solid fa-plug';
81
+ }
82
+ describe('resolveIntegrationIcon', () => {
83
+ it('should resolve HubSpot icon', () => {
84
+ expect(resolveIntegrationIcon('HubSpot')).toBe('fa-brands fa-hubspot');
85
+ });
86
+ it('should resolve Salesforce icon', () => {
87
+ expect(resolveIntegrationIcon('Salesforce')).toBe('fa-brands fa-salesforce');
88
+ });
89
+ it('should resolve YourMembership icon', () => {
90
+ expect(resolveIntegrationIcon('YourMembership')).toBe('fa-solid fa-id-card-clip');
91
+ });
92
+ it('should resolve CSV file icon', () => {
93
+ expect(resolveIntegrationIcon('CSV Import')).toBe('fa-solid fa-file-csv');
94
+ });
95
+ it('should return default plug icon for unknown integrations', () => {
96
+ expect(resolveIntegrationIcon('SomeRandomSystem')).toBe('fa-solid fa-plug');
97
+ });
98
+ it('should be case-insensitive', () => {
99
+ expect(resolveIntegrationIcon('HUBSPOT')).toBe('fa-brands fa-hubspot');
100
+ expect(resolveIntegrationIcon('salesforce')).toBe('fa-brands fa-salesforce');
101
+ });
102
+ });
103
+ describe('ConnectionStudio step validation logic', () => {
104
+ function createIntegration(overrides = {}) {
105
+ return {
106
+ ID: 'int-1', Name: 'HubSpot', Description: 'CRM',
107
+ ClassName: 'HubSpotConnector', ImportPath: null,
108
+ NavigationBaseURL: null, BatchMaxRequestCount: -1, BatchRequestWaitTime: -1,
109
+ CredentialTypeID: null,
110
+ ...overrides
111
+ };
112
+ }
113
+ function createSourceType(overrides = {}) {
114
+ return {
115
+ ID: 'st-1', Name: 'SaaS API', Description: null,
116
+ DriverClass: 'SaaSAPIConnector', IconClass: 'fa-solid fa-cloud',
117
+ Status: 'Active',
118
+ ...overrides
119
+ };
120
+ }
121
+ describe('Step 1 validation', () => {
122
+ it('should require integration selection in normal mode', () => {
123
+ const selectedIntegrationID = null;
124
+ const useCustomMode = false;
125
+ const customSourceTypeID = null;
126
+ const isValid = useCustomMode ? !!customSourceTypeID : !!selectedIntegrationID;
127
+ expect(isValid).toBe(false);
128
+ });
129
+ it('should pass with integration selected', () => {
130
+ const selectedIntegrationID = 'int-1';
131
+ const useCustomMode = false;
132
+ const isValid = !useCustomMode && !!selectedIntegrationID;
133
+ expect(isValid).toBe(true);
134
+ });
135
+ it('should require source type in custom mode', () => {
136
+ const useCustomMode = true;
137
+ const customSourceTypeID = null;
138
+ const isValid = useCustomMode ? !!customSourceTypeID : false;
139
+ expect(isValid).toBe(false);
140
+ });
141
+ it('should pass in custom mode with source type', () => {
142
+ const useCustomMode = true;
143
+ const customSourceTypeID = 'st-1';
144
+ const isValid = useCustomMode ? !!customSourceTypeID : false;
145
+ expect(isValid).toBe(true);
146
+ });
147
+ });
148
+ describe('Step 2 validation', () => {
149
+ it('should require connection name', () => {
150
+ expect(!!(''.trim())).toBe(false);
151
+ expect(!!(' '.trim())).toBe(false);
152
+ });
153
+ it('should pass with a name', () => {
154
+ expect(!!('Production HubSpot'.trim())).toBe(true);
155
+ });
156
+ });
157
+ describe('Integration selection behavior', () => {
158
+ it('should pre-fill connection name from integration', () => {
159
+ const integration = createIntegration({ Name: 'Salesforce' });
160
+ const connectionName = integration.Name;
161
+ expect(connectionName).toBe('Salesforce');
162
+ });
163
+ it('should clear custom mode when selecting integration', () => {
164
+ let useCustomMode = true;
165
+ let selectedIntegrationID = null;
166
+ let customSourceTypeID = 'st-1';
167
+ // Simulate SelectIntegration
168
+ useCustomMode = false;
169
+ selectedIntegrationID = 'int-1';
170
+ customSourceTypeID = null;
171
+ expect(useCustomMode).toBe(false);
172
+ expect(selectedIntegrationID).toBe('int-1');
173
+ expect(customSourceTypeID).toBeNull();
174
+ });
175
+ it('should clear integration when selecting custom mode', () => {
176
+ let useCustomMode = false;
177
+ let selectedIntegrationID = 'int-1';
178
+ // Simulate SelectCustomMode
179
+ useCustomMode = true;
180
+ selectedIntegrationID = null;
181
+ expect(useCustomMode).toBe(true);
182
+ expect(selectedIntegrationID).toBeNull();
183
+ });
184
+ });
185
+ });
186
+ //# sourceMappingURL=connection-studio.test.js.map
@@ -0,0 +1 @@
1
+ {"version":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kB,CAAC,CAAC,QAAQ,EAAE,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;YAC7D,IAAI,aAAa,GAAG,KAAK,CAAC;YAC1B,IAAI,qBAAqB,GAAkB,OAAO,CAAC;YAEnD,4BAA4B;YAC5B,aAAa,GAAG,IAAI,CAAC;YACrB,qBAAqB,GAAG,IAAI,CAAC;YAE7B,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjC,MAAM,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Tests for ConnectionStudioComponent logic\n * Tests the resolveIntegrationIcon function and component state management\n */\nimport { describe, it, expect, vi, beforeEach } from 'vitest';\n\n// Mock Angular before any component imports\nvi.mock('@angular/core', () => ({\n Injectable: () => (target: Function) => target,\n Component: () => (target: Function) => target,\n NgModule: () => (target: Function) => target,\n Input: () => () => {},\n Output: () => () => {},\n EventEmitter: class { emit() {} subscribe() {} },\n ChangeDetectorRef: class { detectChanges() {} markForCheck() {} },\n ViewContainerRef: class {},\n inject: () => ({}),\n OnInit: class {},\n}));\n\nvi.mock('@memberjunction/global', () => ({\n RegisterClass: () => (target: Function) => target,\n UUIDsEqual: (a: string | null, b: string | null) => {\n if (a == null || b == null) return a === b;\n return a.toLowerCase() === b.toLowerCase();\n },\n}));\n\nvi.mock('@memberjunction/ng-shared', () => ({\n BaseResourceComponent: class {\n get RunViewToUse() { return null; }\n },\n}));\n\nvi.mock('@memberjunction/core-entities', () => ({\n ResourceData: class {},\n MJCredentialEntity: class {},\n MJCredentialTypeEntity: class {},\n}));\n\nvi.mock('@memberjunction/core', () => ({\n Metadata: class {},\n}));\n\nvi.mock('@memberjunction/ng-credentials', () => ({\n CredentialDialogService: class {\n getCredentialTypes() { return Promise.resolve([]); }\n createCredential() { return Promise.resolve({ success: false, action: 'cancelled' }); }\n editCredential() { return Promise.resolve({ success: false, action: 'cancelled' }); }\n },\n}));\n\nvi.mock('../../services/integration-data.service', () => ({\n IntegrationDataService: class {\n LoadIntegrationDefinitions() { return Promise.resolve([]); }\n LoadSourceTypes() { return Promise.resolve([]); }\n },\n}));\n\nimport { IntegrationDefinitionRow, SourceTypeRow } from '../Integration/services/integration-data.service';\n\n// Test the icon resolution logic directly\nconst INTEGRATION_ICONS: Record<string, string> = {\n hubspot: 'fa-brands fa-hubspot',\n salesforce: 'fa-brands fa-salesforce',\n yourmembership: 'fa-solid fa-id-card-clip',\n csv: 'fa-solid fa-file-csv',\n excel: 'fa-solid fa-file-excel',\n file: 'fa-solid fa-file-import',\n};\n\nfunction resolveIntegrationIcon(name: string): string {\n const lower = name.toLowerCase();\n for (const [pattern, icon] of Object.entries(INTEGRATION_ICONS)) {\n if (lower.includes(pattern)) return icon;\n }\n return 'fa-solid fa-plug';\n}\n\ndescribe('resolveIntegrationIcon', () => {\n it('should resolve HubSpot icon', () => {\n expect(resolveIntegrationIcon('HubSpot')).toBe('fa-brands fa-hubspot');\n });\n\n it('should resolve Salesforce icon', () => {\n expect(resolveIntegrationIcon('Salesforce')).toBe('fa-brands fa-salesforce');\n });\n\n it('should resolve YourMembership icon', () => {\n expect(resolveIntegrationIcon('YourMembership')).toBe('fa-solid fa-id-card-clip');\n });\n\n it('should resolve CSV file icon', () => {\n expect(resolveIntegrationIcon('CSV Import')).toBe('fa-solid fa-file-csv');\n });\n\n it('should return default plug icon for unknown integrations', () => {\n expect(resolveIntegrationIcon('SomeRandomSystem')).toBe('fa-solid fa-plug');\n });\n\n it('should be case-insensitive', () => {\n expect(resolveIntegrationIcon('HUBSPOT')).toBe('fa-brands fa-hubspot');\n expect(resolveIntegrationIcon('salesforce')).toBe('fa-brands fa-salesforce');\n });\n});\n\ndescribe('ConnectionStudio step validation logic', () => {\n function createIntegration(overrides: Partial<IntegrationDefinitionRow> = {}): IntegrationDefinitionRow {\n return {\n ID: 'int-1', Name: 'HubSpot', Description: 'CRM',\n ClassName: 'HubSpotConnector', ImportPath: null,\n NavigationBaseURL: null, BatchMaxRequestCount: -1, BatchRequestWaitTime: -1,\n CredentialTypeID: null,\n ...overrides\n };\n }\n\n function createSourceType(overrides: Partial<SourceTypeRow> = {}): SourceTypeRow {\n return {\n ID: 'st-1', Name: 'SaaS API', Description: null,\n DriverClass: 'SaaSAPIConnector', IconClass: 'fa-solid fa-cloud',\n Status: 'Active',\n ...overrides\n };\n }\n\n describe('Step 1 validation', () => {\n it('should require integration selection in normal mode', () => {\n const selectedIntegrationID: string | null = null;\n const useCustomMode = false;\n const customSourceTypeID: string | null = null;\n\n const isValid = useCustomMode ? !!customSourceTypeID : !!selectedIntegrationID;\n expect(isValid).toBe(false);\n });\n\n it('should pass with integration selected', () => {\n const selectedIntegrationID = 'int-1';\n const useCustomMode = false;\n\n const isValid = !useCustomMode && !!selectedIntegrationID;\n expect(isValid).toBe(true);\n });\n\n it('should require source type in custom mode', () => {\n const useCustomMode = true;\n const customSourceTypeID: string | null = null;\n\n const isValid = useCustomMode ? !!customSourceTypeID : false;\n expect(isValid).toBe(false);\n });\n\n it('should pass in custom mode with source type', () => {\n const useCustomMode = true;\n const customSourceTypeID = 'st-1';\n\n const isValid = useCustomMode ? !!customSourceTypeID : false;\n expect(isValid).toBe(true);\n });\n });\n\n describe('Step 2 validation', () => {\n it('should require connection name', () => {\n expect(!!(''.trim())).toBe(false);\n expect(!!(' '.trim())).toBe(false);\n });\n\n it('should pass with a name', () => {\n expect(!!('Production HubSpot'.trim())).toBe(true);\n });\n });\n\n describe('Integration selection behavior', () => {\n it('should pre-fill connection name from integration', () => {\n const integration = createIntegration({ Name: 'Salesforce' });\n const connectionName = integration.Name;\n expect(connectionName).toBe('Salesforce');\n });\n\n it('should clear custom mode when selecting integration', () => {\n let useCustomMode = true;\n let selectedIntegrationID: string | null = null;\n let customSourceTypeID: string | null = 'st-1';\n\n // Simulate SelectIntegration\n useCustomMode = false;\n selectedIntegrationID = 'int-1';\n customSourceTypeID = null;\n\n expect(useCustomMode).toBe(false);\n expect(selectedIntegrationID).toBe('int-1');\n expect(customSourceTypeID).toBeNull();\n });\n\n it('should clear integration when selecting custom mode', () => {\n let useCustomMode = false;\n let selectedIntegrationID: string | null = 'int-1';\n\n // Simulate SelectCustomMode\n useCustomMode = true;\n selectedIntegrationID = null;\n\n expect(useCustomMode).toBe(true);\n expect(selectedIntegrationID).toBeNull();\n });\n });\n});\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=integration-data-service.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-data-service.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/integration-data-service.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,131 @@
1
+ /**
2
+ * Tests for IntegrationDataService
3
+ * Covers pure logic methods (KPI computation, formatting, status calculation)
4
+ */
5
+ import { describe, it, expect } from 'vitest';
6
+ import { IntegrationDataService } from '../Integration/services/integration-data.service';
7
+ function createService() {
8
+ return new IntegrationDataService();
9
+ }
10
+ function createSummary(overrides = {}) {
11
+ return {
12
+ Integration: {
13
+ ID: '1', Name: 'Test', IsActive: true, LastRunID: null,
14
+ LastRunStartedAt: null, LastRunEndedAt: null, Company: 'TestCo',
15
+ Integration: 'Test', DriverClassName: null
16
+ },
17
+ SourceType: null,
18
+ LatestRun: null,
19
+ RecentRuns: [],
20
+ StatusColor: 'gray',
21
+ RelativeTime: 'Never run',
22
+ TotalRecordsSyncedToday: 0,
23
+ TotalErrors: 0,
24
+ DurationMs: null,
25
+ ...overrides
26
+ };
27
+ }
28
+ function createRun(overrides = {}) {
29
+ return {
30
+ ID: '1', CompanyIntegrationID: '1', StartedAt: null, EndedAt: null,
31
+ TotalRecords: 0, Status: 'Success', ErrorLog: null,
32
+ Integration: 'Test', Company: 'TestCo', RunByUser: 'Admin',
33
+ ...overrides
34
+ };
35
+ }
36
+ describe('IntegrationDataService', () => {
37
+ describe('ComputeKPIs', () => {
38
+ it('should return zeros for empty summaries', () => {
39
+ const svc = createService();
40
+ const kpis = svc.ComputeKPIs([]);
41
+ expect(kpis.TotalIntegrations).toBe(0);
42
+ expect(kpis.ActiveSyncs).toBe(0);
43
+ expect(kpis.RecordsSyncedToday).toBe(0);
44
+ expect(kpis.ErrorRate).toBe(0);
45
+ expect(kpis.AverageSyncDurationMs).toBeNull();
46
+ });
47
+ it('should count total integrations', () => {
48
+ const svc = createService();
49
+ const summaries = [createSummary(), createSummary(), createSummary()];
50
+ const kpis = svc.ComputeKPIs(summaries);
51
+ expect(kpis.TotalIntegrations).toBe(3);
52
+ });
53
+ it('should count active syncs (In Progress and Pending)', () => {
54
+ const svc = createService();
55
+ const summaries = [
56
+ createSummary({ LatestRun: createRun({ Status: 'In Progress' }) }),
57
+ createSummary({ LatestRun: createRun({ Status: 'Pending' }) }),
58
+ createSummary({ LatestRun: createRun({ Status: 'Success' }) }),
59
+ ];
60
+ const kpis = svc.ComputeKPIs(summaries);
61
+ expect(kpis.ActiveSyncs).toBe(2);
62
+ });
63
+ it('should sum records synced today', () => {
64
+ const svc = createService();
65
+ const summaries = [
66
+ createSummary({ TotalRecordsSyncedToday: 100 }),
67
+ createSummary({ TotalRecordsSyncedToday: 250 }),
68
+ ];
69
+ const kpis = svc.ComputeKPIs(summaries);
70
+ expect(kpis.RecordsSyncedToday).toBe(350);
71
+ });
72
+ it('should compute error rate from recent runs', () => {
73
+ const svc = createService();
74
+ const runs = [createRun(), createRun(), createRun(), createRun()];
75
+ const summaries = [
76
+ createSummary({ RecentRuns: runs, TotalErrors: 1 }),
77
+ ];
78
+ const kpis = svc.ComputeKPIs(summaries);
79
+ expect(kpis.ErrorRate).toBe(25);
80
+ });
81
+ it('should compute average sync duration', () => {
82
+ const svc = createService();
83
+ const summaries = [
84
+ createSummary({ DurationMs: 1000 }),
85
+ createSummary({ DurationMs: 3000 }),
86
+ createSummary({ DurationMs: null }),
87
+ ];
88
+ const kpis = svc.ComputeKPIs(summaries);
89
+ expect(kpis.AverageSyncDurationMs).toBe(2000);
90
+ });
91
+ });
92
+ describe('FormatDuration', () => {
93
+ it('should return -- for null', () => {
94
+ expect(createService().FormatDuration(null)).toBe('--');
95
+ });
96
+ it('should format seconds', () => {
97
+ expect(createService().FormatDuration(45000)).toBe('45s');
98
+ });
99
+ it('should format minutes and seconds', () => {
100
+ expect(createService().FormatDuration(125000)).toBe('2m 5s');
101
+ });
102
+ it('should format hours and minutes', () => {
103
+ expect(createService().FormatDuration(3720000)).toBe('1h 2m');
104
+ });
105
+ it('should format zero seconds', () => {
106
+ expect(createService().FormatDuration(0)).toBe('0s');
107
+ });
108
+ });
109
+ describe('ComputeRelativeTime', () => {
110
+ it('should return "Never run" for null', () => {
111
+ expect(createService().ComputeRelativeTime(null)).toBe('Never run');
112
+ });
113
+ it('should return "Just now" for recent dates', () => {
114
+ const now = new Date().toISOString();
115
+ expect(createService().ComputeRelativeTime(now)).toBe('Just now');
116
+ });
117
+ it('should return minutes for recent past', () => {
118
+ const fiveMinAgo = new Date(Date.now() - 5 * 60 * 1000).toISOString();
119
+ expect(createService().ComputeRelativeTime(fiveMinAgo)).toBe('5m ago');
120
+ });
121
+ it('should return hours for hours ago', () => {
122
+ const threeHoursAgo = new Date(Date.now() - 3 * 60 * 60 * 1000).toISOString();
123
+ expect(createService().ComputeRelativeTime(threeHoursAgo)).toBe('3h ago');
124
+ });
125
+ it('should return days for days ago', () => {
126
+ const twoDaysAgo = new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString();
127
+ expect(createService().ComputeRelativeTime(twoDaysAgo)).toBe('2d ago');
128
+ });
129
+ });
130
+ });
131
+ //# sourceMappingURL=integration-data-service.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-data-service.test.js","sourceRoot":"","sources":["../../src/__tests__/integration-data-service.test.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,Q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E,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;YAChF,MAAM,CAAC,aAAa,EAAE,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Tests for IntegrationDataService\n * Covers pure logic methods (KPI computation, formatting, status calculation)\n */\nimport { describe, it, expect } from 'vitest';\nimport { IntegrationDataService, IntegrationSummary, IntegrationRunRow } from '../Integration/services/integration-data.service';\n\nfunction createService(): IntegrationDataService {\n return new IntegrationDataService();\n}\n\nfunction createSummary(overrides: Partial<IntegrationSummary> = {}): IntegrationSummary {\n return {\n Integration: {\n ID: '1', Name: 'Test', IsActive: true, LastRunID: null,\n LastRunStartedAt: null, LastRunEndedAt: null, Company: 'TestCo',\n Integration: 'Test', DriverClassName: null\n },\n SourceType: null,\n LatestRun: null,\n RecentRuns: [],\n StatusColor: 'gray',\n RelativeTime: 'Never run',\n TotalRecordsSyncedToday: 0,\n TotalErrors: 0,\n DurationMs: null,\n ...overrides\n };\n}\n\nfunction createRun(overrides: Partial<IntegrationRunRow> = {}): IntegrationRunRow {\n return {\n ID: '1', CompanyIntegrationID: '1', StartedAt: null, EndedAt: null,\n TotalRecords: 0, Status: 'Success', ErrorLog: null,\n Integration: 'Test', Company: 'TestCo', RunByUser: 'Admin',\n ...overrides\n };\n}\n\ndescribe('IntegrationDataService', () => {\n describe('ComputeKPIs', () => {\n it('should return zeros for empty summaries', () => {\n const svc = createService();\n const kpis = svc.ComputeKPIs([]);\n expect(kpis.TotalIntegrations).toBe(0);\n expect(kpis.ActiveSyncs).toBe(0);\n expect(kpis.RecordsSyncedToday).toBe(0);\n expect(kpis.ErrorRate).toBe(0);\n expect(kpis.AverageSyncDurationMs).toBeNull();\n });\n\n it('should count total integrations', () => {\n const svc = createService();\n const summaries = [createSummary(), createSummary(), createSummary()];\n const kpis = svc.ComputeKPIs(summaries);\n expect(kpis.TotalIntegrations).toBe(3);\n });\n\n it('should count active syncs (In Progress and Pending)', () => {\n const svc = createService();\n const summaries = [\n createSummary({ LatestRun: createRun({ Status: 'In Progress' }) }),\n createSummary({ LatestRun: createRun({ Status: 'Pending' }) }),\n createSummary({ LatestRun: createRun({ Status: 'Success' }) }),\n ];\n const kpis = svc.ComputeKPIs(summaries);\n expect(kpis.ActiveSyncs).toBe(2);\n });\n\n it('should sum records synced today', () => {\n const svc = createService();\n const summaries = [\n createSummary({ TotalRecordsSyncedToday: 100 }),\n createSummary({ TotalRecordsSyncedToday: 250 }),\n ];\n const kpis = svc.ComputeKPIs(summaries);\n expect(kpis.RecordsSyncedToday).toBe(350);\n });\n\n it('should compute error rate from recent runs', () => {\n const svc = createService();\n const runs = [createRun(), createRun(), createRun(), createRun()];\n const summaries = [\n createSummary({ RecentRuns: runs, TotalErrors: 1 }),\n ];\n const kpis = svc.ComputeKPIs(summaries);\n expect(kpis.ErrorRate).toBe(25);\n });\n\n it('should compute average sync duration', () => {\n const svc = createService();\n const summaries = [\n createSummary({ DurationMs: 1000 }),\n createSummary({ DurationMs: 3000 }),\n createSummary({ DurationMs: null }),\n ];\n const kpis = svc.ComputeKPIs(summaries);\n expect(kpis.AverageSyncDurationMs).toBe(2000);\n });\n });\n\n describe('FormatDuration', () => {\n it('should return -- for null', () => {\n expect(createService().FormatDuration(null)).toBe('--');\n });\n\n it('should format seconds', () => {\n expect(createService().FormatDuration(45000)).toBe('45s');\n });\n\n it('should format minutes and seconds', () => {\n expect(createService().FormatDuration(125000)).toBe('2m 5s');\n });\n\n it('should format hours and minutes', () => {\n expect(createService().FormatDuration(3720000)).toBe('1h 2m');\n });\n\n it('should format zero seconds', () => {\n expect(createService().FormatDuration(0)).toBe('0s');\n });\n });\n\n describe('ComputeRelativeTime', () => {\n it('should return \"Never run\" for null', () => {\n expect(createService().ComputeRelativeTime(null)).toBe('Never run');\n });\n\n it('should return \"Just now\" for recent dates', () => {\n const now = new Date().toISOString();\n expect(createService().ComputeRelativeTime(now)).toBe('Just now');\n });\n\n it('should return minutes for recent past', () => {\n const fiveMinAgo = new Date(Date.now() - 5 * 60 * 1000).toISOString();\n expect(createService().ComputeRelativeTime(fiveMinAgo)).toBe('5m ago');\n });\n\n it('should return hours for hours ago', () => {\n const threeHoursAgo = new Date(Date.now() - 3 * 60 * 60 * 1000).toISOString();\n expect(createService().ComputeRelativeTime(threeHoursAgo)).toBe('3h ago');\n });\n\n it('should return days for days ago', () => {\n const twoDaysAgo = new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString();\n expect(createService().ComputeRelativeTime(twoDaysAgo)).toBe('2d ago');\n });\n });\n});\n"]}
package/dist/module.d.ts CHANGED
@@ -144,9 +144,10 @@ import * as i142 from "@memberjunction/ng-actions";
144
144
  import * as i143 from "@memberjunction/ng-agents";
145
145
  import * as i144 from "@memberjunction/ng-markdown";
146
146
  import * as i145 from "@memberjunction/ng-versions";
147
+ import * as i146 from "./Integration/integration.module";
147
148
  export declare class DashboardsModule {
148
149
  static ɵfac: i0.ɵɵFactoryDeclaration<DashboardsModule, never>;
149
- static ɵmod: i0.ɵɵNgModuleDeclaration<DashboardsModule, [typeof i1.EntityAdminDashboardComponent, typeof i2.ModelManagementComponent, typeof i3.PromptManagementComponent, typeof i4.PromptFilterPanelComponent, typeof i5.AgentConfigurationComponent, typeof i6.AgentFilterPanelComponent, typeof i7.AgentEditorComponent, typeof i8.ExecutionMonitoringComponent, typeof i9.SystemConfigurationComponent, typeof i10.SystemConfigFilterPanelComponent, typeof i11.ActionsOverviewComponent, typeof i12.ExecutionMonitoringComponent, typeof i13.ScheduledActionsComponent, typeof i14.CodeManagementComponent, typeof i15.EntityIntegrationComponent, typeof i16.SecurityPermissionsComponent, typeof i17.ActionsListViewComponent, typeof i18.ExecutionsListViewComponent, typeof i19.CategoriesListViewComponent, typeof i20.ActionExplorerComponent, typeof i21.ActionTreePanelComponent, typeof i22.ActionToolbarComponent, typeof i23.ActionBreadcrumbComponent, typeof i24.ActionCardComponent, typeof i25.ActionListItemComponent, typeof i26.NewCategoryPanelComponent, typeof i27.NewActionPanelComponent, typeof i28.ModelPromptPriorityMatrixComponent, typeof i29.PromptVersionControlComponent, typeof i30.KPICardComponent, typeof i31.LiveExecutionWidgetComponent, typeof i32.TimeSeriesChartComponent, typeof i33.PerformanceHeatmapComponent, typeof i34.ComponentStudioDashboardComponent, typeof i35.TextImportDialogComponent, typeof i36.ArtifactSelectionDialogComponent, typeof i37.ArtifactLoadDialogComponent, typeof i38.ComponentBrowserComponent, typeof i39.ComponentPreviewComponent, typeof i40.EditorTabsComponent, typeof i41.SpecEditorComponent, typeof i42.CodeEditorPanelComponent, typeof i43.RequirementsEditorComponent, typeof i44.DataRequirementsEditorComponent, typeof i45.AIAssistantPanelComponent, typeof i46.NewComponentDialogComponent, typeof i47.SaveVersionDialogComponent, typeof i48.SchedulingDashboardComponent, typeof i49.SchedulingOverviewComponent, typeof i50.SchedulingJobsComponent, typeof i51.SchedulingActivityComponent, typeof i52.JobSlideoutComponent, typeof i53.SchedulingOverviewResourceComponent, typeof i54.SchedulingJobsResourceComponent, typeof i55.SchedulingActivityResourceComponent, typeof i56.TestingDashboardComponent, typeof i57.TestingDashboardTabComponent, typeof i58.TestingRunsComponent, typeof i59.TestingAnalyticsComponent, typeof i60.TestingReviewComponent, typeof i61.TestingDashboardTabResourceComponent, typeof i62.TestingRunsResourceComponent, typeof i63.TestingAnalyticsResourceComponent, typeof i64.TestingReviewResourceComponent, typeof i65.TestingExplorerComponent, typeof i66.TestingExplorerResourceComponent, typeof i67.SuiteTreeComponent, typeof i67.SuiteTreeNodeComponent, typeof i68.OracleBreakdownTableComponent, typeof i69.TestRunDetailPanelComponent, typeof i70.DataExplorerDashboardComponent, typeof i71.DataExplorerResourceComponent, typeof i72.NavigationPanelComponent, typeof i73.ViewSelectorComponent, typeof i74.FilterDialogComponent, typeof i75.HomeDashboardComponent, typeof i76.CommunicationDashboardComponent, typeof i77.CommunicationMonitorResourceComponent, typeof i78.CommunicationLogsResourceComponent, typeof i79.CommunicationProvidersResourceComponent, typeof i80.CommunicationRunsResourceComponent, typeof i81.CommunicationTemplatesResourceComponent, typeof i82.CredentialsDashboardComponent, typeof i83.CredentialsOverviewResourceComponent, typeof i84.CredentialsListResourceComponent, typeof i85.CredentialsTypesResourceComponent, typeof i86.CredentialsCategoriesResourceComponent, typeof i87.CredentialsAuditResourceComponent, typeof i88.GroupByPipe, typeof i89.SystemDiagnosticsComponent, typeof i90.ListsMyListsResource, typeof i91.ListsBrowseResource, typeof i92.ListsCategoriesResource, typeof i93.ListsOperationsResource, typeof i94.VennDiagramComponent, typeof i95.QueryBrowserResourceComponent, typeof i96.DashboardBrowserResourceComponent, typeof i97.DashboardShareDialogComponent, typeof i98.APIKeysResourceComponent, typeof i99.APIKeyCreateDialogComponent, typeof i100.APIKeyEditPanelComponent, typeof i101.APIKeyListComponent, typeof i102.APIApplicationsPanelComponent, typeof i103.APIScopesPanelComponent, typeof i104.APIUsagePanelComponent, typeof i105.VersionHistoryLabelsResourceComponent, typeof i106.VersionHistoryDiffResourceComponent, typeof i107.VersionHistoryRestoreResourceComponent, typeof i108.VersionHistoryGraphResourceComponent], [typeof i109.CommonModule, typeof i110.FormsModule, typeof i110.ReactiveFormsModule, typeof i111.IndicatorsModule, typeof i112.DropDownsModule, typeof i113.InputsModule, typeof i114.DateInputsModule, typeof i115.LayoutModule, typeof i116.DialogsModule, typeof i116.WindowModule, typeof i117.ContainerDirectivesModule, typeof i118.NavigationModule, typeof i119.CodeEditorModule, typeof i120.TreeViewModule, typeof i121.ButtonsModule, typeof i122.ActionGalleryModule, typeof i123.AITestHarnessModule, typeof i124.MemberJunctionCoreEntityFormsModule, typeof i125.GridModule, typeof i126.ExcelExportModule, typeof i127.MJReactModule, typeof i115.SplitterModule, typeof i115.TabStripModule, typeof i115.PanelBarModule, typeof i128.MJNotificationsModule, typeof i129.TestingModule, typeof i130.EntityViewerModule, typeof i131.ExplorerSettingsModule, typeof i132.SharedGenericModule, typeof i133.FilterBuilderModule, typeof i134.EntityRelationshipDiagramModule, typeof i135.ListManagementModule, typeof i136.ExportServiceModule, typeof i137.QueryViewerModule, typeof i138.DashboardViewerModule, typeof i139.MCPModule, typeof i140.CredentialsModule, typeof i141.SharedPipesModule, typeof i142.ActionsModule, typeof i143.AgentsModule, typeof i144.MarkdownModule, typeof i145.VersionsModule], [typeof i1.EntityAdminDashboardComponent, typeof i34.ComponentStudioDashboardComponent, typeof i48.SchedulingDashboardComponent, typeof i56.TestingDashboardComponent, typeof i8.ExecutionMonitoringComponent, typeof i3.PromptManagementComponent, typeof i5.AgentConfigurationComponent, typeof i2.ModelManagementComponent, typeof i9.SystemConfigurationComponent, typeof i11.ActionsOverviewComponent, typeof i12.ExecutionMonitoringComponent, typeof i13.ScheduledActionsComponent, typeof i14.CodeManagementComponent, typeof i15.EntityIntegrationComponent, typeof i16.SecurityPermissionsComponent, typeof i20.ActionExplorerComponent, typeof i21.ActionTreePanelComponent, typeof i22.ActionToolbarComponent, typeof i23.ActionBreadcrumbComponent, typeof i24.ActionCardComponent, typeof i25.ActionListItemComponent, typeof i26.NewCategoryPanelComponent, typeof i27.NewActionPanelComponent, typeof i53.SchedulingOverviewResourceComponent, typeof i54.SchedulingJobsResourceComponent, typeof i55.SchedulingActivityResourceComponent, typeof i61.TestingDashboardTabResourceComponent, typeof i62.TestingRunsResourceComponent, typeof i63.TestingAnalyticsResourceComponent, typeof i64.TestingReviewResourceComponent, typeof i65.TestingExplorerComponent, typeof i66.TestingExplorerResourceComponent, typeof i70.DataExplorerDashboardComponent, typeof i71.DataExplorerResourceComponent, typeof i75.HomeDashboardComponent, typeof i76.CommunicationDashboardComponent, typeof i77.CommunicationMonitorResourceComponent, typeof i78.CommunicationLogsResourceComponent, typeof i79.CommunicationProvidersResourceComponent, typeof i80.CommunicationRunsResourceComponent, typeof i81.CommunicationTemplatesResourceComponent, typeof i82.CredentialsDashboardComponent, typeof i83.CredentialsOverviewResourceComponent, typeof i84.CredentialsListResourceComponent, typeof i85.CredentialsTypesResourceComponent, typeof i86.CredentialsCategoriesResourceComponent, typeof i87.CredentialsAuditResourceComponent, typeof i88.GroupByPipe, typeof i141.SharedPipesModule, typeof i140.CredentialsModule, typeof i89.SystemDiagnosticsComponent, typeof i90.ListsMyListsResource, typeof i91.ListsBrowseResource, typeof i92.ListsCategoriesResource, typeof i93.ListsOperationsResource, typeof i94.VennDiagramComponent, typeof i95.QueryBrowserResourceComponent, typeof i96.DashboardBrowserResourceComponent, typeof i97.DashboardShareDialogComponent, typeof i98.APIKeysResourceComponent, typeof i99.APIKeyCreateDialogComponent, typeof i100.APIKeyEditPanelComponent, typeof i101.APIKeyListComponent, typeof i102.APIApplicationsPanelComponent, typeof i103.APIScopesPanelComponent, typeof i104.APIUsagePanelComponent, typeof i139.MCPModule, typeof i105.VersionHistoryLabelsResourceComponent, typeof i106.VersionHistoryDiffResourceComponent, typeof i107.VersionHistoryRestoreResourceComponent, typeof i108.VersionHistoryGraphResourceComponent]>;
150
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DashboardsModule, [typeof i1.EntityAdminDashboardComponent, typeof i2.ModelManagementComponent, typeof i3.PromptManagementComponent, typeof i4.PromptFilterPanelComponent, typeof i5.AgentConfigurationComponent, typeof i6.AgentFilterPanelComponent, typeof i7.AgentEditorComponent, typeof i8.ExecutionMonitoringComponent, typeof i9.SystemConfigurationComponent, typeof i10.SystemConfigFilterPanelComponent, typeof i11.ActionsOverviewComponent, typeof i12.ExecutionMonitoringComponent, typeof i13.ScheduledActionsComponent, typeof i14.CodeManagementComponent, typeof i15.EntityIntegrationComponent, typeof i16.SecurityPermissionsComponent, typeof i17.ActionsListViewComponent, typeof i18.ExecutionsListViewComponent, typeof i19.CategoriesListViewComponent, typeof i20.ActionExplorerComponent, typeof i21.ActionTreePanelComponent, typeof i22.ActionToolbarComponent, typeof i23.ActionBreadcrumbComponent, typeof i24.ActionCardComponent, typeof i25.ActionListItemComponent, typeof i26.NewCategoryPanelComponent, typeof i27.NewActionPanelComponent, typeof i28.ModelPromptPriorityMatrixComponent, typeof i29.PromptVersionControlComponent, typeof i30.KPICardComponent, typeof i31.LiveExecutionWidgetComponent, typeof i32.TimeSeriesChartComponent, typeof i33.PerformanceHeatmapComponent, typeof i34.ComponentStudioDashboardComponent, typeof i35.TextImportDialogComponent, typeof i36.ArtifactSelectionDialogComponent, typeof i37.ArtifactLoadDialogComponent, typeof i38.ComponentBrowserComponent, typeof i39.ComponentPreviewComponent, typeof i40.EditorTabsComponent, typeof i41.SpecEditorComponent, typeof i42.CodeEditorPanelComponent, typeof i43.RequirementsEditorComponent, typeof i44.DataRequirementsEditorComponent, typeof i45.AIAssistantPanelComponent, typeof i46.NewComponentDialogComponent, typeof i47.SaveVersionDialogComponent, typeof i48.SchedulingDashboardComponent, typeof i49.SchedulingOverviewComponent, typeof i50.SchedulingJobsComponent, typeof i51.SchedulingActivityComponent, typeof i52.JobSlideoutComponent, typeof i53.SchedulingOverviewResourceComponent, typeof i54.SchedulingJobsResourceComponent, typeof i55.SchedulingActivityResourceComponent, typeof i56.TestingDashboardComponent, typeof i57.TestingDashboardTabComponent, typeof i58.TestingRunsComponent, typeof i59.TestingAnalyticsComponent, typeof i60.TestingReviewComponent, typeof i61.TestingDashboardTabResourceComponent, typeof i62.TestingRunsResourceComponent, typeof i63.TestingAnalyticsResourceComponent, typeof i64.TestingReviewResourceComponent, typeof i65.TestingExplorerComponent, typeof i66.TestingExplorerResourceComponent, typeof i67.SuiteTreeComponent, typeof i67.SuiteTreeNodeComponent, typeof i68.OracleBreakdownTableComponent, typeof i69.TestRunDetailPanelComponent, typeof i70.DataExplorerDashboardComponent, typeof i71.DataExplorerResourceComponent, typeof i72.NavigationPanelComponent, typeof i73.ViewSelectorComponent, typeof i74.FilterDialogComponent, typeof i75.HomeDashboardComponent, typeof i76.CommunicationDashboardComponent, typeof i77.CommunicationMonitorResourceComponent, typeof i78.CommunicationLogsResourceComponent, typeof i79.CommunicationProvidersResourceComponent, typeof i80.CommunicationRunsResourceComponent, typeof i81.CommunicationTemplatesResourceComponent, typeof i82.CredentialsDashboardComponent, typeof i83.CredentialsOverviewResourceComponent, typeof i84.CredentialsListResourceComponent, typeof i85.CredentialsTypesResourceComponent, typeof i86.CredentialsCategoriesResourceComponent, typeof i87.CredentialsAuditResourceComponent, typeof i88.GroupByPipe, typeof i89.SystemDiagnosticsComponent, typeof i90.ListsMyListsResource, typeof i91.ListsBrowseResource, typeof i92.ListsCategoriesResource, typeof i93.ListsOperationsResource, typeof i94.VennDiagramComponent, typeof i95.QueryBrowserResourceComponent, typeof i96.DashboardBrowserResourceComponent, typeof i97.DashboardShareDialogComponent, typeof i98.APIKeysResourceComponent, typeof i99.APIKeyCreateDialogComponent, typeof i100.APIKeyEditPanelComponent, typeof i101.APIKeyListComponent, typeof i102.APIApplicationsPanelComponent, typeof i103.APIScopesPanelComponent, typeof i104.APIUsagePanelComponent, typeof i105.VersionHistoryLabelsResourceComponent, typeof i106.VersionHistoryDiffResourceComponent, typeof i107.VersionHistoryRestoreResourceComponent, typeof i108.VersionHistoryGraphResourceComponent], [typeof i109.CommonModule, typeof i110.FormsModule, typeof i110.ReactiveFormsModule, typeof i111.IndicatorsModule, typeof i112.DropDownsModule, typeof i113.InputsModule, typeof i114.DateInputsModule, typeof i115.LayoutModule, typeof i116.DialogsModule, typeof i116.WindowModule, typeof i117.ContainerDirectivesModule, typeof i118.NavigationModule, typeof i119.CodeEditorModule, typeof i120.TreeViewModule, typeof i121.ButtonsModule, typeof i122.ActionGalleryModule, typeof i123.AITestHarnessModule, typeof i124.MemberJunctionCoreEntityFormsModule, typeof i125.GridModule, typeof i126.ExcelExportModule, typeof i127.MJReactModule, typeof i115.SplitterModule, typeof i115.TabStripModule, typeof i115.PanelBarModule, typeof i128.MJNotificationsModule, typeof i129.TestingModule, typeof i130.EntityViewerModule, typeof i131.ExplorerSettingsModule, typeof i132.SharedGenericModule, typeof i133.FilterBuilderModule, typeof i134.EntityRelationshipDiagramModule, typeof i135.ListManagementModule, typeof i136.ExportServiceModule, typeof i137.QueryViewerModule, typeof i138.DashboardViewerModule, typeof i139.MCPModule, typeof i140.CredentialsModule, typeof i141.SharedPipesModule, typeof i142.ActionsModule, typeof i143.AgentsModule, typeof i144.MarkdownModule, typeof i145.VersionsModule, typeof i146.IntegrationModule], [typeof i1.EntityAdminDashboardComponent, typeof i34.ComponentStudioDashboardComponent, typeof i48.SchedulingDashboardComponent, typeof i56.TestingDashboardComponent, typeof i8.ExecutionMonitoringComponent, typeof i3.PromptManagementComponent, typeof i5.AgentConfigurationComponent, typeof i2.ModelManagementComponent, typeof i9.SystemConfigurationComponent, typeof i11.ActionsOverviewComponent, typeof i12.ExecutionMonitoringComponent, typeof i13.ScheduledActionsComponent, typeof i14.CodeManagementComponent, typeof i15.EntityIntegrationComponent, typeof i16.SecurityPermissionsComponent, typeof i20.ActionExplorerComponent, typeof i21.ActionTreePanelComponent, typeof i22.ActionToolbarComponent, typeof i23.ActionBreadcrumbComponent, typeof i24.ActionCardComponent, typeof i25.ActionListItemComponent, typeof i26.NewCategoryPanelComponent, typeof i27.NewActionPanelComponent, typeof i53.SchedulingOverviewResourceComponent, typeof i54.SchedulingJobsResourceComponent, typeof i55.SchedulingActivityResourceComponent, typeof i61.TestingDashboardTabResourceComponent, typeof i62.TestingRunsResourceComponent, typeof i63.TestingAnalyticsResourceComponent, typeof i64.TestingReviewResourceComponent, typeof i65.TestingExplorerComponent, typeof i66.TestingExplorerResourceComponent, typeof i70.DataExplorerDashboardComponent, typeof i71.DataExplorerResourceComponent, typeof i75.HomeDashboardComponent, typeof i76.CommunicationDashboardComponent, typeof i77.CommunicationMonitorResourceComponent, typeof i78.CommunicationLogsResourceComponent, typeof i79.CommunicationProvidersResourceComponent, typeof i80.CommunicationRunsResourceComponent, typeof i81.CommunicationTemplatesResourceComponent, typeof i82.CredentialsDashboardComponent, typeof i83.CredentialsOverviewResourceComponent, typeof i84.CredentialsListResourceComponent, typeof i85.CredentialsTypesResourceComponent, typeof i86.CredentialsCategoriesResourceComponent, typeof i87.CredentialsAuditResourceComponent, typeof i88.GroupByPipe, typeof i141.SharedPipesModule, typeof i140.CredentialsModule, typeof i89.SystemDiagnosticsComponent, typeof i90.ListsMyListsResource, typeof i91.ListsBrowseResource, typeof i92.ListsCategoriesResource, typeof i93.ListsOperationsResource, typeof i94.VennDiagramComponent, typeof i95.QueryBrowserResourceComponent, typeof i96.DashboardBrowserResourceComponent, typeof i97.DashboardShareDialogComponent, typeof i98.APIKeysResourceComponent, typeof i99.APIKeyCreateDialogComponent, typeof i100.APIKeyEditPanelComponent, typeof i101.APIKeyListComponent, typeof i102.APIApplicationsPanelComponent, typeof i103.APIScopesPanelComponent, typeof i104.APIUsagePanelComponent, typeof i139.MCPModule, typeof i105.VersionHistoryLabelsResourceComponent, typeof i106.VersionHistoryDiffResourceComponent, typeof i107.VersionHistoryRestoreResourceComponent, typeof i108.VersionHistoryGraphResourceComponent, typeof i146.IntegrationModule]>;
150
151
  static ɵinj: i0.ɵɵInjectorDeclaration<DashboardsModule>;
151
152
  }
152
153
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqLA,qBA8Qa,gBAAgB;yCAAhB,gBAAgB;0CAAhB,gBAAgB;0CAAhB,gBAAgB;CAAI"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuLA,qBAiRa,gBAAgB;yCAAhB,gBAAgB;0CAAhB,gBAAgB;0CAAhB,gBAAgB;CAAI"}
package/dist/module.js CHANGED
@@ -167,6 +167,8 @@ import { VersionHistoryDiffResourceComponent } from './VersionHistory/components
167
167
  import { VersionHistoryRestoreResourceComponent } from './VersionHistory/components/restore-resource.component';
168
168
  import { VersionHistoryGraphResourceComponent } from './VersionHistory/components/graph-resource.component';
169
169
  import { VersionsModule } from '@memberjunction/ng-versions';
170
+ // Integration Dashboard Module
171
+ import { IntegrationModule } from './Integration/integration.module';
170
172
  import * as i0 from "@angular/core";
171
173
  import * as i1 from "@progress/kendo-angular-dialog";
172
174
  import * as i2 from "@progress/kendo-angular-buttons";
@@ -221,10 +223,13 @@ export class DashboardsModule {
221
223
  ActionsModule,
222
224
  AgentsModule,
223
225
  MarkdownModule,
224
- VersionsModule, SharedPipesModule,
226
+ VersionsModule,
227
+ IntegrationModule, SharedPipesModule,
225
228
  CredentialsModule,
226
229
  // MCP Dashboard Module (re-exports its components)
227
- MCPModule] });
230
+ MCPModule,
231
+ // Integration Dashboard Module (re-exports its components)
232
+ IntegrationModule] });
228
233
  }
229
234
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DashboardsModule, [{
230
235
  type: NgModule,
@@ -399,7 +404,8 @@ export class DashboardsModule {
399
404
  ActionsModule,
400
405
  AgentsModule,
401
406
  MarkdownModule,
402
- VersionsModule
407
+ VersionsModule,
408
+ IntegrationModule
403
409
  ],
404
410
  providers: [
405
411
  AIInstrumentationService,
@@ -495,7 +501,9 @@ export class DashboardsModule {
495
501
  VersionHistoryLabelsResourceComponent,
496
502
  VersionHistoryDiffResourceComponent,
497
503
  VersionHistoryRestoreResourceComponent,
498
- VersionHistoryGraphResourceComponent
504
+ VersionHistoryGraphResourceComponent,
505
+ // Integration Dashboard Module (re-exports its components)
506
+ IntegrationModule
499
507
  ]
500
508
  }]
501
509
  }], null, null); })();
@@ -665,7 +673,8 @@ export class DashboardsModule {
665
673
  ActionsModule,
666
674
  AgentsModule,
667
675
  MarkdownModule,
668
- VersionsModule], exports: [EntityAdminDashboardComponent,
676
+ VersionsModule,
677
+ IntegrationModule], exports: [EntityAdminDashboardComponent,
669
678
  ComponentStudioDashboardComponent,
670
679
  SchedulingDashboardComponent,
671
680
  TestingDashboardComponent,
@@ -751,7 +760,9 @@ export class DashboardsModule {
751
760
  VersionHistoryLabelsResourceComponent,
752
761
  VersionHistoryDiffResourceComponent,
753
762
  VersionHistoryRestoreResourceComponent,
754
- VersionHistoryGraphResourceComponent] }); })();
763
+ VersionHistoryGraphResourceComponent,
764
+ // Integration Dashboard Module (re-exports its components)
765
+ IntegrationModule] }); })();
755
766
  i0.ɵɵsetComponentScope(
756
767
  // Component Studio Components
757
768
  ComponentStudioDashboardComponent, [i1.DialogContainerDirective, i2.ButtonComponent, ComponentBrowserComponent,