@memberjunction/ng-shared 5.22.0 → 5.24.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.
@@ -82,10 +82,6 @@ vi.mock('@memberjunction/graphql-dataprovider', () => ({
82
82
  GraphQLDataProvider: class {
83
83
  },
84
84
  }));
85
- vi.mock('@progress/kendo-angular-notification', () => ({
86
- NotificationService: class {
87
- },
88
- }));
89
85
  vi.mock('@memberjunction/ng-notifications', () => ({
90
86
  MJNotificationService: class {
91
87
  static UserNotifications = [];
@@ -235,10 +231,9 @@ describe('SharedService resource type mapping', () => {
235
231
  it('should map resource type names to route segments', async () => {
236
232
  const { SharedService } = await import('../shared.service');
237
233
  // Construct with mocked dependencies
238
- const notif = { show: vi.fn() };
239
234
  const mjNotif = { CreateNotification: vi.fn(), CreateSimpleNotification: vi.fn() };
240
235
  const injector = { get: vi.fn() };
241
- const svc = new SharedService(notif, mjNotif, injector);
236
+ const svc = new SharedService(mjNotif, injector);
242
237
  expect(svc.mapResourceTypeNameToRouteSegment('Records')).toBe('record');
243
238
  expect(svc.mapResourceTypeNameToRouteSegment('MJ: User Views')).toBe('view');
244
239
  expect(svc.mapResourceTypeNameToRouteSegment('Dashboards')).toBe('dashboard');
@@ -250,10 +245,9 @@ describe('SharedService resource type mapping', () => {
250
245
  });
251
246
  it('should map route segments to resource type names', async () => {
252
247
  const { SharedService } = await import('../shared.service');
253
- const notif = { show: vi.fn() };
254
248
  const mjNotif = { CreateNotification: vi.fn(), CreateSimpleNotification: vi.fn() };
255
249
  const injector = { get: vi.fn() };
256
- const svc = new SharedService(notif, mjNotif, injector);
250
+ const svc = new SharedService(mjNotif, injector);
257
251
  expect(svc.mapResourceTypeRouteSegmentToName('record')).toBe('records');
258
252
  expect(svc.mapResourceTypeRouteSegmentToName('view')).toBe('user views');
259
253
  expect(svc.mapResourceTypeRouteSegmentToName('dashboard')).toBe('dashboards');
@@ -261,10 +255,9 @@ describe('SharedService resource type mapping', () => {
261
255
  });
262
256
  it('should be case-insensitive for resource type mapping', async () => {
263
257
  const { SharedService } = await import('../shared.service');
264
- const notif = { show: vi.fn() };
265
258
  const mjNotif = { CreateNotification: vi.fn(), CreateSimpleNotification: vi.fn() };
266
259
  const injector = { get: vi.fn() };
267
- const svc = new SharedService(notif, mjNotif, injector);
260
+ const svc = new SharedService(mjNotif, injector);
268
261
  expect(svc.mapResourceTypeNameToRouteSegment('RECORDS')).toBe('record');
269
262
  expect(svc.mapResourceTypeNameToRouteSegment(' Records ')).toBe('record');
270
263
  });
@@ -1 +1 @@
1
- {"version":3,"file":"shared.test.js","sourceRoot":"","sources":["../../../src/lib/__tests__/shared.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE9D,4BAA4B;AAC5B,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9B,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAgB,EAAE,EAAE,CAAC,MAAM;IACxC,aAAa,EAAE;KAAQ;IACvB,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,MAAgB,EAAE,EAAE,CAAC,MAAM;IAC9C,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,MAAgB,EAAE,EAAE,CAAC,MAAM;IAC7C,KAAK,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAE,CAAC;IACtB,YAAY,EAAE;QAAQ,IAAI,KAAI,CAAC;KAAE;IACjC,UAAU,EAAE;KAAQ;IACpB,MAAM,EAAE;KAAQ;IAChB,SAAS,EAAE;KAAQ;IACnB,QAAQ,EAAE;KAAQ;CACnB,CAAC,CAAC,CAAC;AAEJ,EAAE,CAAC,IAAI,CAAC,2BAA2B,EAAE,G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AG,CAAC,iCAAiC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Tests for shared package utilities:\n * - SimpleTextFormatPipe\n * - URLPipe\n * - TitleService\n * - EventCodes / HtmlListType constants\n */\nimport { describe, it, expect, vi, beforeEach } from 'vitest';\n\n// Mock Angular dependencies\nvi.mock('@angular/core', () => ({\n Pipe: () => (target: Function) => target,\n PipeTransform: class {},\n Injectable: () => (target: Function) => target,\n Directive: () => (target: Function) => target,\n Input: () => () => {},\n Output: () => () => {},\n EventEmitter: class { emit() {} },\n ElementRef: class {},\n OnInit: class {},\n OnDestroy: class {},\n Injector: class {},\n}));\n\nvi.mock('@angular/platform-browser', () => ({\n Title: class {\n private title = '';\n setTitle(t: string) { this.title = t; }\n getTitle() { return this.title; }\n }\n}));\n\nvi.mock('@memberjunction/core', () => ({\n Metadata: class {},\n CompositeKey: class {},\n LogError: vi.fn(),\n LogStatus: vi.fn(),\n StartupManager: { Instance: { Startup: vi.fn() } },\n LocalCacheManager: class {},\n BaseEntity: class {},\n RunView: class {},\n}));\n\nvi.mock('@memberjunction/core-entities', () => ({\n ResourcePermissionEngine: { Instance: { ResourceTypes: [] } },\n UserInfoEngine: { Instance: { GetSetting: vi.fn(), SetSetting: vi.fn() } },\n MJResourceTypeEntity: class {},\n MJUserNotificationEntity: class {},\n ArtifactMetadataEngine: { Instance: { Config: vi.fn() } },\n DashboardEngine: { Instance: { Config: vi.fn() } },\n ViewColumnInfo: class {},\n MJDashboardEntityExtended: class {},\n ResourceData: class {\n ResourceRecordID = '';\n },\n}));\n\nvi.mock('@memberjunction/global', () => ({\n MJGlobal: { Instance: { GetEventListener: vi.fn(() => ({ subscribe: vi.fn() })) } },\n MJEventType: { LoggedIn: 'LoggedIn', ComponentEvent: 'ComponentEvent' },\n ConvertMarkdownStringToHtmlList: vi.fn((type: string, text: string) => `<${type}>${text}</${type}>`),\n InvokeManualResize: vi.fn(),\n}));\n\nvi.mock('@memberjunction/ai-engine-base', () => ({\n AIEngineBase: { Instance: { Config: vi.fn() } },\n}));\n\nvi.mock('@memberjunction/entity-communications-base', () => ({\n EntityCommunicationsEngineBase: { Instance: { Config: vi.fn() } },\n}));\n\nvi.mock('@memberjunction/graphql-dataprovider', () => ({\n GraphQLDataProvider: class {},\n}));\n\nvi.mock('@progress/kendo-angular-notification', () => ({\n NotificationService: class {},\n}));\n\nvi.mock('@memberjunction/ng-notifications', () => ({\n MJNotificationService: class {\n static UserNotifications: never[] = [];\n static UnreadUserNotifications: never[] = [];\n static UnreadUserNotificationCount = 0;\n static RefreshUserNotifications = vi.fn();\n CreateNotification = vi.fn();\n CreateSimpleNotification = vi.fn();\n },\n}));\n\nvi.mock('@memberjunction/ng-base-types', () => ({\n BaseAngularComponent: class {},\n}));\n\nvi.mock('@memberjunction/ng-base-application', () => ({\n WorkspaceStateManager: class {},\n ApplicationManager: class {\n GetActiveApp = vi.fn();\n GetAppByName = vi.fn();\n GetAppById = vi.fn();\n },\n NavItem: class {},\n TabRequest: class {},\n}));\n\nvi.mock('rxjs', async () => {\n const actual = await vi.importActual<typeof import('rxjs')>('rxjs');\n return actual;\n});\n\n// ======================= SimpleTextFormatPipe =======================\ndescribe('SimpleTextFormatPipe', () => {\n let pipe: { transform(value: string): string };\n\n beforeEach(async () => {\n const mod = await import('../simpleTextFormat');\n pipe = new mod.SimpleTextFormatPipe();\n });\n\n it('should replace newlines with <br> tags', () => {\n expect(pipe.transform('hello\\nworld')).toBe('hello<br>world');\n });\n\n it('should replace tabs with non-breaking spaces', () => {\n expect(pipe.transform('col1\\tcol2')).toBe('col1&nbsp;&nbsp;&nbsp;&nbsp;col2');\n });\n\n it('should handle mixed newlines and tabs', () => {\n expect(pipe.transform('line1\\n\\tindented')).toBe('line1<br>&nbsp;&nbsp;&nbsp;&nbsp;indented');\n });\n\n it('should return falsy values as-is', () => {\n expect(pipe.transform('')).toBe('');\n expect(pipe.transform(null as unknown as string)).toBeNull();\n expect(pipe.transform(undefined as unknown as string)).toBeUndefined();\n });\n\n it('should return plain text unchanged', () => {\n expect(pipe.transform('no special chars')).toBe('no special chars');\n });\n});\n\n// ======================= URLPipe =======================\ndescribe('URLPipe', () => {\n let pipe: { transform(value: string): string };\n\n beforeEach(async () => {\n const mod = await import('../urlPipe');\n pipe = new mod.URLPipe();\n });\n\n it('should prepend https:// when no protocol is present', () => {\n expect(pipe.transform('example.com')).toBe('https://example.com');\n });\n\n it('should not modify URLs that already have http', () => {\n expect(pipe.transform('http://example.com')).toBe('http://example.com');\n });\n\n it('should not modify URLs that already have https', () => {\n expect(pipe.transform('https://example.com')).toBe('https://example.com');\n });\n\n it('should return falsy values as-is', () => {\n expect(pipe.transform('')).toBe('');\n expect(pipe.transform(null as unknown as string)).toBeNull();\n });\n});\n\n// ======================= TitleService =======================\ndescribe('TitleService', () => {\n let service: InstanceType<typeof import('../title.service').TitleService>;\n\n beforeEach(async () => {\n const mod = await import('../title.service');\n const { Title } = await import('@angular/platform-browser');\n service = new mod.TitleService(new Title(document));\n });\n\n it('should have default base title of MemberJunction', () => {\n expect(service.getBaseTitle()).toBe('MemberJunction');\n });\n\n it('should build title with base only when no context is set', () => {\n expect(service.getFullTitle()).toBe('MemberJunction');\n });\n\n it('should build title with app name', () => {\n service.setAppName('Sales');\n expect(service.getFullTitle()).toBe('Sales - MemberJunction');\n });\n\n it('should build title with resource name', () => {\n service.setResourceName('Contacts');\n expect(service.getFullTitle()).toBe('Contacts - MemberJunction');\n });\n\n it('should build title with both app and resource (resource first)', () => {\n service.setAppName('Sales');\n service.setResourceName('Contacts');\n expect(service.getFullTitle()).toBe('Contacts - Sales - MemberJunction');\n });\n\n it('should update base title', () => {\n service.setBaseTitle('Skip');\n expect(service.getFullTitle()).toBe('Skip');\n });\n\n it('should set context in one call', () => {\n service.setContext('Marketing', 'Campaigns');\n expect(service.getFullTitle()).toBe('Campaigns - Marketing - MemberJunction');\n });\n\n it('should reset to just base title', () => {\n service.setContext('Marketing', 'Campaigns');\n service.reset();\n expect(service.getFullTitle()).toBe('MemberJunction');\n expect(service.getAppName()).toBeNull();\n expect(service.getResourceName()).toBeNull();\n });\n\n it('should clear app name with null', () => {\n service.setAppName('Sales');\n service.setAppName(null);\n expect(service.getFullTitle()).toBe('MemberJunction');\n });\n});\n\n// ======================= EventCodes & HtmlListType =======================\ndescribe('EventCodes', () => {\n it('should export expected event codes', async () => {\n const { EventCodes } = await import('../shared.service');\n expect(EventCodes.ViewClicked).toBe('ViewClicked');\n expect(EventCodes.EntityRecordClicked).toBe('EntityRecordClicked');\n expect(EventCodes.AddDashboard).toBe('AddDashboard');\n expect(EventCodes.RunSearch).toBe('RunSearch');\n expect(EventCodes.CloseCurrentTab).toBe('CloseCurrentTab');\n expect(EventCodes.AvatarUpdated).toBe('AvatarUpdated');\n });\n});\n\ndescribe('HtmlListType', () => {\n it('should export Unordered and Ordered list types', async () => {\n const { HtmlListType } = await import('../shared.service');\n expect(HtmlListType.Unordered).toBe('Unordered');\n expect(HtmlListType.Ordered).toBe('Ordered');\n });\n});\n\n// ======================= SharedService resource type mapping =======================\ndescribe('SharedService resource type mapping', () => {\n it('should map resource type names to route segments', async () => {\n const { SharedService } = await import('../shared.service');\n // Construct with mocked dependencies\n const notif = { show: vi.fn() };\n const mjNotif = { CreateNotification: vi.fn(), CreateSimpleNotification: vi.fn() };\n const injector = { get: vi.fn() };\n const svc = new SharedService(notif as never, mjNotif as never, injector as never);\n\n expect(svc.mapResourceTypeNameToRouteSegment('Records')).toBe('record');\n expect(svc.mapResourceTypeNameToRouteSegment('MJ: User Views')).toBe('view');\n expect(svc.mapResourceTypeNameToRouteSegment('Dashboards')).toBe('dashboard');\n expect(svc.mapResourceTypeNameToRouteSegment('Reports')).toBe('report');\n expect(svc.mapResourceTypeNameToRouteSegment('Search Results')).toBe('search');\n expect(svc.mapResourceTypeNameToRouteSegment('Queries')).toBe('query');\n expect(svc.mapResourceTypeNameToRouteSegment('Lists')).toBe('list');\n expect(svc.mapResourceTypeNameToRouteSegment('Unknown')).toBeNull();\n });\n\n it('should map route segments to resource type names', async () => {\n const { SharedService } = await import('../shared.service');\n const notif = { show: vi.fn() };\n const mjNotif = { CreateNotification: vi.fn(), CreateSimpleNotification: vi.fn() };\n const injector = { get: vi.fn() };\n const svc = new SharedService(notif as never, mjNotif as never, injector as never);\n\n expect(svc.mapResourceTypeRouteSegmentToName('record')).toBe('records');\n expect(svc.mapResourceTypeRouteSegmentToName('view')).toBe('user views');\n expect(svc.mapResourceTypeRouteSegmentToName('dashboard')).toBe('dashboards');\n expect(svc.mapResourceTypeRouteSegmentToName('nonexistent')).toBeNull();\n });\n\n it('should be case-insensitive for resource type mapping', async () => {\n const { SharedService } = await import('../shared.service');\n const notif = { show: vi.fn() };\n const mjNotif = { CreateNotification: vi.fn(), CreateSimpleNotification: vi.fn() };\n const injector = { get: vi.fn() };\n const svc = new SharedService(notif as never, mjNotif as never, injector as never);\n\n expect(svc.mapResourceTypeNameToRouteSegment('RECORDS')).toBe('record');\n expect(svc.mapResourceTypeNameToRouteSegment(' Records ')).toBe('record');\n });\n});\n"]}
1
+ {"version":3,"file":"shared.test.js","sourceRoot":"","sources":["../../../src/lib/__tests__/shared.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE9D,4BAA4B;AAC5B,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,CAAC;IAC9B,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAgB,EAAE,EAAE,CAAC,MAAM;IACxC,aAAa,EAAE;KAAQ;IACvB,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,MAAgB,EAAE,EAAE,CAAC,MAAM;IAC9C,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,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CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Tests for shared package utilities:\n * - SimpleTextFormatPipe\n * - URLPipe\n * - TitleService\n * - EventCodes / HtmlListType constants\n */\nimport { describe, it, expect, vi, beforeEach } from 'vitest';\n\n// Mock Angular dependencies\nvi.mock('@angular/core', () => ({\n Pipe: () => (target: Function) => target,\n PipeTransform: class {},\n Injectable: () => (target: Function) => target,\n Directive: () => (target: Function) => target,\n Input: () => () => {},\n Output: () => () => {},\n EventEmitter: class { emit() {} },\n ElementRef: class {},\n OnInit: class {},\n OnDestroy: class {},\n Injector: class {},\n}));\n\nvi.mock('@angular/platform-browser', () => ({\n Title: class {\n private title = '';\n setTitle(t: string) { this.title = t; }\n getTitle() { return this.title; }\n }\n}));\n\nvi.mock('@memberjunction/core', () => ({\n Metadata: class {},\n CompositeKey: class {},\n LogError: vi.fn(),\n LogStatus: vi.fn(),\n StartupManager: { Instance: { Startup: vi.fn() } },\n LocalCacheManager: class {},\n BaseEntity: class {},\n RunView: class {},\n}));\n\nvi.mock('@memberjunction/core-entities', () => ({\n ResourcePermissionEngine: { Instance: { ResourceTypes: [] } },\n UserInfoEngine: { Instance: { GetSetting: vi.fn(), SetSetting: vi.fn() } },\n MJResourceTypeEntity: class {},\n MJUserNotificationEntity: class {},\n ArtifactMetadataEngine: { Instance: { Config: vi.fn() } },\n DashboardEngine: { Instance: { Config: vi.fn() } },\n ViewColumnInfo: class {},\n MJDashboardEntityExtended: class {},\n ResourceData: class {\n ResourceRecordID = '';\n },\n}));\n\nvi.mock('@memberjunction/global', () => ({\n MJGlobal: { Instance: { GetEventListener: vi.fn(() => ({ subscribe: vi.fn() })) } },\n MJEventType: { LoggedIn: 'LoggedIn', ComponentEvent: 'ComponentEvent' },\n ConvertMarkdownStringToHtmlList: vi.fn((type: string, text: string) => `<${type}>${text}</${type}>`),\n InvokeManualResize: vi.fn(),\n}));\n\nvi.mock('@memberjunction/ai-engine-base', () => ({\n AIEngineBase: { Instance: { Config: vi.fn() } },\n}));\n\nvi.mock('@memberjunction/entity-communications-base', () => ({\n EntityCommunicationsEngineBase: { Instance: { Config: vi.fn() } },\n}));\n\nvi.mock('@memberjunction/graphql-dataprovider', () => ({\n GraphQLDataProvider: class {},\n}));\n\nvi.mock('@memberjunction/ng-notifications', () => ({\n MJNotificationService: class {\n static UserNotifications: never[] = [];\n static UnreadUserNotifications: never[] = [];\n static UnreadUserNotificationCount = 0;\n static RefreshUserNotifications = vi.fn();\n CreateNotification = vi.fn();\n CreateSimpleNotification = vi.fn();\n },\n}));\n\nvi.mock('@memberjunction/ng-base-types', () => ({\n BaseAngularComponent: class {},\n}));\n\nvi.mock('@memberjunction/ng-base-application', () => ({\n WorkspaceStateManager: class {},\n ApplicationManager: class {\n GetActiveApp = vi.fn();\n GetAppByName = vi.fn();\n GetAppById = vi.fn();\n },\n NavItem: class {},\n TabRequest: class {},\n}));\n\nvi.mock('rxjs', async () => {\n const actual = await vi.importActual<typeof import('rxjs')>('rxjs');\n return actual;\n});\n\n// ======================= SimpleTextFormatPipe =======================\ndescribe('SimpleTextFormatPipe', () => {\n let pipe: { transform(value: string): string };\n\n beforeEach(async () => {\n const mod = await import('../simpleTextFormat');\n pipe = new mod.SimpleTextFormatPipe();\n });\n\n it('should replace newlines with <br> tags', () => {\n expect(pipe.transform('hello\\nworld')).toBe('hello<br>world');\n });\n\n it('should replace tabs with non-breaking spaces', () => {\n expect(pipe.transform('col1\\tcol2')).toBe('col1&nbsp;&nbsp;&nbsp;&nbsp;col2');\n });\n\n it('should handle mixed newlines and tabs', () => {\n expect(pipe.transform('line1\\n\\tindented')).toBe('line1<br>&nbsp;&nbsp;&nbsp;&nbsp;indented');\n });\n\n it('should return falsy values as-is', () => {\n expect(pipe.transform('')).toBe('');\n expect(pipe.transform(null as unknown as string)).toBeNull();\n expect(pipe.transform(undefined as unknown as string)).toBeUndefined();\n });\n\n it('should return plain text unchanged', () => {\n expect(pipe.transform('no special chars')).toBe('no special chars');\n });\n});\n\n// ======================= URLPipe =======================\ndescribe('URLPipe', () => {\n let pipe: { transform(value: string): string };\n\n beforeEach(async () => {\n const mod = await import('../urlPipe');\n pipe = new mod.URLPipe();\n });\n\n it('should prepend https:// when no protocol is present', () => {\n expect(pipe.transform('example.com')).toBe('https://example.com');\n });\n\n it('should not modify URLs that already have http', () => {\n expect(pipe.transform('http://example.com')).toBe('http://example.com');\n });\n\n it('should not modify URLs that already have https', () => {\n expect(pipe.transform('https://example.com')).toBe('https://example.com');\n });\n\n it('should return falsy values as-is', () => {\n expect(pipe.transform('')).toBe('');\n expect(pipe.transform(null as unknown as string)).toBeNull();\n });\n});\n\n// ======================= TitleService =======================\ndescribe('TitleService', () => {\n let service: InstanceType<typeof import('../title.service').TitleService>;\n\n beforeEach(async () => {\n const mod = await import('../title.service');\n const { Title } = await import('@angular/platform-browser');\n service = new mod.TitleService(new Title(document));\n });\n\n it('should have default base title of MemberJunction', () => {\n expect(service.getBaseTitle()).toBe('MemberJunction');\n });\n\n it('should build title with base only when no context is set', () => {\n expect(service.getFullTitle()).toBe('MemberJunction');\n });\n\n it('should build title with app name', () => {\n service.setAppName('Sales');\n expect(service.getFullTitle()).toBe('Sales - MemberJunction');\n });\n\n it('should build title with resource name', () => {\n service.setResourceName('Contacts');\n expect(service.getFullTitle()).toBe('Contacts - MemberJunction');\n });\n\n it('should build title with both app and resource (resource first)', () => {\n service.setAppName('Sales');\n service.setResourceName('Contacts');\n expect(service.getFullTitle()).toBe('Contacts - Sales - MemberJunction');\n });\n\n it('should update base title', () => {\n service.setBaseTitle('Skip');\n expect(service.getFullTitle()).toBe('Skip');\n });\n\n it('should set context in one call', () => {\n service.setContext('Marketing', 'Campaigns');\n expect(service.getFullTitle()).toBe('Campaigns - Marketing - MemberJunction');\n });\n\n it('should reset to just base title', () => {\n service.setContext('Marketing', 'Campaigns');\n service.reset();\n expect(service.getFullTitle()).toBe('MemberJunction');\n expect(service.getAppName()).toBeNull();\n expect(service.getResourceName()).toBeNull();\n });\n\n it('should clear app name with null', () => {\n service.setAppName('Sales');\n service.setAppName(null);\n expect(service.getFullTitle()).toBe('MemberJunction');\n });\n});\n\n// ======================= EventCodes & HtmlListType =======================\ndescribe('EventCodes', () => {\n it('should export expected event codes', async () => {\n const { EventCodes } = await import('../shared.service');\n expect(EventCodes.ViewClicked).toBe('ViewClicked');\n expect(EventCodes.EntityRecordClicked).toBe('EntityRecordClicked');\n expect(EventCodes.AddDashboard).toBe('AddDashboard');\n expect(EventCodes.RunSearch).toBe('RunSearch');\n expect(EventCodes.CloseCurrentTab).toBe('CloseCurrentTab');\n expect(EventCodes.AvatarUpdated).toBe('AvatarUpdated');\n });\n});\n\ndescribe('HtmlListType', () => {\n it('should export Unordered and Ordered list types', async () => {\n const { HtmlListType } = await import('../shared.service');\n expect(HtmlListType.Unordered).toBe('Unordered');\n expect(HtmlListType.Ordered).toBe('Ordered');\n });\n});\n\n// ======================= SharedService resource type mapping =======================\ndescribe('SharedService resource type mapping', () => {\n it('should map resource type names to route segments', async () => {\n const { SharedService } = await import('../shared.service');\n // Construct with mocked dependencies\n const mjNotif = { CreateNotification: vi.fn(), CreateSimpleNotification: vi.fn() };\n const injector = { get: vi.fn() };\n const svc = new SharedService(mjNotif as never, injector as never);\n\n expect(svc.mapResourceTypeNameToRouteSegment('Records')).toBe('record');\n expect(svc.mapResourceTypeNameToRouteSegment('MJ: User Views')).toBe('view');\n expect(svc.mapResourceTypeNameToRouteSegment('Dashboards')).toBe('dashboard');\n expect(svc.mapResourceTypeNameToRouteSegment('Reports')).toBe('report');\n expect(svc.mapResourceTypeNameToRouteSegment('Search Results')).toBe('search');\n expect(svc.mapResourceTypeNameToRouteSegment('Queries')).toBe('query');\n expect(svc.mapResourceTypeNameToRouteSegment('Lists')).toBe('list');\n expect(svc.mapResourceTypeNameToRouteSegment('Unknown')).toBeNull();\n });\n\n it('should map route segments to resource type names', async () => {\n const { SharedService } = await import('../shared.service');\n const mjNotif = { CreateNotification: vi.fn(), CreateSimpleNotification: vi.fn() };\n const injector = { get: vi.fn() };\n const svc = new SharedService(mjNotif as never, injector as never);\n\n expect(svc.mapResourceTypeRouteSegmentToName('record')).toBe('records');\n expect(svc.mapResourceTypeRouteSegmentToName('view')).toBe('user views');\n expect(svc.mapResourceTypeRouteSegmentToName('dashboard')).toBe('dashboards');\n expect(svc.mapResourceTypeRouteSegmentToName('nonexistent')).toBeNull();\n });\n\n it('should be case-insensitive for resource type mapping', async () => {\n const { SharedService } = await import('../shared.service');\n const mjNotif = { CreateNotification: vi.fn(), CreateSimpleNotification: vi.fn() };\n const injector = { get: vi.fn() };\n const svc = new SharedService(mjNotif as never, injector as never);\n\n expect(svc.mapResourceTypeNameToRouteSegment('RECORDS')).toBe('record');\n expect(svc.mapResourceTypeNameToRouteSegment(' Records ')).toBe('record');\n });\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"base-dashboard.d.ts","sourceRoot":"","sources":["../../src/lib/base-dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAS,SAAS,EAAE,MAAM,EAAU,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;;AAElE,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,yBAAyB,CAAC;IACrC,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB;AAED;;GAEG;AACH,8BACsB,aAAc,SAAQ,qBAAsB,YAAW,MAAM,EAAE,SAAS;IAC5F;;OAEG;IACH,IAAa,MAAM,CAAC,KAAK,EAAE,eAAe,EAEzC;IAED,IAAI,MAAM,IAAI,eAAe,GAAG,IAAI,CAEnC;IAED;;OAEG;IACO,KAAK,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O,KAAK,sBAA6B;IAE5C;;OAEG;IACO,gBAAgB,oBAA2B;IAErD;;OAEG;IACO,WAAW,oBAA2B;IAEhD;;OAEG;IACO,gBAAgB;oBAAiC,MAAM;oBAAc,YAAY;OAAK;IAEhG,SAAS,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAAQ;IAE3C,QAAQ;IAMd,WAAW,IAAI,IAAI;IAEnB;;OAEG;IACI,OAAO,IAAI,IAAI;IAItB,OAAO,CAAC,QAAQ,CAAkB;IAClC;;OAEG;IACI,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIzC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,aAAa,IAAI,IAAI;IAExC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI;IAEnC;;;;OAIG;IACG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;yCAxE3C,aAAa;2CAAb,aAAa;CA2ElC"}
@@ -34,6 +34,7 @@ export class BaseDashboard extends BaseResourceComponent {
34
34
  async ngOnInit() {
35
35
  this.initDashboard();
36
36
  await this.loadData();
37
+ this.NotifyLoadComplete();
37
38
  }
38
39
  ngOnDestroy() { }
39
40
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"base-dashboard.js","sourceRoot":"","sources":["../../src/lib/base-dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,EAAE,MAAM,eAAe,CAAC;AAG1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;;AAOlE;;GAEG;AAEH,MAAM,OAAgB,aAAc,SAAQ,qBAAqB;IAC/D;;OAEG;IACH,IAAa,MAAM,CAAC,KAAsB;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;OAEG;IACO,KAAK,GAAG,IAAI,YAAY,EAAS,CAAC;IAE5C;;OAEG;IACO,gBAAgB,GAAG,IAAI,YAAY,EAAO,CAAC;IAErD;;OAEG;IACO,WAAW,GAAG,IAAI,YAAY,EAAO,CAAC;IAEhD;;OAEG;IACO,gBAAgB,GAAG,IAAI,YAAY,EAAkD,CAAC;IAEtF,OAAO,GAA2B,IAAI,CAAC;IAEjD,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC;IAED,WAAW,KAAU,CAAC;IAEtB;;OAEG;IACI,OAAO;QACZ,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAEO,QAAQ,GAAY,KAAK,CAAC;IAClC;;OAEG;IACI,UAAU,CAAC,OAAgB;QAChC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAYD;;;;OAIG;IACH,KAAK,CAAC,oBAAoB,CAAC,IAAkB;QAC3C,OAAO,EAAE,CAAC;IACZ,CAAC;iOAzEmB,aAAa,yBAAb,aAAa;6DAAb,aAAa;;iFAAb,aAAa;cADlC,SAAS;;kBAKP,KAAK;;kBAWL,MAAM;;kBAKN,MAAM;;kBAKN,MAAM;;kBAKN,MAAM","sourcesContent":["import { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\nimport { CompositeKey } from '@memberjunction/core';\nimport { MJDashboardEntityExtended, ResourceData } from '@memberjunction/core-entities';\nimport { BaseResourceComponent } from './base-resource-component';\n\nexport interface DashboardConfig {\n dashboard: MJDashboardEntityExtended;\n userState?: any;\n}\n\n/**\n * Make the base class a directive so we can use Angular functionality and sub-classes can be @Component \n */\n@Directive()\nexport abstract class BaseDashboard extends BaseResourceComponent implements OnInit, OnDestroy {\n /**\n * Set or change the dashboard configuration. Changing this property will NOT cause the dashboard to reload. Call Refresh() to do that.\n */\n @Input() set Config(value: DashboardConfig) {\n this._config = value;\n }\n\n get Config(): DashboardConfig | null {\n return this._config;\n }\n\n /**\n * Subclasses can emit anytime an error occurs. \n */\n @Output() Error = new EventEmitter<Error>();\n\n /**\n * Subclasses should emit this event anytime their internal state changes in a way that they'd like to persist.\n */\n @Output() UserStateChanged = new EventEmitter<any>();\n\n /**\n * Subclasses can emit this event anytime they want to communicate with the container to let it know that something has happened of significance.\n */\n @Output() Interaction = new EventEmitter<any>();\n\n /**\n * Subclasses can emit this event anytime they want to open a record within a particular entity. The container should handle this event and open the record.\n */\n @Output() OpenEntityRecord = new EventEmitter<{EntityName: string, RecordPKey: CompositeKey}>();\n\n protected _config: DashboardConfig | null = null;\n\n async ngOnInit() {\n this.initDashboard();\n await this.loadData();\n }\n\n ngOnDestroy(): void {}\n\n /**\n * This method will result in the dashboard being reloaded.\n */\n public Refresh(): void {\n this.loadData();\n }\n\n private _visible: boolean = false;\n /**\n * This method can be used by a container to let the dashboard know that it is being opened/closed. Base class just sets a flag.\n */\n public SetVisible(visible: boolean): void {\n this._visible = visible;\n }\n\n /**\n * Subclasses can override this method to perform any initialization they need. This method only runs once when the dashboard is created.\n */\n protected abstract initDashboard(): void;\n\n /**\n * Subclasses should override this method to load their data. This method is called when the dashboard is created and when Refresh() is called.\n */\n protected abstract loadData(): void;\n\n /**\n * Sub-classes can override this to provide a custom icon class\n * @param data \n * @returns \n */\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return \"\";\n }\n} "]}
1
+ {"version":3,"file":"base-dashboard.js","sourceRoot":"","sources":["../../src/lib/base-dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAqB,MAAM,EAAE,MAAM,eAAe,CAAC;AAG1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;;AAOlE;;GAEG;AAEH,MAAM,OAAgB,aAAc,SAAQ,qBAAqB;IAC/D;;OAEG;IACH,IAAa,MAAM,CAAC,KAAsB;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;OAEG;IACO,KAAK,GAAG,IAAI,YAAY,EAAS,CAAC;IAE5C;;OAEG;IACO,gBAAgB,GAAG,IAAI,YAAY,EAAO,CAAC;IAErD;;OAEG;IACO,WAAW,GAAG,IAAI,YAAY,EAAO,CAAC;IAEhD;;OAEG;IACO,gBAAgB,GAAG,IAAI,YAAY,EAAkD,CAAC;IAEtF,OAAO,GAA2B,IAAI,CAAC;IAEjD,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC5B,CAAC;IAED,WAAW,KAAU,CAAC;IAEtB;;OAEG;IACI,OAAO;QACZ,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAEO,QAAQ,GAAY,KAAK,CAAC;IAClC;;OAEG;IACI,UAAU,CAAC,OAAgB;QAChC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAYD;;;;OAIG;IACH,KAAK,CAAC,oBAAoB,CAAC,IAAkB;QAC3C,OAAO,EAAE,CAAC;IACZ,CAAC;iOA1EmB,aAAa,yBAAb,aAAa;6DAAb,aAAa;;iFAAb,aAAa;cADlC,SAAS;;kBAKP,KAAK;;kBAWL,MAAM;;kBAKN,MAAM;;kBAKN,MAAM;;kBAKN,MAAM","sourcesContent":["import { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\nimport { CompositeKey } from '@memberjunction/core';\nimport { MJDashboardEntityExtended, ResourceData } from '@memberjunction/core-entities';\nimport { BaseResourceComponent } from './base-resource-component';\n\nexport interface DashboardConfig {\n dashboard: MJDashboardEntityExtended;\n userState?: any;\n}\n\n/**\n * Make the base class a directive so we can use Angular functionality and sub-classes can be @Component \n */\n@Directive()\nexport abstract class BaseDashboard extends BaseResourceComponent implements OnInit, OnDestroy {\n /**\n * Set or change the dashboard configuration. Changing this property will NOT cause the dashboard to reload. Call Refresh() to do that.\n */\n @Input() set Config(value: DashboardConfig) {\n this._config = value;\n }\n\n get Config(): DashboardConfig | null {\n return this._config;\n }\n\n /**\n * Subclasses can emit anytime an error occurs. \n */\n @Output() Error = new EventEmitter<Error>();\n\n /**\n * Subclasses should emit this event anytime their internal state changes in a way that they'd like to persist.\n */\n @Output() UserStateChanged = new EventEmitter<any>();\n\n /**\n * Subclasses can emit this event anytime they want to communicate with the container to let it know that something has happened of significance.\n */\n @Output() Interaction = new EventEmitter<any>();\n\n /**\n * Subclasses can emit this event anytime they want to open a record within a particular entity. The container should handle this event and open the record.\n */\n @Output() OpenEntityRecord = new EventEmitter<{EntityName: string, RecordPKey: CompositeKey}>();\n\n protected _config: DashboardConfig | null = null;\n\n async ngOnInit() {\n this.initDashboard();\n await this.loadData();\n this.NotifyLoadComplete();\n }\n\n ngOnDestroy(): void {}\n\n /**\n * This method will result in the dashboard being reloaded.\n */\n public Refresh(): void {\n this.loadData();\n }\n\n private _visible: boolean = false;\n /**\n * This method can be used by a container to let the dashboard know that it is being opened/closed. Base class just sets a flag.\n */\n public SetVisible(visible: boolean): void {\n this._visible = visible;\n }\n\n /**\n * Subclasses can override this method to perform any initialization they need. This method only runs once when the dashboard is created.\n */\n protected abstract initDashboard(): void;\n\n /**\n * Subclasses should override this method to load their data. This method is called when the dashboard is created and when Refresh() is called.\n */\n protected abstract loadData(): void;\n\n /**\n * Sub-classes can override this to provide a custom icon class\n * @param data \n * @returns \n */\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return \"\";\n }\n} "]}
@@ -2,7 +2,27 @@ import { OnDestroy } from '@angular/core';
2
2
  import { WorkspaceStateManager, NavItem, ApplicationManager } from '@memberjunction/ng-base-application';
3
3
  import { NavigationOptions } from './navigation.interfaces';
4
4
  import { CompositeKey } from '@memberjunction/core';
5
+ import { Subject } from 'rxjs';
6
+ import { BaseResourceComponent } from './base-resource-component';
5
7
  import * as i0 from "@angular/core";
8
+ /**
9
+ * Event emitted when a resource component reports its agent context or tools.
10
+ * The shell (which owns the ComponentCacheManager) subscribes to these events
11
+ * and updates the cache + active AppContextSnapshot accordingly.
12
+ */
13
+ export interface AgentContextUpdate {
14
+ /** The component instance that reported the update */
15
+ Caller: BaseResourceComponent;
16
+ /** Dashboard-specific context for the agent (undefined = no change) */
17
+ AgentContext?: Record<string, unknown>;
18
+ /** Client tools available from this dashboard (undefined = no change) */
19
+ AgentClientTools?: Array<{
20
+ Name: string;
21
+ Description: string;
22
+ ParameterSchema: Record<string, unknown>;
23
+ Handler: (params: Record<string, unknown>) => Promise<unknown>;
24
+ }>;
25
+ }
6
26
  /**
7
27
  * System application ID for non-app-specific resources (fallback only)
8
28
  * Uses double underscore prefix to indicate system-level resource
@@ -47,6 +67,40 @@ export declare class NavigationService implements OnDestroy {
47
67
  * Call this if apps are reloaded or user logs out.
48
68
  */
49
69
  clearHomeAppCache(): void;
70
+ /**
71
+ * Observable stream of agent context updates from resource components.
72
+ * The shell subscribes to this to update the ComponentCacheManager and
73
+ * push changes to the chat overlay's AppContextSnapshot.DashboardContext.
74
+ */
75
+ readonly AgentContextUpdated$: Subject<AgentContextUpdate>;
76
+ /**
77
+ * Report the current agent-visible state from a resource component.
78
+ * Call this whenever the dashboard's internal state changes (tab switch,
79
+ * filter change, pipeline status change, drill-down, etc.).
80
+ *
81
+ * @param caller - Pass `this` from the calling component. Used to match
82
+ * against the ComponentCacheManager to identify which cached component
83
+ * this update belongs to.
84
+ * @param context - Key-value pairs representing dashboard state the agent
85
+ * should know about. Each dashboard defines its own shape.
86
+ */
87
+ SetAgentContext(caller: BaseResourceComponent, context: Record<string, unknown>): void;
88
+ /**
89
+ * Register the client tools available from a resource component.
90
+ * Call this on component init and whenever the available tools change.
91
+ * Tools are automatically unregistered when the component becomes inactive
92
+ * (tab switch) and re-registered when it becomes active again.
93
+ *
94
+ * @param caller - Pass `this` from the calling component.
95
+ * @param tools - Array of tool definitions with Name, Description,
96
+ * ParameterSchema (JSON Schema), and Handler function.
97
+ */
98
+ SetAgentClientTools(caller: BaseResourceComponent, tools: Array<{
99
+ Name: string;
100
+ Description: string;
101
+ ParameterSchema: Record<string, unknown>;
102
+ Handler: (params: Record<string, unknown>) => Promise<unknown>;
103
+ }>): void;
50
104
  ngOnDestroy(): void;
51
105
  /**
52
106
  * Set up global keyboard event listeners to track shift key state
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.service.d.ts","sourceRoot":"","sources":["../../src/lib/navigation.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAA8B,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACrI,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;;AAIpD;;;;GAIG;AACH,eAAO,MAAM,aAAa,eAAe,CAAC;AAO1C;;;GAGG;AACH,qBAGa,iBAAkB,YAAW,SAAS;IAU/C,OAAO,CAAC,gBAAgB;IACxB,OAAO,CAAC,UAAU;IAVpB,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,aAAa,CAAsB;IAE3C,6EAA6E;IAC7E,OAAO,CAAC,UAAU,CAAwC;IAC1D,4BAA4B;IAC5B,OAAO,CAAC,aAAa,CAAuB;gBAGlC,gBAAgB,EAAE,qBAAqB,EACvC,UAAU,EAAE,kBAAkB;IAKxC;;;;OAIG;IACH,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB;IAmC/B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAmB1B;;;OAGG;IACI,iBAAiB,IAAI,IAAI;IAKhC,WAAW,IAAI,IAAI;IA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I,SAAS,CACd,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,MAAM;IA2BT;;;;;OAKG;IACI,mBAAmB,CACxB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,MAAM;IA8BT;;;;;;;;;;;OAWG;IACU,iBAAiB,CAC5B,WAAW,EAAE,MAAM,EACnB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAgCzB;;;;;;OAMG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmDrE;;;;;;;;;;;;;;;;OAgBG;IACH,0BAA0B,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,IAAI;IAU5E;;;OAGG;IACH,OAAO,CAAC,qBAAqB;yCAxtBlB,iBAAiB;6CAAjB,iBAAiB;CA0vB7B"}
@@ -1,5 +1,5 @@
1
1
  import { Injectable } from '@angular/core';
2
- import { fromEvent } from 'rxjs';
2
+ import { fromEvent, Subject } from 'rxjs';
3
3
  import { UUIDsEqual } from '@memberjunction/global';
4
4
  import * as i0 from "@angular/core";
5
5
  import * as i1 from "@memberjunction/ng-base-application";
@@ -103,6 +103,44 @@ export class NavigationService {
103
103
  this._homeAppId = undefined;
104
104
  this._homeAppColor = null;
105
105
  }
106
+ // ════════════════════════════════════════════
107
+ // Agent Context & Client Tools
108
+ // ════════════════════════════════════════════
109
+ /**
110
+ * Observable stream of agent context updates from resource components.
111
+ * The shell subscribes to this to update the ComponentCacheManager and
112
+ * push changes to the chat overlay's AppContextSnapshot.DashboardContext.
113
+ */
114
+ AgentContextUpdated$ = new Subject();
115
+ /**
116
+ * Report the current agent-visible state from a resource component.
117
+ * Call this whenever the dashboard's internal state changes (tab switch,
118
+ * filter change, pipeline status change, drill-down, etc.).
119
+ *
120
+ * @param caller - Pass `this` from the calling component. Used to match
121
+ * against the ComponentCacheManager to identify which cached component
122
+ * this update belongs to.
123
+ * @param context - Key-value pairs representing dashboard state the agent
124
+ * should know about. Each dashboard defines its own shape.
125
+ */
126
+ SetAgentContext(caller, context) {
127
+ console.log(`[AgentContext] SetAgentContext from ${caller.constructor.name}:`, Object.keys(context));
128
+ this.AgentContextUpdated$.next({ Caller: caller, AgentContext: context });
129
+ }
130
+ /**
131
+ * Register the client tools available from a resource component.
132
+ * Call this on component init and whenever the available tools change.
133
+ * Tools are automatically unregistered when the component becomes inactive
134
+ * (tab switch) and re-registered when it becomes active again.
135
+ *
136
+ * @param caller - Pass `this` from the calling component.
137
+ * @param tools - Array of tool definitions with Name, Description,
138
+ * ParameterSchema (JSON Schema), and Handler function.
139
+ */
140
+ SetAgentClientTools(caller, tools) {
141
+ console.log(`[AgentContext] SetAgentClientTools from ${caller.constructor.name}: [${tools.map(t => t.Name).join(', ')}]`);
142
+ this.AgentContextUpdated$.next({ Caller: caller, AgentClientTools: tools });
143
+ }
106
144
  ngOnDestroy() {
107
145
  this.subscriptions.forEach(sub => sub.unsubscribe());
108
146
  }
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.service.js","sourceRoot":"","sources":["../../src/lib/navigation.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAC;AAItD,OAAO,EAAE,SAAS,EAAgB,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;;;AAEpD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAE1C;;GAEG;AACH,MAAM,iBAAiB,GAAG,SAAS,CAAC,CAAC,2BAA2B;AAEhE;;;GAGG;AAIH,MAAM,O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CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YACjC,CAAC;QACH,CAAC;QAED,+BAA+B;QAC/B,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,KAAK,EAAE;YAClD,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS;SACvF,CAAC,CAAC;IACL,CAAC;2GA1sBU,iBAAiB;gEAAjB,iBAAiB,WAAjB,iBAAiB,mBAFhB,MAAM;;iFAEP,iBAAiB;cAH7B,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { WorkspaceStateManager, NavItem, DynamicNavItem, TabRequest, ApplicationManager } from '@memberjunction/ng-base-application';\nimport { NavigationOptions } from './navigation.interfaces';\nimport { CompositeKey } from '@memberjunction/core';\nimport { fromEvent, Subscription } from 'rxjs';\nimport { UUIDsEqual } from '@memberjunction/global';\n\n/**\n * System application ID for non-app-specific resources (fallback only)\n * Uses double underscore prefix to indicate system-level resource\n * @deprecated Prefer using NavigationService.getDefaultApplicationId() instead\n */\nexport const SYSTEM_APP_ID = '__explorer';\n\n/**\n * Neutral color for fallback when no app is available\n */\nconst NEUTRAL_APP_COLOR = '#9E9E9E'; // Material Design Gray 500\n\n/**\n * Centralized navigation service that handles all navigation operations\n * with automatic shift-key detection for power user workflows\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class NavigationService implements OnDestroy {\n private shiftKeyPressed = false;\n private subscriptions: Subscription[] = [];\n\n /** Cached Home app ID (null means not found, undefined means not checked) */\n private _homeAppId: string | null | undefined = undefined;\n /** Cached Home app color */\n private _homeAppColor: string | null = null;\n\n constructor(\n private workspaceManager: WorkspaceStateManager,\n private appManager: ApplicationManager\n ) {\n this.setupGlobalShiftKeyDetection();\n }\n\n /**\n * Get the neutral color used for system-wide resources (entities, views, dashboards)\n * Returns a light neutral gray\n * @deprecated Use getDefaultAppColor() for better UX with Home app integration\n */\n get ExplorerAppColor(): string {\n return NEUTRAL_APP_COLOR;\n }\n\n /**\n * Gets the default application ID for orphan resources.\n * Priority: Home app > Active app > SYSTEM_APP_ID\n *\n * This ensures orphan resources (entity records, dashboards, views opened directly)\n * are grouped under the Home app instead of being orphaned in the tab system.\n */\n private getDefaultApplicationId(): string {\n // Check cache first\n if (this._homeAppId !== undefined) {\n if (this._homeAppId !== null) {\n return this._homeAppId;\n }\n // Home app not found, check active app\n const activeApp = this.appManager.GetActiveApp();\n if (activeApp) {\n return activeApp.ID;\n }\n return SYSTEM_APP_ID;\n }\n\n // First time - look for Home app\n const homeApp = this.appManager.GetAppByName('Home');\n if (homeApp) {\n this._homeAppId = homeApp.ID;\n this._homeAppColor = homeApp.GetColor();\n return homeApp.ID;\n }\n\n // Cache that Home app doesn't exist\n this._homeAppId = null;\n\n // Fall back to currently active app\n const activeApp = this.appManager.GetActiveApp();\n if (activeApp) {\n return activeApp.ID;\n }\n\n // Last resort - system app ID\n return SYSTEM_APP_ID;\n }\n\n /**\n * Gets the default app color for orphan resources.\n * Returns Home app color if available, otherwise neutral gray.\n */\n private getDefaultAppColor(): string {\n // Ensure cache is populated\n this.getDefaultApplicationId();\n\n // If Home app exists, use its color\n if (this._homeAppColor) {\n return this._homeAppColor;\n }\n\n // Check active app\n const activeApp = this.appManager.GetActiveApp();\n if (activeApp) {\n return activeApp.GetColor();\n }\n\n // Fall back to neutral color\n return NEUTRAL_APP_COLOR;\n }\n\n /**\n * Clears the cached Home app info.\n * Call this if apps are reloaded or user logs out.\n */\n public clearHomeAppCache(): void {\n this._homeAppId = undefined;\n this._homeAppColor = null;\n }\n\n ngOnDestroy(): void {\n this.subscriptions.forEach(sub => sub.unsubscribe());\n }\n\n /**\n * Set up global keyboard event listeners to track shift key state\n */\n private setupGlobalShiftKeyDetection(): void {\n // Track shift key via mousedown events (capture phase) instead of keydown/keyup.\n // This is more reliable because:\n // 1. MouseEvent.shiftKey always reflects the actual modifier state at click time\n // 2. No risk of \"stuck\" state from missed keyup events (focus loss, tab switch, etc.)\n // 3. Navigation is always triggered by a click, so the shift state is read\n // at exactly the right moment\n this.subscriptions.push(\n fromEvent<MouseEvent>(document, 'mousedown', { capture: true }).subscribe(event => {\n this.shiftKeyPressed = event.shiftKey;\n })\n );\n }\n\n /**\n * Get current shift key state\n */\n private isShiftPressed(): boolean {\n return this.shiftKeyPressed;\n }\n\n /**\n * Determine if a new tab should be forced based on options and shift key state\n */\n private shouldForceNewTab(options?: NavigationOptions): boolean {\n // If forceNewTab is explicitly set, use that\n if (options?.forceNewTab !== undefined) {\n return options.forceNewTab;\n }\n\n // Otherwise, use global shift key detection\n return this.isShiftPressed();\n }\n\n /**\n * Handle temporary tab preservation when forcing new tabs\n * Rule: Only ONE tab should be temporary at a time\n * When shift+clicking to force a new tab, pin the current active tab if it's temporary\n */\n private handleSingleResourceModeTransition(forceNew: boolean, newRequest: TabRequest): void {\n if (!forceNew) {\n return; // Normal navigation, not forcing new tab\n }\n\n const config = this.workspaceManager.GetConfiguration();\n\n if (!config || !config.tabs || config.tabs.length === 0) {\n return; // No tabs to preserve\n }\n\n // Find the currently active tab\n const activeTab = config.tabs.find(tab => tab.id === config.activeTabId);\n if (!activeTab) {\n return; // No active tab\n }\n\n // If the active tab is NOT pinned (i.e., it's temporary), pin it to preserve it\n // This maintains the \"only one temporary tab\" rule\n if (!activeTab.isPinned) {\n this.workspaceManager.TogglePin(activeTab.id);\n }\n }\n\n /**\n * Check if a tab request matches an existing tab's resource\n */\n private isSameResource(tab: any, request: TabRequest): boolean {\n // Different apps = different resources\n if (tab.applicationId !== request.ApplicationId) {\n return false;\n }\n\n // For resource-based tabs, compare resourceType and recordId\n if (request.Configuration?.resourceType) {\n const requestRecordId = request.ResourceRecordId || '';\n const tabRecordId = tab.resourceRecordId || '';\n return tab.configuration?.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId;\n }\n\n // For app nav items, compare appName and navItemName\n if (request.Configuration?.appName && request.Configuration?.navItemName) {\n return tab.configuration?.appName === request.Configuration.appName &&\n tab.configuration?.navItemName === request.Configuration.navItemName;\n }\n\n // Fallback to basic comparison\n return false;\n }\n\n /**\n * Open a navigation item within an app\n */\n public OpenNavItem(appId: string, navItem: NavItem, appColor: string, options?: NavigationOptions): string {\n const forceNew = this.shouldForceNewTab(options);\n\n // Get the app to find its name\n const app = this.appManager.GetAppById(appId);\n const appName = app?.Name || '';\n\n // Dynamic nav items (e.g. orphan entity records) carry their original tab Configuration\n // and should NOT get navItemName stamped on them — that would cause buildResourceUrl\n // to produce a nav-item-style URL like /app/home/<label> instead of the correct\n // resource-type URL like /app/home/record/Entity/ID|...\n const isDynamic = (navItem as DynamicNavItem).isDynamic === true;\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: navItem.Label,\n ResourceRecordId: navItem.RecordID || '', // Also store at top level for consistent tab matching\n Configuration: {\n route: navItem.Route,\n resourceType: navItem.ResourceType,\n driverClass: navItem.DriverClass, // Pass through DriverClass for Custom resource type\n recordId: navItem.RecordID,\n appName: appName, // Store app name for URL building\n appId: appId,\n ...(isDynamic ? {} : { navItemName: navItem.Label }), // Only set for static nav items\n ...(navItem.Configuration || {})\n },\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n let tabId: string;\n if (forceNew) {\n // Always create a new tab\n tabId = this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n // Use existing OpenTab logic (may replace temporary tab)\n tabId = this.workspaceManager.OpenTab(request, appColor);\n }\n\n // Apply query params to the newly opened/activated tab if provided\n if (options?.queryParams) {\n this.applyQueryParamsToTab(tabId, options.queryParams);\n }\n\n return tabId;\n }\n\n /**\n * Open an entity record view\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenEntityRecord(\n entityName: string,\n recordPkey: CompositeKey,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n\n const forceNew = this.shouldForceNewTab(options);\n\n const recordId = recordPkey.ToURLSegment();\n const request: TabRequest = {\n ApplicationId: appId,\n Title: `${entityName} - ${recordId}`,\n Configuration: {\n resourceType: 'Records',\n Entity: entityName, // Must use 'Entity' (capital E) - expected by record-resource.component\n recordId: recordId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: recordId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n let tabId: string;\n if (forceNew) {\n tabId = this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n tabId = this.workspaceManager.OpenTab(request, appColor);\n }\n\n return tabId;\n }\n\n /**\n * Open a view\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenView(\n viewId: string,\n viewName: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: viewName,\n Configuration: {\n resourceType: 'MJ: User Views',\n viewId,\n recordId: viewId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: viewId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open a dashboard\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenDashboard(\n dashboardId: string,\n dashboardName: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: dashboardName,\n Configuration: {\n resourceType: 'Dashboards',\n dashboardId,\n recordId: dashboardId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: dashboardId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open a report\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenReport(\n reportId: string,\n reportName: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: reportName,\n Configuration: {\n resourceType: 'Reports',\n reportId,\n recordId: reportId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: reportId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open an artifact\n * Artifacts are versioned content containers (reports, dashboards, UI components, etc.)\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenArtifact(\n artifactId: string,\n artifactName?: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: artifactName || `Artifact - ${artifactId}`,\n Configuration: {\n resourceType: 'Artifacts',\n artifactId,\n recordId: artifactId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: artifactId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open a dynamic view\n * Dynamic views are entity-based views with custom filters, not saved views\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenDynamicView(\n entityName: string,\n extraFilter?: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const filterSuffix = extraFilter ? ' (Filtered)' : '';\n const request: TabRequest = {\n ApplicationId: appId,\n Title: `${entityName}${filterSuffix}`,\n Configuration: {\n resourceType: 'MJ: User Views',\n Entity: entityName,\n ExtraFilter: extraFilter,\n isDynamic: true,\n recordId: 'dynamic' // Special marker for dynamic views\n },\n ResourceRecordId: 'dynamic',\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open a query\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenQuery(\n queryId: string,\n queryName: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: queryName,\n Configuration: {\n resourceType: 'Queries',\n queryId,\n recordId: queryId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: queryId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open a new entity record creation form\n * Uses Home app if available, otherwise falls back to active app or system app\n * @param entityName The name of the entity to create a new record for\n * @param options Navigation options including optional newRecordValues for pre-populating fields\n */\n public OpenNewEntityRecord(\n entityName: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: `New ${entityName}`,\n Configuration: {\n resourceType: 'Records',\n Entity: entityName, // Must use 'Entity' (capital E) - expected by record-resource.component\n recordId: '', // Empty recordId indicates new record\n isNew: true, // Flag to indicate this is a new record\n NewRecordValues: options?.newRecordValues // Pass through initial values if provided\n },\n ResourceRecordId: '', // Empty for new records\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Navigate to a nav item by name within the current or specified application.\n * Allows passing additional configuration parameters to merge with the nav item's config.\n * This is useful for cross-resource navigation where a component needs to navigate\n * to another nav item with specific parameters (e.g., navigate to Conversations with a specific conversationId).\n *\n * @param navItemName The label/name of the nav item to navigate to\n * @param configuration Additional configuration to merge (e.g., conversationId, artifactId)\n * @param appId Optional app ID (defaults to current active app)\n * @param options Navigation options\n * @returns The tab ID if successful, null if nav item not found\n */\n public async OpenNavItemByName(\n navItemName: string,\n configuration?: Record<string, unknown>,\n appId?: string,\n options?: NavigationOptions\n ): Promise<string | null> {\n // Get app (use provided or current active)\n const targetAppId = appId || this.appManager.GetActiveApp()?.ID;\n if (!targetAppId) {\n return null;\n }\n\n const app = this.appManager.GetAppById(targetAppId);\n if (!app) {\n return null;\n }\n\n // Find the nav item by name\n const navItems = await app.GetNavItems();\n const navItem = navItems.find(item => item.Label === navItemName);\n if (!navItem) {\n return null;\n }\n\n // Create a merged nav item with additional configuration\n const mergedNavItem: NavItem = {\n ...navItem,\n Configuration: {\n ...(navItem.Configuration || {}),\n ...(configuration || {})\n }\n };\n\n // Use existing OpenNavItem\n return this.OpenNavItem(targetAppId, mergedNavItem, app.GetColor(), options);\n }\n\n /**\n * Switch to an application by ID.\n * This sets the app as active and either opens a specific nav item or creates a default tab.\n * If the requested nav item already has an open tab, switches to that tab instead of creating a new one.\n * @param appId The application ID to switch to\n * @param navItemName Optional name of a nav item to open within the app. If provided, opens that nav item.\n */\n async SwitchToApp(appId: string, navItemName?: string): Promise<void> {\n await this.appManager.SetActiveApp(appId);\n\n const app = this.appManager.GetAllApps().find(a => UUIDsEqual(a.ID, appId));\n if (!app) {\n return;\n }\n\n const appTabs = this.workspaceManager.GetAppTabs(appId);\n\n // If a specific nav item is requested\n if (navItemName) {\n const navItems = await app.GetNavItems();\n const navItem = navItems.find(item => item.Label === navItemName);\n if (navItem) {\n // Check if there's already a tab for this nav item\n const existingTab = appTabs.find(tab =>\n tab.title === navItem.Label ||\n (tab.configuration?.['route'] === navItem.Route && navItem.Route)\n );\n\n if (existingTab) {\n // Switch to existing tab\n this.workspaceManager.SetActiveTab(existingTab.id);\n } else {\n // Open new tab for this nav item\n this.OpenNavItem(appId, navItem, app.GetColor());\n }\n return;\n }\n // Nav item not found, fall through to default behavior\n }\n\n // No specific nav item requested - check if app has any tabs\n if (appTabs.length === 0) {\n // Create default tab\n const tabRequest = await app.CreateDefaultTab();\n if (tabRequest) {\n this.workspaceManager.OpenTab(tabRequest, app.GetColor());\n }\n } else {\n // App has tabs - switch to the first one (or active one if exists)\n const config = this.workspaceManager.GetConfiguration();\n const activeAppTab = appTabs.find(t => t.id === config?.activeTabId);\n if (!activeAppTab) {\n // No active tab for this app, switch to first tab\n this.workspaceManager.SetActiveTab(appTabs[0].id);\n }\n }\n }\n\n /**\n * Update the query params for the currently active tab.\n * This updates the tab's configuration and triggers a URL sync via the shell's\n * workspace configuration subscription.\n *\n * Use this instead of directly calling router.navigate() to ensure proper\n * URL management that respects app-scoped routes.\n *\n * @param queryParams Object containing query param key-value pairs.\n * Use null values to remove a query param.\n * @example\n * // Add or update query params\n * navigationService.UpdateActiveTabQueryParams({ category: 'abc123', dashboard: 'xyz789' });\n *\n * // Remove a query param\n * navigationService.UpdateActiveTabQueryParams({ category: null });\n */\n UpdateActiveTabQueryParams(queryParams: Record<string, string | null>): void {\n const activeTabId = this.workspaceManager.GetActiveTabId();\n if (!activeTabId) {\n console.warn('NavigationService.UpdateActiveTabQueryParams: No active tab');\n return;\n }\n\n this.applyQueryParamsToTab(activeTabId, queryParams);\n }\n\n /**\n * Apply query params to a specific tab by ID.\n * Merges with any existing query params on the tab. Use null values to remove params.\n */\n private applyQueryParamsToTab(tabId: string, queryParams: Record<string, string | null>): void {\n const tab = this.workspaceManager.GetTab(tabId);\n if (!tab) {\n console.warn('NavigationService.applyQueryParamsToTab: Tab not found:', tabId);\n return;\n }\n\n // Get existing queryParams from tab configuration\n const existingQueryParams = (tab.configuration?.['queryParams'] || {}) as Record<string, string | null>;\n\n // Merge with new query params\n const mergedQueryParams: Record<string, string> = {};\n\n // Start with existing params (excluding nulls)\n for (const [key, value] of Object.entries(existingQueryParams)) {\n if (value !== null) {\n mergedQueryParams[key] = value;\n }\n }\n\n // Apply new params (null means remove)\n for (const [key, value] of Object.entries(queryParams)) {\n if (value === null) {\n delete mergedQueryParams[key];\n } else {\n mergedQueryParams[key] = value;\n }\n }\n\n // Update the tab configuration\n this.workspaceManager.UpdateTabConfiguration(tabId, {\n queryParams: Object.keys(mergedQueryParams).length > 0 ? mergedQueryParams : undefined\n });\n }\n}\n"]}
1
+ {"version":3,"file":"navigation.service.js","sourceRoot":"","sources":["../../src/lib/navigation.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAC;AAItD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAgB,MAAM,MAAM,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;;;AAsBpD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAE1C;;GAEG;AACH,MAAM,iBAAiB,GAAG,SAAS,CAAC,CAAC,2BAA2B;AAEhE;;;GA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M;aACnB","sourcesContent":["import { Injectable, OnDestroy } from '@angular/core';\nimport { WorkspaceStateManager, NavItem, DynamicNavItem, TabRequest, ApplicationManager } from '@memberjunction/ng-base-application';\nimport { NavigationOptions } from './navigation.interfaces';\nimport { CompositeKey } from '@memberjunction/core';\nimport { fromEvent, Subject, Subscription } from 'rxjs';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { BaseResourceComponent } from './base-resource-component';\n\n/**\n * Event emitted when a resource component reports its agent context or tools.\n * The shell (which owns the ComponentCacheManager) subscribes to these events\n * and updates the cache + active AppContextSnapshot accordingly.\n */\nexport interface AgentContextUpdate {\n /** The component instance that reported the update */\n Caller: BaseResourceComponent;\n /** Dashboard-specific context for the agent (undefined = no change) */\n AgentContext?: Record<string, unknown>;\n /** Client tools available from this dashboard (undefined = no change) */\n AgentClientTools?: Array<{\n Name: string;\n Description: string;\n ParameterSchema: Record<string, unknown>;\n Handler: (params: Record<string, unknown>) => Promise<unknown>;\n }>;\n}\n\n/**\n * System application ID for non-app-specific resources (fallback only)\n * Uses double underscore prefix to indicate system-level resource\n * @deprecated Prefer using NavigationService.getDefaultApplicationId() instead\n */\nexport const SYSTEM_APP_ID = '__explorer';\n\n/**\n * Neutral color for fallback when no app is available\n */\nconst NEUTRAL_APP_COLOR = '#9E9E9E'; // Material Design Gray 500\n\n/**\n * Centralized navigation service that handles all navigation operations\n * with automatic shift-key detection for power user workflows\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class NavigationService implements OnDestroy {\n private shiftKeyPressed = false;\n private subscriptions: Subscription[] = [];\n\n /** Cached Home app ID (null means not found, undefined means not checked) */\n private _homeAppId: string | null | undefined = undefined;\n /** Cached Home app color */\n private _homeAppColor: string | null = null;\n\n constructor(\n private workspaceManager: WorkspaceStateManager,\n private appManager: ApplicationManager\n ) {\n this.setupGlobalShiftKeyDetection();\n }\n\n /**\n * Get the neutral color used for system-wide resources (entities, views, dashboards)\n * Returns a light neutral gray\n * @deprecated Use getDefaultAppColor() for better UX with Home app integration\n */\n get ExplorerAppColor(): string {\n return NEUTRAL_APP_COLOR;\n }\n\n /**\n * Gets the default application ID for orphan resources.\n * Priority: Home app > Active app > SYSTEM_APP_ID\n *\n * This ensures orphan resources (entity records, dashboards, views opened directly)\n * are grouped under the Home app instead of being orphaned in the tab system.\n */\n private getDefaultApplicationId(): string {\n // Check cache first\n if (this._homeAppId !== undefined) {\n if (this._homeAppId !== null) {\n return this._homeAppId;\n }\n // Home app not found, check active app\n const activeApp = this.appManager.GetActiveApp();\n if (activeApp) {\n return activeApp.ID;\n }\n return SYSTEM_APP_ID;\n }\n\n // First time - look for Home app\n const homeApp = this.appManager.GetAppByName('Home');\n if (homeApp) {\n this._homeAppId = homeApp.ID;\n this._homeAppColor = homeApp.GetColor();\n return homeApp.ID;\n }\n\n // Cache that Home app doesn't exist\n this._homeAppId = null;\n\n // Fall back to currently active app\n const activeApp = this.appManager.GetActiveApp();\n if (activeApp) {\n return activeApp.ID;\n }\n\n // Last resort - system app ID\n return SYSTEM_APP_ID;\n }\n\n /**\n * Gets the default app color for orphan resources.\n * Returns Home app color if available, otherwise neutral gray.\n */\n private getDefaultAppColor(): string {\n // Ensure cache is populated\n this.getDefaultApplicationId();\n\n // If Home app exists, use its color\n if (this._homeAppColor) {\n return this._homeAppColor;\n }\n\n // Check active app\n const activeApp = this.appManager.GetActiveApp();\n if (activeApp) {\n return activeApp.GetColor();\n }\n\n // Fall back to neutral color\n return NEUTRAL_APP_COLOR;\n }\n\n /**\n * Clears the cached Home app info.\n * Call this if apps are reloaded or user logs out.\n */\n public clearHomeAppCache(): void {\n this._homeAppId = undefined;\n this._homeAppColor = null;\n }\n\n // ════════════════════════════════════════════\n // Agent Context & Client Tools\n // ════════════════════════════════════════════\n\n /**\n * Observable stream of agent context updates from resource components.\n * The shell subscribes to this to update the ComponentCacheManager and\n * push changes to the chat overlay's AppContextSnapshot.DashboardContext.\n */\n public readonly AgentContextUpdated$ = new Subject<AgentContextUpdate>();\n\n /**\n * Report the current agent-visible state from a resource component.\n * Call this whenever the dashboard's internal state changes (tab switch,\n * filter change, pipeline status change, drill-down, etc.).\n *\n * @param caller - Pass `this` from the calling component. Used to match\n * against the ComponentCacheManager to identify which cached component\n * this update belongs to.\n * @param context - Key-value pairs representing dashboard state the agent\n * should know about. Each dashboard defines its own shape.\n */\n public SetAgentContext(caller: BaseResourceComponent, context: Record<string, unknown>): void {\n console.log(`[AgentContext] SetAgentContext from ${caller.constructor.name}:`, Object.keys(context));\n this.AgentContextUpdated$.next({ Caller: caller, AgentContext: context });\n }\n\n /**\n * Register the client tools available from a resource component.\n * Call this on component init and whenever the available tools change.\n * Tools are automatically unregistered when the component becomes inactive\n * (tab switch) and re-registered when it becomes active again.\n *\n * @param caller - Pass `this` from the calling component.\n * @param tools - Array of tool definitions with Name, Description,\n * ParameterSchema (JSON Schema), and Handler function.\n */\n public SetAgentClientTools(caller: BaseResourceComponent, tools: Array<{\n Name: string;\n Description: string;\n ParameterSchema: Record<string, unknown>;\n Handler: (params: Record<string, unknown>) => Promise<unknown>;\n }>): void {\n console.log(`[AgentContext] SetAgentClientTools from ${caller.constructor.name}: [${tools.map(t => t.Name).join(', ')}]`);\n this.AgentContextUpdated$.next({ Caller: caller, AgentClientTools: tools });\n }\n\n ngOnDestroy(): void {\n this.subscriptions.forEach(sub => sub.unsubscribe());\n }\n\n /**\n * Set up global keyboard event listeners to track shift key state\n */\n private setupGlobalShiftKeyDetection(): void {\n // Track shift key via mousedown events (capture phase) instead of keydown/keyup.\n // This is more reliable because:\n // 1. MouseEvent.shiftKey always reflects the actual modifier state at click time\n // 2. No risk of \"stuck\" state from missed keyup events (focus loss, tab switch, etc.)\n // 3. Navigation is always triggered by a click, so the shift state is read\n // at exactly the right moment\n this.subscriptions.push(\n fromEvent<MouseEvent>(document, 'mousedown', { capture: true }).subscribe(event => {\n this.shiftKeyPressed = event.shiftKey;\n })\n );\n }\n\n /**\n * Get current shift key state\n */\n private isShiftPressed(): boolean {\n return this.shiftKeyPressed;\n }\n\n /**\n * Determine if a new tab should be forced based on options and shift key state\n */\n private shouldForceNewTab(options?: NavigationOptions): boolean {\n // If forceNewTab is explicitly set, use that\n if (options?.forceNewTab !== undefined) {\n return options.forceNewTab;\n }\n\n // Otherwise, use global shift key detection\n return this.isShiftPressed();\n }\n\n /**\n * Handle temporary tab preservation when forcing new tabs\n * Rule: Only ONE tab should be temporary at a time\n * When shift+clicking to force a new tab, pin the current active tab if it's temporary\n */\n private handleSingleResourceModeTransition(forceNew: boolean, newRequest: TabRequest): void {\n if (!forceNew) {\n return; // Normal navigation, not forcing new tab\n }\n\n const config = this.workspaceManager.GetConfiguration();\n\n if (!config || !config.tabs || config.tabs.length === 0) {\n return; // No tabs to preserve\n }\n\n // Find the currently active tab\n const activeTab = config.tabs.find(tab => tab.id === config.activeTabId);\n if (!activeTab) {\n return; // No active tab\n }\n\n // If the active tab is NOT pinned (i.e., it's temporary), pin it to preserve it\n // This maintains the \"only one temporary tab\" rule\n if (!activeTab.isPinned) {\n this.workspaceManager.TogglePin(activeTab.id);\n }\n }\n\n /**\n * Check if a tab request matches an existing tab's resource\n */\n private isSameResource(tab: any, request: TabRequest): boolean {\n // Different apps = different resources\n if (tab.applicationId !== request.ApplicationId) {\n return false;\n }\n\n // For resource-based tabs, compare resourceType and recordId\n if (request.Configuration?.resourceType) {\n const requestRecordId = request.ResourceRecordId || '';\n const tabRecordId = tab.resourceRecordId || '';\n return tab.configuration?.resourceType === request.Configuration.resourceType &&\n tabRecordId === requestRecordId;\n }\n\n // For app nav items, compare appName and navItemName\n if (request.Configuration?.appName && request.Configuration?.navItemName) {\n return tab.configuration?.appName === request.Configuration.appName &&\n tab.configuration?.navItemName === request.Configuration.navItemName;\n }\n\n // Fallback to basic comparison\n return false;\n }\n\n /**\n * Open a navigation item within an app\n */\n public OpenNavItem(appId: string, navItem: NavItem, appColor: string, options?: NavigationOptions): string {\n const forceNew = this.shouldForceNewTab(options);\n\n // Get the app to find its name\n const app = this.appManager.GetAppById(appId);\n const appName = app?.Name || '';\n\n // Dynamic nav items (e.g. orphan entity records) carry their original tab Configuration\n // and should NOT get navItemName stamped on them — that would cause buildResourceUrl\n // to produce a nav-item-style URL like /app/home/<label> instead of the correct\n // resource-type URL like /app/home/record/Entity/ID|...\n const isDynamic = (navItem as DynamicNavItem).isDynamic === true;\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: navItem.Label,\n ResourceRecordId: navItem.RecordID || '', // Also store at top level for consistent tab matching\n Configuration: {\n route: navItem.Route,\n resourceType: navItem.ResourceType,\n driverClass: navItem.DriverClass, // Pass through DriverClass for Custom resource type\n recordId: navItem.RecordID,\n appName: appName, // Store app name for URL building\n appId: appId,\n ...(isDynamic ? {} : { navItemName: navItem.Label }), // Only set for static nav items\n ...(navItem.Configuration || {})\n },\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n let tabId: string;\n if (forceNew) {\n // Always create a new tab\n tabId = this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n // Use existing OpenTab logic (may replace temporary tab)\n tabId = this.workspaceManager.OpenTab(request, appColor);\n }\n\n // Apply query params to the newly opened/activated tab if provided\n if (options?.queryParams) {\n this.applyQueryParamsToTab(tabId, options.queryParams);\n }\n\n return tabId;\n }\n\n /**\n * Open an entity record view\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenEntityRecord(\n entityName: string,\n recordPkey: CompositeKey,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n\n const forceNew = this.shouldForceNewTab(options);\n\n const recordId = recordPkey.ToURLSegment();\n const request: TabRequest = {\n ApplicationId: appId,\n Title: `${entityName} - ${recordId}`,\n Configuration: {\n resourceType: 'Records',\n Entity: entityName, // Must use 'Entity' (capital E) - expected by record-resource.component\n recordId: recordId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: recordId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n let tabId: string;\n if (forceNew) {\n tabId = this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n tabId = this.workspaceManager.OpenTab(request, appColor);\n }\n\n return tabId;\n }\n\n /**\n * Open a view\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenView(\n viewId: string,\n viewName: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: viewName,\n Configuration: {\n resourceType: 'MJ: User Views',\n viewId,\n recordId: viewId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: viewId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open a dashboard\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenDashboard(\n dashboardId: string,\n dashboardName: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: dashboardName,\n Configuration: {\n resourceType: 'Dashboards',\n dashboardId,\n recordId: dashboardId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: dashboardId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open a report\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenReport(\n reportId: string,\n reportName: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: reportName,\n Configuration: {\n resourceType: 'Reports',\n reportId,\n recordId: reportId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: reportId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open an artifact\n * Artifacts are versioned content containers (reports, dashboards, UI components, etc.)\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenArtifact(\n artifactId: string,\n artifactName?: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: artifactName || `Artifact - ${artifactId}`,\n Configuration: {\n resourceType: 'Artifacts',\n artifactId,\n recordId: artifactId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: artifactId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open a dynamic view\n * Dynamic views are entity-based views with custom filters, not saved views\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenDynamicView(\n entityName: string,\n extraFilter?: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const filterSuffix = extraFilter ? ' (Filtered)' : '';\n const request: TabRequest = {\n ApplicationId: appId,\n Title: `${entityName}${filterSuffix}`,\n Configuration: {\n resourceType: 'MJ: User Views',\n Entity: entityName,\n ExtraFilter: extraFilter,\n isDynamic: true,\n recordId: 'dynamic' // Special marker for dynamic views\n },\n ResourceRecordId: 'dynamic',\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open a query\n * Uses Home app if available, otherwise falls back to active app or system app\n */\n public OpenQuery(\n queryId: string,\n queryName: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: queryName,\n Configuration: {\n resourceType: 'Queries',\n queryId,\n recordId: queryId // Also needed in Configuration for tab-container.component to populate ResourceRecordID\n },\n ResourceRecordId: queryId,\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Open a new entity record creation form\n * Uses Home app if available, otherwise falls back to active app or system app\n * @param entityName The name of the entity to create a new record for\n * @param options Navigation options including optional newRecordValues for pre-populating fields\n */\n public OpenNewEntityRecord(\n entityName: string,\n options?: NavigationOptions\n ): string {\n const appId = this.getDefaultApplicationId();\n const appColor = this.getDefaultAppColor();\n\n const forceNew = this.shouldForceNewTab(options);\n\n const request: TabRequest = {\n ApplicationId: appId,\n Title: `New ${entityName}`,\n Configuration: {\n resourceType: 'Records',\n Entity: entityName, // Must use 'Entity' (capital E) - expected by record-resource.component\n recordId: '', // Empty recordId indicates new record\n isNew: true, // Flag to indicate this is a new record\n NewRecordValues: options?.newRecordValues // Pass through initial values if provided\n },\n ResourceRecordId: '', // Empty for new records\n IsPinned: options?.pinTab || false\n };\n\n // Handle transition from single-resource mode\n this.handleSingleResourceModeTransition(forceNew, request);\n\n if (forceNew) {\n return this.workspaceManager.OpenTabForced(request, appColor);\n } else {\n return this.workspaceManager.OpenTab(request, appColor);\n }\n }\n\n /**\n * Navigate to a nav item by name within the current or specified application.\n * Allows passing additional configuration parameters to merge with the nav item's config.\n * This is useful for cross-resource navigation where a component needs to navigate\n * to another nav item with specific parameters (e.g., navigate to Conversations with a specific conversationId).\n *\n * @param navItemName The label/name of the nav item to navigate to\n * @param configuration Additional configuration to merge (e.g., conversationId, artifactId)\n * @param appId Optional app ID (defaults to current active app)\n * @param options Navigation options\n * @returns The tab ID if successful, null if nav item not found\n */\n public async OpenNavItemByName(\n navItemName: string,\n configuration?: Record<string, unknown>,\n appId?: string,\n options?: NavigationOptions\n ): Promise<string | null> {\n // Get app (use provided or current active)\n const targetAppId = appId || this.appManager.GetActiveApp()?.ID;\n if (!targetAppId) {\n return null;\n }\n\n const app = this.appManager.GetAppById(targetAppId);\n if (!app) {\n return null;\n }\n\n // Find the nav item by name\n const navItems = await app.GetNavItems();\n const navItem = navItems.find(item => item.Label === navItemName);\n if (!navItem) {\n return null;\n }\n\n // Create a merged nav item with additional configuration\n const mergedNavItem: NavItem = {\n ...navItem,\n Configuration: {\n ...(navItem.Configuration || {}),\n ...(configuration || {})\n }\n };\n\n // Use existing OpenNavItem\n return this.OpenNavItem(targetAppId, mergedNavItem, app.GetColor(), options);\n }\n\n /**\n * Switch to an application by ID.\n * This sets the app as active and either opens a specific nav item or creates a default tab.\n * If the requested nav item already has an open tab, switches to that tab instead of creating a new one.\n * @param appId The application ID to switch to\n * @param navItemName Optional name of a nav item to open within the app. If provided, opens that nav item.\n */\n async SwitchToApp(appId: string, navItemName?: string): Promise<void> {\n await this.appManager.SetActiveApp(appId);\n\n const app = this.appManager.GetAllApps().find(a => UUIDsEqual(a.ID, appId));\n if (!app) {\n return;\n }\n\n const appTabs = this.workspaceManager.GetAppTabs(appId);\n\n // If a specific nav item is requested\n if (navItemName) {\n const navItems = await app.GetNavItems();\n const navItem = navItems.find(item => item.Label === navItemName);\n if (navItem) {\n // Check if there's already a tab for this nav item\n const existingTab = appTabs.find(tab =>\n tab.title === navItem.Label ||\n (tab.configuration?.['route'] === navItem.Route && navItem.Route)\n );\n\n if (existingTab) {\n // Switch to existing tab\n this.workspaceManager.SetActiveTab(existingTab.id);\n } else {\n // Open new tab for this nav item\n this.OpenNavItem(appId, navItem, app.GetColor());\n }\n return;\n }\n // Nav item not found, fall through to default behavior\n }\n\n // No specific nav item requested - check if app has any tabs\n if (appTabs.length === 0) {\n // Create default tab\n const tabRequest = await app.CreateDefaultTab();\n if (tabRequest) {\n this.workspaceManager.OpenTab(tabRequest, app.GetColor());\n }\n } else {\n // App has tabs - switch to the first one (or active one if exists)\n const config = this.workspaceManager.GetConfiguration();\n const activeAppTab = appTabs.find(t => t.id === config?.activeTabId);\n if (!activeAppTab) {\n // No active tab for this app, switch to first tab\n this.workspaceManager.SetActiveTab(appTabs[0].id);\n }\n }\n }\n\n /**\n * Update the query params for the currently active tab.\n * This updates the tab's configuration and triggers a URL sync via the shell's\n * workspace configuration subscription.\n *\n * Use this instead of directly calling router.navigate() to ensure proper\n * URL management that respects app-scoped routes.\n *\n * @param queryParams Object containing query param key-value pairs.\n * Use null values to remove a query param.\n * @example\n * // Add or update query params\n * navigationService.UpdateActiveTabQueryParams({ category: 'abc123', dashboard: 'xyz789' });\n *\n * // Remove a query param\n * navigationService.UpdateActiveTabQueryParams({ category: null });\n */\n UpdateActiveTabQueryParams(queryParams: Record<string, string | null>): void {\n const activeTabId = this.workspaceManager.GetActiveTabId();\n if (!activeTabId) {\n console.warn('NavigationService.UpdateActiveTabQueryParams: No active tab');\n return;\n }\n\n this.applyQueryParamsToTab(activeTabId, queryParams);\n }\n\n /**\n * Apply query params to a specific tab by ID.\n * Merges with any existing query params on the tab. Use null values to remove params.\n */\n private applyQueryParamsToTab(tabId: string, queryParams: Record<string, string | null>): void {\n const tab = this.workspaceManager.GetTab(tabId);\n if (!tab) {\n console.warn('NavigationService.applyQueryParamsToTab: Tab not found:', tabId);\n return;\n }\n\n // Get existing queryParams from tab configuration\n const existingQueryParams = (tab.configuration?.['queryParams'] || {}) as Record<string, string | null>;\n\n // Merge with new query params\n const mergedQueryParams: Record<string, string> = {};\n\n // Start with existing params (excluding nulls)\n for (const [key, value] of Object.entries(existingQueryParams)) {\n if (value !== null) {\n mergedQueryParams[key] = value;\n }\n }\n\n // Apply new params (null means remove)\n for (const [key, value] of Object.entries(queryParams)) {\n if (value === null) {\n delete mergedQueryParams[key];\n } else {\n mergedQueryParams[key] = value;\n }\n }\n\n // Update the tab configuration\n this.workspaceManager.UpdateTabConfiguration(tabId, {\n queryParams: Object.keys(mergedQueryParams).length > 0 ? mergedQueryParams : undefined\n });\n }\n}\n"]}
@@ -2,11 +2,9 @@ import { ElementRef, Injector } from '@angular/core';
2
2
  import { CompositeKey } from '@memberjunction/core';
3
3
  import { MJResourceTypeEntity, MJUserNotificationEntity, ViewColumnInfo } from '@memberjunction/core-entities';
4
4
  import { Observable } from 'rxjs';
5
- import { NotificationService } from "@progress/kendo-angular-notification";
6
5
  import { MJNotificationService } from '@memberjunction/ng-notifications';
7
6
  import * as i0 from "@angular/core";
8
7
  export declare class SharedService {
9
- private notificationService;
10
8
  private mjNotificationsService;
11
9
  private injector;
12
10
  private static readonly _globalStoreKey;
@@ -16,7 +14,7 @@ export declare class SharedService {
16
14
  private tabChange;
17
15
  tabChange$: Observable<unknown>;
18
16
  private _navigationService;
19
- constructor(notificationService: NotificationService, mjNotificationsService: MJNotificationService, injector: Injector);
17
+ constructor(mjNotificationsService: MJNotificationService, injector: Injector);
20
18
  static get Instance(): SharedService;
21
19
  /**
22
20
  * Pre-warms commonly used engines in the background after login.
@@ -1 +1 @@
1
- {"version":3,"file":"shared.service.d.ts","sourceRoot":"","sources":["../../src/lib/shared.service.ts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YAAY,CAAC,CAAC;AAG1E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;CAgBb,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC"}
@@ -9,10 +9,8 @@ import { first, tap } from 'rxjs/operators';
9
9
  import { MJNotificationService } from '@memberjunction/ng-notifications';
10
10
  import { NavigationService } from './navigation.service';
11
11
  import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-notification";
13
- import * as i2 from "@memberjunction/ng-notifications";
12
+ import * as i1 from "@memberjunction/ng-notifications";
14
13
  export class SharedService {
15
- notificationService;
16
14
  mjNotificationsService;
17
15
  injector;
18
16
  static _globalStoreKey = '___SINGLETON__SharedService';
@@ -22,8 +20,7 @@ export class SharedService {
22
20
  tabChange = new Subject();
23
21
  tabChange$ = this.tabChange.asObservable();
24
22
  _navigationService = null;
25
- constructor(notificationService, mjNotificationsService, injector) {
26
- this.notificationService = notificationService;
23
+ constructor(mjNotificationsService, injector) {
27
24
  this.mjNotificationsService = mjNotificationsService;
28
25
  this.injector = injector;
29
26
  const g = GetGlobalObjectStore();
@@ -295,7 +292,7 @@ export class SharedService {
295
292
  LogError(e);
296
293
  }
297
294
  }
298
- static ɵfac = function SharedService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SharedService)(i0.ɵɵinject(i1.NotificationService), i0.ɵɵinject(i2.MJNotificationService), i0.ɵɵinject(i0.Injector)); };
295
+ static ɵfac = function SharedService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SharedService)(i0.ɵɵinject(i1.MJNotificationService), i0.ɵɵinject(i0.Injector)); };
299
296
  static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: SharedService, factory: SharedService.ɵfac, providedIn: 'root' });
300
297
  }
301
298
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SharedService, [{
@@ -303,7 +300,7 @@ export class SharedService {
303
300
  args: [{
304
301
  providedIn: 'root'
305
302
  }]
306
- }], () => [{ type: i1.NotificationService }, { type: i2.MJNotificationService }, { type: i0.Injector }], null); })();
303
+ }], () => [{ type: i1.MJNotificationService }, { type: i0.Injector }], null); })();
307
304
  export const HtmlListType = {
308
305
  Unordered: 'Unordered',
309
306
  Ordered: 'Ordered',
@@ -1 +1 @@
1
- {"version":3,"file":"shared.service.js","sourceRoot":"","sources":["../../src/lib/shared.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAY,MAAM,eAAe,CAAC;AACjE,OAAO,EAAmC,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3G,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,wBAAwB,EAAkE,MAAM,+BAA+B,CAAC;AAClL,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,+BAA+B,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEtJ,OAAO,EAAE,OAAO,EAAc,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;;;;AAKzD,MAAM,OAAO,aAAa;IAUd;IACA;IACA;IAXF,MAAM,CAAU,eAAe,GAAG,6BAA6B,CAAC;IAChE,MAAM,CAAC,OAAO,GAAY,KAAK,CAAC;IAChC,MAAM,CAAC,cAAc,GAA2B,EAAE,CAAC;IACnD,MAAM,CAAC,UAAU,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;IACxD,SAAS,GAAG,IA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AE,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;YAC7F,oDAAoD;YACpD,IAAI,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QAClE,CAAC;QACD,OAAO,CAAC,EAAE,CAAC;YACT,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC;YAC/C,QAAQ,CAAC,CAAC,CAAC,CAAC;QACd,CAAC;IACH,CAAC;uGA7UU,aAAa;gEAAb,aAAa,WAAb,aAAa,mBAFZ,MAAM;;iFAEP,aAAa;cAHzB,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;AAiVD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;CACV,CAAC;AAKX,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,WAAW,EAAE,aAAa;IAC1B,mBAAmB,EAAE,qBAAqB;IAC1C,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,wBAAwB,EAAE,0BAA0B;IACpD,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;CACtB,CAAC","sourcesContent":["import { ElementRef, Injectable, Injector } from '@angular/core';\nimport { CompositeKey, LocalCacheManager, LogError, Metadata, StartupManager } from '@memberjunction/core';\nimport { ArtifactMetadataEngine, DashboardEngine, ResourcePermissionEngine, MJResourceTypeEntity, MJUserNotificationEntity, ViewColumnInfo } from '@memberjunction/core-entities';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { EntityCommunicationsEngineBase } from \"@memberjunction/entity-communications-base\";\nimport { MJEventType, MJGlobal, ConvertMarkdownStringToHtmlList, InvokeManualResize, UUIDsEqual, GetGlobalObjectStore } from '@memberjunction/global';\nimport { GraphQLDataProvider } from '@memberjunction/graphql-dataprovider';\nimport { Subject, Observable, BehaviorSubject, firstValueFrom } from 'rxjs';\nimport { first, tap } from 'rxjs/operators';\nimport { NotificationService } from \"@progress/kendo-angular-notification\";\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { NavigationService } from './navigation.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SharedService {\n private static readonly _globalStoreKey = '___SINGLETON__SharedService';\n private static _loaded: boolean = false;\n private static _resourceTypes: MJResourceTypeEntity[] = [];\n private static isLoading$ = new BehaviorSubject<boolean>(false);\n private tabChange = new Subject();\n tabChange$ = this.tabChange.asObservable();\n private _navigationService: NavigationService | null = null;\n\n constructor(\n private notificationService: NotificationService,\n private mjNotificationsService: MJNotificationService,\n private injector: Injector\n ) {\n const g = GetGlobalObjectStore()!;\n if (g[SharedService._globalStoreKey]) {\n return g[SharedService._globalStoreKey] as SharedService;\n }\n g[SharedService._globalStoreKey] = this;\n\n MJGlobal.Instance.GetEventListener(true).subscribe(async (event) => {\n switch (event.event) {\n case MJEventType.LoggedIn:\n if (SharedService._loaded === false) {\n // Pre-warm non-critical engines IMMEDIATELY on LoggedIn, before\n // StartupManager.Startup() completes. These engines only need\n // Metadata.Provider (set during setupGraphQLClient's provider.Config()).\n // Firing them here allows their RunViews calls to be coalesced with\n // the startup engines' calls into fewer mega-batched GraphQL requests.\n SharedService.preWarmEngines();\n\n // Handle app startup — joins the same Startup() promise that\n // setupGraphQLClient kicked off.\n await StartupManager.Instance.Startup();\n\n await SharedService.RefreshData(false);\n }\n break;\n }\n }); \n }\n\n public static get Instance(): SharedService {\n return GetGlobalObjectStore()![SharedService._globalStoreKey] as SharedService;\n }\n\n /**\n * Pre-warms commonly used engines in the background after login.\n * This reduces perceived latency when users navigate to features like\n * Conversations, Dashboards, or Artifacts. Fire-and-forget pattern -\n * errors are logged but don't block the UI.\n */\n private static preWarmEngines(): void {\n // AIEngineBase is the slowest - loads agents, models, prompts, etc.\n // Critical for Conversations feature\n AIEngineBase.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm AIEngineBase: ${err}`)\n );\n\n // ArtifactMetadataEngine is lightweight (just artifact types)\n // Used by Conversations and Artifact viewer\n ArtifactMetadataEngine.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm ArtifactMetadataEngine: ${err}`)\n );\n\n // DashboardEngine loads dashboard metadata\n // Used when viewing dashboards\n DashboardEngine.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm DashboardEngine: ${err}`)\n );\n\n EntityCommunicationsEngineBase.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm DashboardEngine: ${err}`)\n );\n }\n\n /**\n * Get the NavigationService singleton instance\n * Lazy-loaded to avoid circular dependency issues\n */\n private get navigationService(): NavigationService {\n if (!this._navigationService) {\n this._navigationService = this.injector.get(NavigationService);\n }\n return this._navigationService;\n }\n\n /**\n * Get the neutral color used for system-wide resources\n */\n public get ExplorerAppColor(): string {\n return this.navigationService.ExplorerAppColor;\n }\n\n /**\n * Returns the current session ID, which is automatically created when the service is instantiated.\n */\n public get SessionId(): string {\n return (<GraphQLDataProvider>Metadata.Provider).sessionId;\n }\n\n public get ResourceTypes(): MJResourceTypeEntity[] {\n return SharedService._resourceTypes;\n }\n public get ViewResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'user views')!;\n }\n public get RecordResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'records')!;\n }\n public get DashboardResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'dashboards')!;\n }\n public get ReportResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'reports')!;\n }\n public get SearchResultsResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'search results')!;\n }\n public get ListResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'lists')!;\n }\n public ResourceTypeByID(id: string): MJResourceTypeEntity | undefined {\n return SharedService._resourceTypes.find(rt => UUIDsEqual(rt.ID, id));\n }\n public ResourceTypeByName(name: string): MJResourceTypeEntity | undefined {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === name.trim().toLowerCase());\n }\n\n /**\n * Refreshes the data for the service. If OnlyIfNeeded is true, then the data is only refreshed if it hasn't been loaded yet.\n */\n public static async RefreshData(OnlyIfNeeded: boolean = false) {\n if (OnlyIfNeeded && SharedService._loaded) {\n return;\n }\n\n const canProceed$ = SharedService.isLoading$.pipe(\n first(isLoading => !isLoading),\n tap(() => SharedService.isLoading$.next(true))\n );\n\n await firstValueFrom(canProceed$);\n\n try {\n // After waiting for the current loading operation to complete, check again\n // if _loaded is true and OnlyIfNeeded is true, return early\n if (OnlyIfNeeded && SharedService._loaded) {\n return;\n }\n\n await SharedService.handleDataLoading();\n\n // Mark as loaded\n SharedService._loaded = true;\n } finally {\n // Ensure we always reset the loading flag\n SharedService.isLoading$.next(false);\n }\n }\n\n private static async handleDataLoading() {\n const md = new Metadata();\n\n // make sure startup is done\n await StartupManager.Instance.Startup(); \n\n this._resourceTypes = ResourcePermissionEngine.Instance.ResourceTypes;\n\n // Note: RefreshUserNotifications() removed here because MJNotificationService\n // already handles it via its own MJEventType.LoggedIn subscription. Calling it\n // from both places caused a duplicate User Notifications GraphQL request on login.\n } \n\n FormatColumnValue(col: ViewColumnInfo, value: any, maxLength: number = 0, trailingChars: string = \"...\") {\n if (value === null || value === undefined)\n return value;\n\n try {\n const retVal = col.EntityField.FormatValue(value, 0);\n if (maxLength > 0 && retVal && retVal.length > maxLength)\n return retVal.substring(0, maxLength) + trailingChars;\n else\n return retVal;\n }\n catch (e) {\n LogError(e);\n return value;\n }\n }\n\n public ConvertMarkdownStringToHtmlList(listType: HtmlListType, text: string): string {\n return ConvertMarkdownStringToHtmlList(listType, text) ?? text;\n }\n\n \n public InvokeManualResize(delay: number = 50) {\n return InvokeManualResize(delay, this);\n }\n\n public PushStatusUpdates(): Observable<string> {\n const gp: GraphQLDataProvider = <GraphQLDataProvider>Metadata.Provider;\n return gp.PushStatusUpdates();\n }\n\n private _currentUserImage: string | Blob = '/assets/user.png';\n public get CurrentUserImage(): string | Blob {\n return this._currentUserImage;\n }\n public set CurrentUserImage(value: string | Blob) {\n this._currentUserImage = value;\n }\n\n /**\n * @deprecated Use MJNotificationService.UserNotifications instead\n */\n public static get UserNotifications(): MJUserNotificationEntity[] {\n return MJNotificationService.UserNotifications;\n }\n /**\n * @deprecated Use MJNotificationService.UnreadUserNotifications instead\n */\n public static get UnreadUserNotifications(): MJUserNotificationEntity[] {\n return MJNotificationService.UnreadUserNotifications;\n }\n /**\n * @deprecated Use MJNotificationService.UnreadUserNotificationCount instead\n */\n public static get UnreadUserNotificationCount(): number {\n return MJNotificationService.UnreadUserNotificationCount;\n }\n\n /**\n * Utility method that returns true if child is a descendant of parent, false otherwise. \n */\n public static IsDescendant(parent: ElementRef, child: ElementRef) {\n if (parent && child && parent.nativeElement && child.nativeElement) {\n let node = child.nativeElement.parentNode;\n while (node != null) {\n if (node == parent.nativeElement) {\n return true;\n }\n node = node.parentNode;\n }\n }\n return false;\n }\n\n\n /**\n * Creates a notification in the database and refreshes the UI. Returns the notification object.\n * @param title \n * @param message \n * @param resourceTypeId \n * @param resourceRecordId \n * @param resourceConfiguration Any object, it is converted to a string by JSON.stringify and stored in the database\n * @returns \n * @deprecated Use MJNotificationService.CreateNotification instead\n */\n public async CreateNotification(title: string, message: string, resourceTypeId: string | null, resourceRecordId: string | null, resourceConfiguration: any | null, displayToUser : boolean = true): Promise<MJUserNotificationEntity> {\n return this.mjNotificationsService.CreateNotification(title, message, resourceTypeId, resourceRecordId, resourceConfiguration, displayToUser);\n }\n\n /**\n * @deprecated Use MJNotificationService.RefreshUserNotifications instead\n */\n public static async RefreshUserNotifications() {\n MJNotificationService.RefreshUserNotifications();\n }\n\n /**\n * Creates a message that is not saved to the User Notifications table, but is displayed to the user.\n * @param message - text to display\n * @param style - display styling\n * @param hideAfter - option to auto hide after the specified delay in milliseconds\n * @deprecated Use MJNotificationService.CreateSimpleNotification instead\n */\n public CreateSimpleNotification(message: string, style: \"none\" | \"success\" | \"error\" | \"warning\" | \"info\" = \"success\", hideAfter?: number) {\n return this.mjNotificationsService.CreateSimpleNotification(message, style, hideAfter);\n }\n\n\n\n private _resourceTypeMap = [\n { routeSegment: 'record', name: 'records' },\n { routeSegment: 'view', name: 'user views' },\n { routeSegment: 'search', name: 'search results' },\n { routeSegment: 'report', name: 'reports' },\n { routeSegment: 'query', name: 'queries' },\n { routeSegment: 'dashboard', name: 'dashboards' },\n { routeSegment: 'list', name: 'lists' },\n \n ]\n /**\n * Maps a Resource Type record Name column to the corresponding route segment\n * @param resourceTypeName \n * @returns \n */\n public mapResourceTypeNameToRouteSegment(resourceTypeName: string) {\n const item = this._resourceTypeMap.find(rt => rt.name.trim().toLowerCase() === resourceTypeName.trim().toLowerCase());\n if (item)\n return item.routeSegment;\n else\n return null \n }\n\n /**\n * Maps a route segment to the corresponding Resource Type record Name column\n * @param resourceRouteSegment \n * @returns \n */\n public mapResourceTypeRouteSegmentToName(resourceRouteSegment: string) {\n const item = this._resourceTypeMap.find(rt => rt.routeSegment.trim().toLowerCase() === resourceRouteSegment.trim().toLowerCase());\n if (item)\n return item.name;\n else\n return null \n }\n\n /**\n * Opens an entity record in a new or existing tab\n * Uses the modern NavigationService for tab-based navigation\n */\n public OpenEntityRecord(entityName: string, recordPkey: CompositeKey) {\n try {\n console.log('SharedService.OpenEntityRecord called:', entityName, recordPkey.ToURLSegment());\n // Use NavigationService to open in new tab-based UX\n this.navigationService.OpenEntityRecord(entityName, recordPkey);\n }\n catch (e) {\n console.error('Error in OpenEntityRecord:', e);\n LogError(e);\n }\n }\n}\n\nexport const HtmlListType = {\n Unordered: 'Unordered',\n Ordered: 'Ordered',\n} as const;\n\nexport type HtmlListType = typeof HtmlListType[keyof typeof HtmlListType];\n\n\nexport const EventCodes = {\n ViewClicked: \"ViewClicked\",\n EntityRecordClicked: \"EntityRecordClicked\",\n AddDashboard: \"AddDashboard\",\n AddReport: \"AddReport\",\n AddQuery: \"AddQuery\",\n ViewCreated: \"ViewCreated\",\n ViewUpdated: \"ViewUpdated\",\n RunSearch: \"RunSearch\",\n ViewNotifications: \"ViewNotifications\",\n PushStatusUpdates: \"PushStatusUpdates\",\n UserNotificationsUpdated: \"UserNotificationsUpdated\",\n CloseCurrentTab: \"CloseCurrentTab\",\n ListCreated: \"ListCreated\",\n ListClicked: 'ListClicked',\n AvatarUpdated: 'AvatarUpdated'\n} as const;\n\nexport type EventCodes = typeof EventCodes[keyof typeof EventCodes];"]}
1
+ {"version":3,"file":"shared.service.js","sourceRoot":"","sources":["../../src/lib/shared.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAY,MAAM,eAAe,CAAC;AACjE,OAAO,EAAmC,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3G,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,wBAAwB,EAAkE,MAAM,+BAA+B,CAAC;AAClL,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,+BAA+B,EAAE,kBAAkB,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEtJ,OAAO,EAAE,OAAO,EAAc,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,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EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;CACtB,CAAC","sourcesContent":["import { ElementRef, Injectable, Injector } from '@angular/core';\nimport { CompositeKey, LocalCacheManager, LogError, Metadata, StartupManager } from '@memberjunction/core';\nimport { ArtifactMetadataEngine, DashboardEngine, ResourcePermissionEngine, MJResourceTypeEntity, MJUserNotificationEntity, ViewColumnInfo } from '@memberjunction/core-entities';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { EntityCommunicationsEngineBase } from \"@memberjunction/entity-communications-base\";\nimport { MJEventType, MJGlobal, ConvertMarkdownStringToHtmlList, InvokeManualResize, UUIDsEqual, GetGlobalObjectStore } from '@memberjunction/global';\nimport { GraphQLDataProvider } from '@memberjunction/graphql-dataprovider';\nimport { Subject, Observable, BehaviorSubject, firstValueFrom } from 'rxjs';\nimport { first, tap } from 'rxjs/operators';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { NavigationService } from './navigation.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SharedService {\n private static readonly _globalStoreKey = '___SINGLETON__SharedService';\n private static _loaded: boolean = false;\n private static _resourceTypes: MJResourceTypeEntity[] = [];\n private static isLoading$ = new BehaviorSubject<boolean>(false);\n private tabChange = new Subject();\n tabChange$ = this.tabChange.asObservable();\n private _navigationService: NavigationService | null = null;\n\n constructor(\n private mjNotificationsService: MJNotificationService,\n private injector: Injector\n ) {\n const g = GetGlobalObjectStore()!;\n if (g[SharedService._globalStoreKey]) {\n return g[SharedService._globalStoreKey] as SharedService;\n }\n g[SharedService._globalStoreKey] = this;\n\n MJGlobal.Instance.GetEventListener(true).subscribe(async (event) => {\n switch (event.event) {\n case MJEventType.LoggedIn:\n if (SharedService._loaded === false) {\n // Pre-warm non-critical engines IMMEDIATELY on LoggedIn, before\n // StartupManager.Startup() completes. These engines only need\n // Metadata.Provider (set during setupGraphQLClient's provider.Config()).\n // Firing them here allows their RunViews calls to be coalesced with\n // the startup engines' calls into fewer mega-batched GraphQL requests.\n SharedService.preWarmEngines();\n\n // Handle app startup — joins the same Startup() promise that\n // setupGraphQLClient kicked off.\n await StartupManager.Instance.Startup();\n\n await SharedService.RefreshData(false);\n }\n break;\n }\n }); \n }\n\n public static get Instance(): SharedService {\n return GetGlobalObjectStore()![SharedService._globalStoreKey] as SharedService;\n }\n\n /**\n * Pre-warms commonly used engines in the background after login.\n * This reduces perceived latency when users navigate to features like\n * Conversations, Dashboards, or Artifacts. Fire-and-forget pattern -\n * errors are logged but don't block the UI.\n */\n private static preWarmEngines(): void {\n // AIEngineBase is the slowest - loads agents, models, prompts, etc.\n // Critical for Conversations feature\n AIEngineBase.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm AIEngineBase: ${err}`)\n );\n\n // ArtifactMetadataEngine is lightweight (just artifact types)\n // Used by Conversations and Artifact viewer\n ArtifactMetadataEngine.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm ArtifactMetadataEngine: ${err}`)\n );\n\n // DashboardEngine loads dashboard metadata\n // Used when viewing dashboards\n DashboardEngine.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm DashboardEngine: ${err}`)\n );\n\n EntityCommunicationsEngineBase.Instance.Config(false).catch(err =>\n LogError(`Failed to pre-warm DashboardEngine: ${err}`)\n );\n }\n\n /**\n * Get the NavigationService singleton instance\n * Lazy-loaded to avoid circular dependency issues\n */\n private get navigationService(): NavigationService {\n if (!this._navigationService) {\n this._navigationService = this.injector.get(NavigationService);\n }\n return this._navigationService;\n }\n\n /**\n * Get the neutral color used for system-wide resources\n */\n public get ExplorerAppColor(): string {\n return this.navigationService.ExplorerAppColor;\n }\n\n /**\n * Returns the current session ID, which is automatically created when the service is instantiated.\n */\n public get SessionId(): string {\n return (<GraphQLDataProvider>Metadata.Provider).sessionId;\n }\n\n public get ResourceTypes(): MJResourceTypeEntity[] {\n return SharedService._resourceTypes;\n }\n public get ViewResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'user views')!;\n }\n public get RecordResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'records')!;\n }\n public get DashboardResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'dashboards')!;\n }\n public get ReportResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'reports')!;\n }\n public get SearchResultsResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'search results')!;\n }\n public get ListResourceType(): MJResourceTypeEntity {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === 'lists')!;\n }\n public ResourceTypeByID(id: string): MJResourceTypeEntity | undefined {\n return SharedService._resourceTypes.find(rt => UUIDsEqual(rt.ID, id));\n }\n public ResourceTypeByName(name: string): MJResourceTypeEntity | undefined {\n return SharedService._resourceTypes.find(rt => rt.Name.trim().toLowerCase() === name.trim().toLowerCase());\n }\n\n /**\n * Refreshes the data for the service. If OnlyIfNeeded is true, then the data is only refreshed if it hasn't been loaded yet.\n */\n public static async RefreshData(OnlyIfNeeded: boolean = false) {\n if (OnlyIfNeeded && SharedService._loaded) {\n return;\n }\n\n const canProceed$ = SharedService.isLoading$.pipe(\n first(isLoading => !isLoading),\n tap(() => SharedService.isLoading$.next(true))\n );\n\n await firstValueFrom(canProceed$);\n\n try {\n // After waiting for the current loading operation to complete, check again\n // if _loaded is true and OnlyIfNeeded is true, return early\n if (OnlyIfNeeded && SharedService._loaded) {\n return;\n }\n\n await SharedService.handleDataLoading();\n\n // Mark as loaded\n SharedService._loaded = true;\n } finally {\n // Ensure we always reset the loading flag\n SharedService.isLoading$.next(false);\n }\n }\n\n private static async handleDataLoading() {\n const md = new Metadata();\n\n // make sure startup is done\n await StartupManager.Instance.Startup(); \n\n this._resourceTypes = ResourcePermissionEngine.Instance.ResourceTypes;\n\n // Note: RefreshUserNotifications() removed here because MJNotificationService\n // already handles it via its own MJEventType.LoggedIn subscription. Calling it\n // from both places caused a duplicate User Notifications GraphQL request on login.\n } \n\n FormatColumnValue(col: ViewColumnInfo, value: any, maxLength: number = 0, trailingChars: string = \"...\") {\n if (value === null || value === undefined)\n return value;\n\n try {\n const retVal = col.EntityField.FormatValue(value, 0);\n if (maxLength > 0 && retVal && retVal.length > maxLength)\n return retVal.substring(0, maxLength) + trailingChars;\n else\n return retVal;\n }\n catch (e) {\n LogError(e);\n return value;\n }\n }\n\n public ConvertMarkdownStringToHtmlList(listType: HtmlListType, text: string): string {\n return ConvertMarkdownStringToHtmlList(listType, text) ?? text;\n }\n\n \n public InvokeManualResize(delay: number = 50) {\n return InvokeManualResize(delay, this);\n }\n\n public PushStatusUpdates(): Observable<string> {\n const gp: GraphQLDataProvider = <GraphQLDataProvider>Metadata.Provider;\n return gp.PushStatusUpdates();\n }\n\n private _currentUserImage: string | Blob = '/assets/user.png';\n public get CurrentUserImage(): string | Blob {\n return this._currentUserImage;\n }\n public set CurrentUserImage(value: string | Blob) {\n this._currentUserImage = value;\n }\n\n /**\n * @deprecated Use MJNotificationService.UserNotifications instead\n */\n public static get UserNotifications(): MJUserNotificationEntity[] {\n return MJNotificationService.UserNotifications;\n }\n /**\n * @deprecated Use MJNotificationService.UnreadUserNotifications instead\n */\n public static get UnreadUserNotifications(): MJUserNotificationEntity[] {\n return MJNotificationService.UnreadUserNotifications;\n }\n /**\n * @deprecated Use MJNotificationService.UnreadUserNotificationCount instead\n */\n public static get UnreadUserNotificationCount(): number {\n return MJNotificationService.UnreadUserNotificationCount;\n }\n\n /**\n * Utility method that returns true if child is a descendant of parent, false otherwise. \n */\n public static IsDescendant(parent: ElementRef, child: ElementRef) {\n if (parent && child && parent.nativeElement && child.nativeElement) {\n let node = child.nativeElement.parentNode;\n while (node != null) {\n if (node == parent.nativeElement) {\n return true;\n }\n node = node.parentNode;\n }\n }\n return false;\n }\n\n\n /**\n * Creates a notification in the database and refreshes the UI. Returns the notification object.\n * @param title \n * @param message \n * @param resourceTypeId \n * @param resourceRecordId \n * @param resourceConfiguration Any object, it is converted to a string by JSON.stringify and stored in the database\n * @returns \n * @deprecated Use MJNotificationService.CreateNotification instead\n */\n public async CreateNotification(title: string, message: string, resourceTypeId: string | null, resourceRecordId: string | null, resourceConfiguration: any | null, displayToUser : boolean = true): Promise<MJUserNotificationEntity> {\n return this.mjNotificationsService.CreateNotification(title, message, resourceTypeId, resourceRecordId, resourceConfiguration, displayToUser);\n }\n\n /**\n * @deprecated Use MJNotificationService.RefreshUserNotifications instead\n */\n public static async RefreshUserNotifications() {\n MJNotificationService.RefreshUserNotifications();\n }\n\n /**\n * Creates a message that is not saved to the User Notifications table, but is displayed to the user.\n * @param message - text to display\n * @param style - display styling\n * @param hideAfter - option to auto hide after the specified delay in milliseconds\n * @deprecated Use MJNotificationService.CreateSimpleNotification instead\n */\n public CreateSimpleNotification(message: string, style: \"none\" | \"success\" | \"error\" | \"warning\" | \"info\" = \"success\", hideAfter?: number) {\n return this.mjNotificationsService.CreateSimpleNotification(message, style, hideAfter);\n }\n\n\n\n private _resourceTypeMap = [\n { routeSegment: 'record', name: 'records' },\n { routeSegment: 'view', name: 'user views' },\n { routeSegment: 'search', name: 'search results' },\n { routeSegment: 'report', name: 'reports' },\n { routeSegment: 'query', name: 'queries' },\n { routeSegment: 'dashboard', name: 'dashboards' },\n { routeSegment: 'list', name: 'lists' },\n \n ]\n /**\n * Maps a Resource Type record Name column to the corresponding route segment\n * @param resourceTypeName \n * @returns \n */\n public mapResourceTypeNameToRouteSegment(resourceTypeName: string) {\n const item = this._resourceTypeMap.find(rt => rt.name.trim().toLowerCase() === resourceTypeName.trim().toLowerCase());\n if (item)\n return item.routeSegment;\n else\n return null \n }\n\n /**\n * Maps a route segment to the corresponding Resource Type record Name column\n * @param resourceRouteSegment \n * @returns \n */\n public mapResourceTypeRouteSegmentToName(resourceRouteSegment: string) {\n const item = this._resourceTypeMap.find(rt => rt.routeSegment.trim().toLowerCase() === resourceRouteSegment.trim().toLowerCase());\n if (item)\n return item.name;\n else\n return null \n }\n\n /**\n * Opens an entity record in a new or existing tab\n * Uses the modern NavigationService for tab-based navigation\n */\n public OpenEntityRecord(entityName: string, recordPkey: CompositeKey) {\n try {\n console.log('SharedService.OpenEntityRecord called:', entityName, recordPkey.ToURLSegment());\n // Use NavigationService to open in new tab-based UX\n this.navigationService.OpenEntityRecord(entityName, recordPkey);\n }\n catch (e) {\n console.error('Error in OpenEntityRecord:', e);\n LogError(e);\n }\n }\n}\n\nexport const HtmlListType = {\n Unordered: 'Unordered',\n Ordered: 'Ordered',\n} as const;\n\nexport type HtmlListType = typeof HtmlListType[keyof typeof HtmlListType];\n\n\nexport const EventCodes = {\n ViewClicked: \"ViewClicked\",\n EntityRecordClicked: \"EntityRecordClicked\",\n AddDashboard: \"AddDashboard\",\n AddReport: \"AddReport\",\n AddQuery: \"AddQuery\",\n ViewCreated: \"ViewCreated\",\n ViewUpdated: \"ViewUpdated\",\n RunSearch: \"RunSearch\",\n ViewNotifications: \"ViewNotifications\",\n PushStatusUpdates: \"PushStatusUpdates\",\n UserNotificationsUpdated: \"UserNotificationsUpdated\",\n CloseCurrentTab: \"CloseCurrentTab\",\n ListCreated: \"ListCreated\",\n ListClicked: 'ListClicked',\n AvatarUpdated: 'AvatarUpdated'\n} as const;\n\nexport type EventCodes = typeof EventCodes[keyof typeof EventCodes];"]}
package/dist/module.d.ts CHANGED
@@ -1,11 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./lib/urlPipe";
3
3
  import * as i2 from "./lib/simpleTextFormat";
4
- import * as i3 from "@progress/kendo-angular-notification";
5
- import * as i4 from "@memberjunction/ng-notifications";
4
+ import * as i3 from "@memberjunction/ng-notifications";
6
5
  export declare class MemberJunctionSharedModule {
7
6
  static ɵfac: i0.ɵɵFactoryDeclaration<MemberJunctionSharedModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<MemberJunctionSharedModule, [typeof i1.URLPipe, typeof i2.SimpleTextFormatPipe], [typeof i3.NotificationModule, typeof i4.MJNotificationsModule], [typeof i1.URLPipe, typeof i2.SimpleTextFormatPipe]>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MemberJunctionSharedModule, [typeof i1.URLPipe, typeof i2.SimpleTextFormatPipe], [typeof i3.MJNotificationsModule], [typeof i1.URLPipe, typeof i2.SimpleTextFormatPipe]>;
9
8
  static ɵinj: i0.ɵɵInjectorDeclaration<MemberJunctionSharedModule>;
10
9
  }
11
10
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;;AAKA,qBAca,0BAA0B;yCAA1B,0BAA0B;0CAA1B,0BAA0B;0CAA1B,0BAA0B;CAAI"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":";;;;AAIA,qBAaa,0BAA0B;yCAA1B,0BAA0B;0CAA1B,0BAA0B;0CAA1B,0BAA0B;CAAI"}
package/dist/module.js CHANGED
@@ -1,14 +1,12 @@
1
1
  import { NgModule } from '@angular/core';
2
2
  import { URLPipe } from './lib/urlPipe';
3
- import { NotificationModule } from '@progress/kendo-angular-notification';
4
3
  import { SimpleTextFormatPipe } from './lib/simpleTextFormat';
5
4
  import { MJNotificationsModule } from '@memberjunction/ng-notifications';
6
5
  import * as i0 from "@angular/core";
7
6
  export class MemberJunctionSharedModule {
8
7
  static ɵfac = function MemberJunctionSharedModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MemberJunctionSharedModule)(); };
9
8
  static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: MemberJunctionSharedModule });
10
- static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [NotificationModule,
11
- MJNotificationsModule] });
9
+ static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [MJNotificationsModule] });
12
10
  }
13
11
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MemberJunctionSharedModule, [{
14
12
  type: NgModule,
@@ -18,7 +16,6 @@ export class MemberJunctionSharedModule {
18
16
  SimpleTextFormatPipe
19
17
  ],
20
18
  imports: [
21
- NotificationModule,
22
19
  MJNotificationsModule
23
20
  ],
24
21
  exports: [
@@ -28,7 +25,6 @@ export class MemberJunctionSharedModule {
28
25
  }]
29
26
  }], null, null); })();
30
27
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(MemberJunctionSharedModule, { declarations: [URLPipe,
31
- SimpleTextFormatPipe], imports: [NotificationModule,
32
- MJNotificationsModule], exports: [URLPipe,
28
+ SimpleTextFormatPipe], imports: [MJNotificationsModule], exports: [URLPipe,
33
29
  SimpleTextFormatPipe] }); })();
34
30
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;AAezE,MAAM,OAAO,0BAA0B;oHAA1B,0BAA0B;4DAA1B,0BAA0B;gEARnC,kBAAkB;YAClB,qBAAqB;;iFAOZ,0BAA0B;cAdtC,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,OAAO;oBACP,oBAAoB;iBACrB;gBACD,OAAO,EAAE;oBACP,kBAAkB;oBAClB,qBAAqB;iBACtB;gBACD,OAAO,EAAE;oBACP,OAAO;oBACP,oBAAoB;iBACrB;aACF;;wFACY,0BAA0B,mBAZnC,OAAO;QACP,oBAAoB,aAGpB,kBAAkB;QAClB,qBAAqB,aAGrB,OAAO;QACP,oBAAoB","sourcesContent":["import { NgModule } from '@angular/core';\nimport { URLPipe } from './lib/urlPipe';\nimport { NotificationModule } from '@progress/kendo-angular-notification';\nimport { SimpleTextFormatPipe } from './lib/simpleTextFormat';\nimport { MJNotificationsModule } from '@memberjunction/ng-notifications';\n@NgModule({\n declarations: [ \n URLPipe,\n SimpleTextFormatPipe\n ],\n imports: [\n NotificationModule,\n MJNotificationsModule\n ],\n exports: [\n URLPipe,\n SimpleTextFormatPipe\n ]\n})\nexport class MemberJunctionSharedModule { }"]}
1
+ {"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;AAczE,MAAM,OAAO,0BAA0B;oHAA1B,0BAA0B;4DAA1B,0BAA0B;gEAPnC,qBAAqB;;iFAOZ,0BAA0B;cAbtC,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,OAAO;oBACP,oBAAoB;iBACrB;gBACD,OAAO,EAAE;oBACP,qBAAqB;iBACtB;gBACD,OAAO,EAAE;oBACP,OAAO;oBACP,oBAAoB;iBACrB;aACF;;wFACY,0BAA0B,mBAXnC,OAAO;QACP,oBAAoB,aAGpB,qBAAqB,aAGrB,OAAO;QACP,oBAAoB","sourcesContent":["import { NgModule } from '@angular/core';\nimport { URLPipe } from './lib/urlPipe';\nimport { SimpleTextFormatPipe } from './lib/simpleTextFormat';\nimport { MJNotificationsModule } from '@memberjunction/ng-notifications';\n@NgModule({\n declarations: [\n URLPipe,\n SimpleTextFormatPipe\n ],\n imports: [\n MJNotificationsModule\n ],\n exports: [\n URLPipe,\n SimpleTextFormatPipe\n ]\n})\nexport class MemberJunctionSharedModule { }"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-shared",
3
- "version": "5.22.0",
3
+ "version": "5.24.0",
4
4
  "description": "MemberJunction: MJ Explorer Angular Shared Package - utility functions and other reusable elements used across other MJ Angular packages within the MJ Explorer App - do not use outside of MJ Explorer.",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -29,17 +29,16 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@angular/platform-browser": "21.1.3",
32
- "@memberjunction/ai-engine-base": "5.22.0",
33
- "@memberjunction/core": "5.22.0",
34
- "@memberjunction/core-entities": "5.22.0",
35
- "@memberjunction/global": "5.22.0",
36
- "@memberjunction/graphql-dataprovider": "5.22.0",
37
- "@memberjunction/entity-communications-base": "5.22.0",
38
- "@memberjunction/ng-base-application": "5.22.0",
39
- "@memberjunction/ng-base-types": "5.22.0",
40
- "@memberjunction/ng-notifications": "5.22.0",
41
- "@memberjunction/ng-shared-generic": "5.22.0",
42
- "@progress/kendo-angular-notification": "22.0.1",
32
+ "@memberjunction/ai-engine-base": "5.24.0",
33
+ "@memberjunction/core": "5.24.0",
34
+ "@memberjunction/core-entities": "5.24.0",
35
+ "@memberjunction/entity-communications-base": "5.24.0",
36
+ "@memberjunction/global": "5.24.0",
37
+ "@memberjunction/graphql-dataprovider": "5.24.0",
38
+ "@memberjunction/ng-base-application": "5.24.0",
39
+ "@memberjunction/ng-base-types": "5.24.0",
40
+ "@memberjunction/ng-notifications": "5.24.0",
41
+ "@memberjunction/ng-shared-generic": "5.24.0",
43
42
  "html-to-image": "^1.11.11",
44
43
  "tslib": "^2.8.1"
45
44
  },