@memberjunction/ng-dashboards 5.46.0 → 5.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +15 -4
  2. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
  3. package/dist/DataExplorer/data-explorer-dashboard.component.js +45 -35
  4. package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
  5. package/dist/DataExplorer/models/explorer-state.interface.d.ts +7 -0
  6. package/dist/DataExplorer/models/explorer-state.interface.d.ts.map +1 -1
  7. package/dist/DataExplorer/models/explorer-state.interface.js.map +1 -1
  8. package/dist/Lists/components/lists-browse-resource.component.d.ts +4 -0
  9. package/dist/Lists/components/lists-browse-resource.component.d.ts.map +1 -1
  10. package/dist/Lists/components/lists-browse-resource.component.js +39 -30
  11. package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
  12. package/dist/Lists/components/lists-my-lists-resource.component.d.ts.map +1 -1
  13. package/dist/Lists/components/lists-my-lists-resource.component.js +14 -12
  14. package/dist/Lists/components/lists-my-lists-resource.component.js.map +1 -1
  15. package/dist/Lists/components/lists-operations-resource.component.d.ts.map +1 -1
  16. package/dist/Lists/components/lists-operations-resource.component.js +6 -1
  17. package/dist/Lists/components/lists-operations-resource.component.js.map +1 -1
  18. package/dist/Lists/services/list-set-operations.service.d.ts +11 -0
  19. package/dist/Lists/services/list-set-operations.service.d.ts.map +1 -1
  20. package/dist/Lists/services/list-set-operations.service.js +27 -2
  21. package/dist/Lists/services/list-set-operations.service.js.map +1 -1
  22. package/dist/PredictiveStudio/at-risk.view-models.d.ts +33 -0
  23. package/dist/PredictiveStudio/at-risk.view-models.d.ts.map +1 -1
  24. package/dist/PredictiveStudio/at-risk.view-models.js +69 -2
  25. package/dist/PredictiveStudio/at-risk.view-models.js.map +1 -1
  26. package/dist/PredictiveStudio/components/ps-catalog.component.js +2 -2
  27. package/dist/PredictiveStudio/components/ps-catalog.component.js.map +1 -1
  28. package/dist/PredictiveStudio/components/ps-compare.component.js +2 -2
  29. package/dist/PredictiveStudio/components/ps-compare.component.js.map +1 -1
  30. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js +2 -2
  31. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js.map +1 -1
  32. package/dist/PredictiveStudio/components/ps-experiments.component.js +2 -2
  33. package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
  34. package/dist/PredictiveStudio/components/ps-home.component.js +2 -2
  35. package/dist/PredictiveStudio/components/ps-home.component.js.map +1 -1
  36. package/dist/PredictiveStudio/components/ps-operate-dialog.component.js +2 -2
  37. package/dist/PredictiveStudio/components/ps-operate-dialog.component.js.map +1 -1
  38. package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts.map +1 -1
  39. package/dist/PredictiveStudio/components/ps-pipelines.component.js +306 -297
  40. package/dist/PredictiveStudio/components/ps-pipelines.component.js.map +1 -1
  41. package/dist/PredictiveStudio/components/ps-production.component.js +2 -2
  42. package/dist/PredictiveStudio/components/ps-production.component.js.map +1 -1
  43. package/dist/PredictiveStudio/components/ps-registry.component.d.ts +1 -1
  44. package/dist/PredictiveStudio/components/ps-registry.component.d.ts.map +1 -1
  45. package/dist/PredictiveStudio/components/ps-registry.component.js +15 -9
  46. package/dist/PredictiveStudio/components/ps-registry.component.js.map +1 -1
  47. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts +115 -0
  48. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts.map +1 -0
  49. package/dist/PredictiveStudio/predictive-studio-agent-context.js +119 -0
  50. package/dist/PredictiveStudio/predictive-studio-agent-context.js.map +1 -0
  51. package/dist/PredictiveStudio/predictive-studio-copilot.view-models.d.ts +36 -0
  52. package/dist/PredictiveStudio/predictive-studio-copilot.view-models.d.ts.map +1 -0
  53. package/dist/PredictiveStudio/predictive-studio-copilot.view-models.js +52 -0
  54. package/dist/PredictiveStudio/predictive-studio-copilot.view-models.js.map +1 -0
  55. package/dist/PredictiveStudio/resources/ps-models-resource.component.d.ts +9 -1
  56. package/dist/PredictiveStudio/resources/ps-models-resource.component.d.ts.map +1 -1
  57. package/dist/PredictiveStudio/resources/ps-models-resource.component.js +133 -56
  58. package/dist/PredictiveStudio/resources/ps-models-resource.component.js.map +1 -1
  59. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts +50 -1
  60. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
  61. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +591 -165
  62. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
  63. package/dist/PredictiveStudio/resources/ps-resource-base.d.ts +17 -0
  64. package/dist/PredictiveStudio/resources/ps-resource-base.d.ts.map +1 -1
  65. package/dist/PredictiveStudio/resources/ps-resource-base.js +27 -1
  66. package/dist/PredictiveStudio/resources/ps-resource-base.js.map +1 -1
  67. package/dist/PredictiveStudio/resources/ps-studio-resource.component.d.ts +11 -1
  68. package/dist/PredictiveStudio/resources/ps-studio-resource.component.d.ts.map +1 -1
  69. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js +199 -99
  70. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js.map +1 -1
  71. package/package.json +59 -59
@@ -1 +1 @@
1
- {"version":3,"file":"data-explorer-dashboard.component.js","sourceRoot":"","sources":["../../src/DataExplorer/data-explorer-dashboard.component.ts","../../src/DataExplorer/data-explorer-dashboard.component.html"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAuD,KAAK,EAAE,MAAM,EAAE,YAAY,EAA4B,YAAY,EAAc,SAAS,EAAU,MAAM,eAAe,CAAC;AAEnM,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,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;wBACrD,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;qBAC7E,CAAC;oBACF,UAAU,CAAC,QAAQ,EAAE;wBACnB,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;qBAChF,CAAC;iBACH,CAAC;aACH;;AAGU,8BAA8B;IAD1C,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC;GAChC,8BAA8B,CAoiF1C;;iFApiFY,8BAA8B;cAlB1C,SAAS;6BACI,KAAK,YACP,4BAA4B,cAG1B;oBACV,OAAO,CAAC,aAAa,EAAE;wBACrB,UAAU,CAAC,QAAQ,EAAE;4BACnB,KAAK,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;4BACrD,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;yBAC7E,CAAC;wBACF,UAAU,CAAC,QAAQ,EAAE;4BACnB,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;yBAChF,CAAC;qBACH,CAAC;iBACH;;kBAQA,SAAS;mBAAC,aAAa;;kBAGvB,SAAS;mBAAC,sBAAsB;;kBAMhC,KAAK;;kBAML,KAAK;;kBAML,KAAK;;kBAML,KAAK;;kBAOL,KAAK;;kBAKL,MAAM;;kBAoxCN,YAAY;mBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;;kFAh0CjC,8BAA8B","sourcesContent":["import { Component, OnInit, OnDestroy, AfterViewInit, ChangeDetectorRef, Input, Output, EventEmitter, OnChanges, SimpleChanges, HostListener, ElementRef, ViewChild, NgZone } from '@angular/core';\n\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { Subject } from 'rxjs';\nimport { takeUntil, debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { BaseDashboard, NavigationService } from '@memberjunction/ng-shared';\nimport { RecentAccessService } from '@memberjunction/ng-shared-generic';\nimport { RegisterClass , UUIDsEqual } from '@memberjunction/global';\nimport { EntityInfo, RunView, EntityFieldTSType, ApplicationInfo } from '@memberjunction/core';\n// CompositeKey is used via buildCompositeKey from ng-entity-viewer\nimport { MJApplicationEntityEntity, ResourceData, UserInfoEngine } from '@memberjunction/core-entities';\nimport {\n RecordSelectedEvent,\n RecordOpenedEvent,\n DataLoadedEvent,\n FilteredCountChangedEvent,\n EntityViewerConfig,\n NavigateToRelatedEvent,\n ViewWorkspaceComponent,\n ViewRelatedRecordNavigation,\n buildCompositeKey,\n buildPkString\n} from '@memberjunction/ng-entity-viewer';\nimport { MJUserViewEntityExtended, UserViewEngine } from '@memberjunction/core-entities';\nimport { ExplorerStateService } from './services/explorer-state.service';\nimport { DataExplorerState, DataExplorerFilter, BreadcrumbItem, DataExplorerDeepLink, RecentRecordAccess, FavoriteRecord, AppEntityGroup, DataExplorerViewMode } from './models/explorer-state.interface';\nimport { OpenRecordEvent, SelectRecordEvent } from './components/navigation-panel/navigation-panel.component';\nimport { DisplaySimpleNotificationRequestData, MJEventType, MJGlobal } from '@memberjunction/global';\nimport { buildDataExplorerAgentContext, isValidViewMode, isValidEntityBrowserMode, AppGroupSummary, entityDisplayName, resolveEntityByName, resolveRecordSelection, RecordSelectionRequest } from './data-explorer-agent-context';\nimport { validateStringParam, validateEnumParam, validateNonNegativeNumberParam, VALID_ENTITY_BROWSER_MODES_FOR_VALIDATION } from '../shared/agent-tool-validation';\n\n/**\n * Default server-side page size used by the inner entity viewer when {@link viewerConfig}\n * doesn't override `pageSize`. Mirrors the viewer's own default (EntityViewerComponent),\n * and is used to derive the agent-reported total page count.\n */\nconst DATA_EXPLORER_DEFAULT_PAGE_SIZE = 100;\n\n/**\n * Data Explorer Dashboard - Power user interface for exploring data across entities\n * Combines card-based browsing with grid views and relationship visualization\n *\n * Uses mj-entity-viewer composite component for the main content area,\n * which handles data loading, filtering, and view mode switching.\n */\n@Component({\n standalone: false,\n selector: 'mj-data-explorer-dashboard',\n templateUrl: './data-explorer-dashboard.component.html',\n styleUrls: ['./data-explorer-dashboard.component.css'],\n animations: [\n trigger('slideInLeft', [\n transition(':enter', [\n style({ transform: 'translateX(-100%)', opacity: 0 }),\n animate('200ms ease-out', style({ transform: 'translateX(0)', opacity: 1 }))\n ]),\n transition(':leave', [\n animate('200ms ease-in', style({ transform: 'translateX(-100%)', opacity: 0 }))\n ])\n ])\n ]\n})\n@RegisterClass(BaseDashboard, 'DataExplorer')\nexport class DataExplorerDashboardComponent extends BaseDashboard implements OnInit, OnDestroy, OnChanges, AfterViewInit {\n protected override destroy$ = new Subject<void>();\n private metadata = this.ProviderToUse;\n\n /** Reference to the filter input for keyboard shortcuts */\n @ViewChild('filterInput') filterInputRef: ElementRef<HTMLInputElement> | undefined;\n\n /** Reference to the view workspace (owns view CRUD + the inner data renderer) */\n @ViewChild(ViewWorkspaceComponent) viewWorkspaceRef: ViewWorkspaceComponent | undefined;\n\n /**\n * Optional filter to constrain which entities are shown in the explorer.\n * Can filter by applicationId, schemaNames, or explicit entityNames.\n */\n @Input() entityFilter: DataExplorerFilter | null = null;\n\n /**\n * Optional deep link to navigate to a specific entity/record on load.\n * Parsed from URL query parameters (e.g., ?entity=Users&record=123)\n */\n @Input() deepLink: DataExplorerDeepLink | null = null;\n\n /**\n * Optional context name to display in the header instead of \"Data Explorer\".\n * Use this to customize the explorer for specific applications (e.g., \"CRM\", \"Association Demo\").\n */\n @Input() contextName: string | null = null;\n\n /**\n * Optional context icon (Font Awesome class) to display in the header.\n * Use this alongside contextName for a fully customized header (e.g., \"fa-solid fa-users\" for CRM).\n */\n @Input() contextIcon: string | null = null;\n\n /**\n * Initial query params forwarded from the resource wrapper.\n * On hard refresh, the shell delivers params to the wrapper (which has Data.Configuration.queryParams),\n * not to this inner dashboard component. This input bridges that gap.\n */\n @Input() initialQueryParams: Record<string, string> = {};\n\n /**\n * Emitted when the display title should change (entity selected, record opened, etc.)\n */\n @Output() DisplayNameChanged = new EventEmitter<string>();\n\n // State\n public state: DataExplorerState;\n\n // Entity data - all entities available to the user\n private allEntities: EntityInfo[] = [];\n // Filtered entities based on entityFilter\n public entities: EntityInfo[] = [];\n // Application entity groups for the home view (Concept D)\n public appEntityGroups: AppEntityGroup[] = [];\n // Entity IDs for the current application (loaded when applicationId filter is set)\n private applicationEntityIds: Set<string> = new Set();\n public selectedEntity: EntityInfo | null = null;\n\n // Record counts (updated by mj-entity-viewer)\n public totalRecordCount = 0;\n public filteredRecordCount = 0;\n\n // Selected record for detail panel\n public selectedRecord: Record<string, unknown> | null = null;\n // Entity info for the detail panel (may differ from selectedEntity when viewing FK/related records)\n public detailPanelEntity: EntityInfo | null = null;\n // Currently loaded records from mj-entity-viewer (for back/forward navigation lookup)\n private loadedRecords: Record<string, unknown>[] = [];\n\n // Currently selected view entity (for view data loading)\n public selectedViewEntity: MJUserViewEntityExtended | null = null;\n\n // Live filter text (what the user sees in the input, updates immediately)\n public liveFilterText: string = '';\n // Debounced filter text (synced with mj-entity-viewer, updates after delay)\n public debouncedFilterText: string = '';\n private filterInput$ = new Subject<string>();\n\n // Entity filter text for home screen\n public entityFilterText: string = '';\n\n // Breadcrumbs for navigation display\n public breadcrumbs: BreadcrumbItem[] = [];\n\n // Loading state for entities\n public isLoadingEntities: boolean = true;\n\n // Recent records from User Record Logs\n public recentRecords: RecentRecordAccess[] = [];\n\n // Favorite records from User Favorites (non-entity favorites)\n public favoriteRecords: FavoriteRecord[] = [];\n\n // Loading state for home screen sections\n public isLoadingRecentRecords: boolean = true;\n\n // Entity filter for recent records (null = show all, string = filter by entityId)\n public recentRecordsEntityFilter: string | null = null;\n\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n return \"Data Explorer\"\n }\n\n // ========================================\n // Concept D: Application Groups + Search-First\n // ========================================\n\n /**\n * Get app entity groups filtered by current entityFilterText and homeViewMode.\n * When searching, auto-expands groups that contain matches.\n */\n get filteredAppEntityGroups(): AppEntityGroup[] {\n const filterText = this.entityFilterText.toLowerCase().trim();\n const showFavoritesOnly = this.state.homeViewMode === 'favorites';\n\n return this.appEntityGroups\n .map(group => this.filterGroupEntities(group, filterText, showFavoritesOnly))\n .filter(group => group.entities.length > 0);\n }\n\n /**\n * Filter a single group's entities by text and favorites mode.\n * Returns a new group with filtered entities and auto-expansion when searching.\n */\n private filterGroupEntities(\n group: AppEntityGroup,\n filterText: string,\n showFavoritesOnly: boolean\n ): AppEntityGroup {\n let filtered = group.entities;\n\n if (showFavoritesOnly) {\n filtered = filtered.filter(e => this.isEntityFavorited(e));\n }\n\n if (filterText) {\n filtered = filtered.filter(e =>\n e.Name.toLowerCase().includes(filterText) ||\n e.DisplayNameOrName.toLowerCase().includes(filterText) ||\n (e.Description && e.Description.toLowerCase().includes(filterText))\n );\n }\n\n return {\n ...group,\n entities: filtered,\n isExpanded: filterText ? true : group.isExpanded\n };\n }\n\n /**\n * Get a flat filtered entity list for single-application mode.\n * Used when entityFilter.applicationId is set, bypassing app grouping.\n */\n get flatFilteredEntities(): EntityInfo[] {\n let result = this.entities;\n\n if (this.state.homeViewMode === 'favorites') {\n result = result.filter(e => this.isEntityFavorited(e));\n }\n\n const filterText = this.entityFilterText.toLowerCase().trim();\n if (filterText) {\n result = result.filter(e =>\n e.Name.toLowerCase().includes(filterText) ||\n e.DisplayNameOrName.toLowerCase().includes(filterText) ||\n (e.Description && e.Description.toLowerCase().includes(filterText))\n );\n }\n\n return result;\n }\n\n /**\n * Total count of entities matching current filters (across all groups or flat list)\n */\n get filteredEntityCount(): number {\n if (this.entityFilter?.applicationId) {\n return this.flatFilteredEntities.length;\n }\n return this.filteredAppEntityGroups.reduce((sum, g) => sum + g.entities.length, 0);\n }\n\n /** No-results message for the entity list (echoes the filter text). */\n get NoEntityResultsMessage(): string {\n return `No entities match \"${this.entityFilterText}\".`;\n }\n\n /**\n * Count of applications that have at least one visible entity\n */\n get applicationCount(): number {\n return this.appEntityGroups.filter(g => g.entities.length > 0).length;\n }\n\n /**\n * Get recent entities for home screen display (max 5)\n */\n get recentEntities(): EntityInfo[] {\n return this.state.recentEntityAccesses\n .slice(0, 5)\n .map(r => this.entities.find(e => UUIDsEqual(e.ID, r.entityId)))\n .filter((e): e is EntityInfo => e !== undefined);\n }\n\n /**\n * Get favorite entities for home screen display\n */\n get favoriteEntities(): EntityInfo[] {\n return this.state.favoriteEntities\n .map(f => this.entities.find(e => UUIDsEqual(e.ID, f.entityId)))\n .filter((e): e is EntityInfo => e !== undefined);\n }\n\n /**\n * Recent records limited to 3 for the quick access panel\n */\n get quickAccessRecentRecords(): RecentRecordAccess[] {\n return this.recentRecords.slice(0, 3);\n }\n\n /**\n * Recent entities limited to 3 for the quick access panel\n */\n get quickAccessRecentEntities(): EntityInfo[] {\n return this.recentEntities.slice(0, 3);\n }\n\n /**\n * Favorite records limited to 3 for the quick access panel\n */\n get quickAccessFavoriteRecords(): FavoriteRecord[] {\n return this.favoriteRecords.slice(0, 3);\n }\n\n /**\n * Check if a quick access section is expanded\n */\n public isQuickAccessSectionExpanded(sectionId: string): boolean {\n return this.state.quickAccessSections[sectionId] !== false;\n }\n\n /**\n * Get unique entities from recent records for the filter strip.\n * Returns up to 5 entities, sorted by frequency in the recent records.\n */\n get uniqueRecentRecordEntities(): { entityId: string; entityName: string; icon: string; count: number }[] {\n const entityCounts = new Map<string, { entityId: string; entityName: string; count: number }>();\n\n for (const record of this.recentRecords) {\n const existing = entityCounts.get(record.entityId);\n if (existing) {\n existing.count++;\n } else {\n entityCounts.set(record.entityId, {\n entityId: record.entityId,\n entityName: record.entityName,\n count: 1\n });\n }\n }\n\n // Convert to array, sort by count (descending), take first 5\n return Array.from(entityCounts.values())\n .sort((a, b) => b.count - a.count)\n .slice(0, 5)\n .map(e => ({\n ...e,\n icon: this.getEntityIconById(e.entityId)\n }));\n }\n\n /**\n * Check if we should show the entity filter strip for recent records.\n * Only show when there are 2+ unique entities.\n */\n get showRecentRecordsEntityFilter(): boolean {\n return this.uniqueRecentRecordEntities.length >= 2;\n }\n\n /**\n * Get filtered recent records based on entity filter.\n */\n get filteredRecentRecords(): RecentRecordAccess[] {\n if (!this.recentRecordsEntityFilter) {\n return this.recentRecords;\n }\n return this.recentRecords.filter(r => r.entityId === this.recentRecordsEntityFilter);\n }\n\n /**\n * Set the entity filter for recent records\n */\n public setRecentRecordsEntityFilter(entityId: string | null): void {\n this.recentRecordsEntityFilter = entityId;\n }\n\n /**\n * Get the display title for the header.\n * Priority: contextName > entityFilter.applicationName > \"Data Explorer\"\n */\n get displayTitle(): string {\n return this.contextName || this.entityFilter?.applicationName || 'Data Explorer';\n }\n\n /**\n * Get the display icon for the header (when at home level).\n * Returns contextIcon if provided, otherwise null.\n */\n get displayIcon(): string | null {\n return this.contextIcon;\n }\n\n /**\n * Configuration for mj-entity-viewer composite component\n * Hides the built-in header since we have a custom header in the dashboard\n * Uses server-side pagination with 100 records per page (default)\n */\n public viewerConfig: Partial<EntityViewerConfig> = {\n showFilter: false, // We have our own filter in the dashboard header\n showViewModeToggle: true, // Use the viewer's metadata-driven view-type dropdown (no legacy header toggle)\n showRecordCount: false, // We show count in the dashboard header\n showPagination: true, // Show the pagination UI with \"Load More\" button\n serverSideFiltering: true, // Use RunView's UserSearchString for filtering\n serverSideSorting: true, // Use RunView's OrderBy for sorting\n height: '100%'\n };\n\n constructor(\n public stateService: ExplorerStateService,\n private cdr: ChangeDetectorRef,\n private recentAccessService: RecentAccessService,\n private ngZone: NgZone\n ) {\n super();\n this.state = this.stateService.CurrentState;\n }\n\n async ngOnInit(): Promise<void> {\n super.ngOnInit();\n try {\n // Ensure UserInfoEngine is configured before we try to access user settings\n // This prevents race conditions where we try to load default view settings\n // before the user settings have been loaded from the server\n await UserInfoEngine.Instance.Config(false);\n\n // Read initial query params — prefer params forwarded from the resource wrapper\n // (which has Data.Configuration.queryParams from the shell), then fall back to\n // this component's own GetQueryParams() for cases where the dashboard is used standalone.\n const wrapperParams = this.initialQueryParams && Object.keys(this.initialQueryParams).length > 0\n ? this.initialQueryParams\n : null;\n const ownParams = this.GetQueryParams();\n const rawParams = wrapperParams || (Object.keys(ownParams).length > 0 ? ownParams : {});\n\n const urlState = this.buildDeepLinkFromParams(rawParams);\n\n // Set context for state service (enables context-specific settings)\n this.stateService.Provider = this.ProviderToUse;\n await this.stateService.setContext(this.entityFilter);\n this.state = this.stateService.CurrentState;\n\n // User search text starts empty - it's separate from smart filter\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n\n // Load available entities (async to support applicationId filter)\n // Pass urlState so we don't restore persisted entity if URL specifies one\n await this.loadEntities(urlState);\n\n // Apply URL state after entities are loaded\n if (urlState) {\n await this.applyUrlState(urlState);\n } else if (this.deepLink) {\n await this.applyDeepLink(this.deepLink);\n }\n\n // Subscribe to state changes\n this.stateService.State\n .pipe(takeUntil(this.destroy$))\n .subscribe(state => {\n const entityChanged = state.selectedEntityName !== this.state.selectedEntityName;\n\n this.state = state;\n\n // When entity changes, clear user search text and update title\n if (entityChanged) {\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n this.emitDisplayName();\n }\n\n this.onStateChanged();\n\n // Update URL query params to reflect current state (for deep linking)\n this.pushCurrentStateToUrl();\n\n // Keep the AI agent's view of this surface in sync with every state change\n // (entity selection, view mode, filter, record selection, detail panel, etc.).\n this.publishAgentContext();\n\n // Re-scope the agent's client tools to the current mode (entity-browser vs\n // record-view). Cheap: the guard inside only re-registers on the home↔entity flip.\n this.syncAgentToolsForMode();\n\n this.cdr.detectChanges();\n });\n\n // Subscribe to breadcrumb changes\n this.stateService.Breadcrumbs\n .pipe(takeUntil(this.destroy$))\n .subscribe(breadcrumbs => {\n this.breadcrumbs = breadcrumbs;\n this.cdr.detectChanges();\n });\n\n // Setup debounced filter - 500ms delay allows comfortable typing before triggering search\n // IMPORTANT: Do NOT call setSmartFilterPrompt here. Updating the state service triggers\n // URL updates (via pushCurrentStateToUrl → UpdateQueryParams), which in turn can trigger\n // OnQueryParamsChanged, which would clear the filter text. The debouncedFilterText flows\n // directly to the entity-viewer via [filterText] binding — no state service involvement needed.\n this.filterInput$\n .pipe(\n debounceTime(500),\n distinctUntilChanged(),\n takeUntil(this.destroy$)\n )\n .subscribe(filterText => {\n this.debouncedFilterText = filterText;\n this.cdr.detectChanges();\n });\n\n // Subscribe to recent records changes\n this.stateService.RecentRecords\n .pipe(takeUntil(this.destroy$))\n .subscribe(records => {\n this.recentRecords = records;\n this.isLoadingRecentRecords = false;\n this.cdr.detectChanges();\n });\n\n // Subscribe to favorite records changes\n this.stateService.FavoriteRecords\n .pipe(takeUntil(this.destroy$))\n .subscribe(records => {\n this.favoriteRecords = records;\n this.cdr.detectChanges();\n });\n\n // Push initial state to URL (covers deepLink and persisted state)\n this.pushCurrentStateToUrl();\n } catch (err) {\n // Never let a setup failure hang the app loading screen — log it and still signal completion.\n console.error('[DataExplorer] ngOnInit setup failed (signaling load complete anyway):', err);\n } finally {\n // ALWAYS notify load complete — the loading screen waits on this; a thrown/awaited error before\n // it would otherwise hang the screen forever on a direct-URL (deep-link) refresh.\n this.NotifyLoadComplete();\n }\n }\n\n /**\n * After the view initializes, publish the initial agent context and register the\n * mode-scoped client tools the AI agent can invoke against this surface (the initial\n * mode is 'home' until an entity is selected). The ongoing context re-emit and tool\n * re-scoping both happen in the state subscription set up in {@link ngOnInit}.\n */\n ngAfterViewInit(): void {\n this.publishAgentContext();\n this.syncAgentToolsForMode();\n }\n\n // ========================================\n // AI AGENT CONTEXT & CLIENT TOOLS\n // ========================================\n\n /**\n * Publish the current Data Explorer state to the AI agent via NavigationService.\n *\n * When an entity is selected this reports the record-browsing surface\n * (SelectedEntityName, ViewMode, ActiveViewId, FilterText, Total/Filtered record\n * counts, SelectedRecordName, DetailPanelOpen). At the home level it instead reports\n * the entity-browsing surface (HomeViewMode, EntitySearchText, VisibleEntityCount).\n * The shaping lives in the pure {@link buildDataExplorerAgentContext} helper so it\n * stays unit-testable. Called on init and on every state change.\n */\n private publishAgentContext(): void {\n const accessibleViews = this.getAccessibleViewsForSelectedEntity();\n const gridState = this.viewWorkspaceRef?.GetGridState() ?? null;\n const context = buildDataExplorerAgentContext({\n SelectedEntityName: this.selectedEntity?.Name ?? null,\n ViewMode: this.state.viewMode,\n AvailableViewTypes: this.getAvailableViewTypesForSelectedEntity(),\n ActiveViewId: this.state.selectedViewId,\n ActiveViewName: this.resolveActiveViewName(accessibleViews),\n AvailableViewNames: accessibleViews.map(v => v.Name),\n VisibleColumnNames: this.getVisibleColumnNames(),\n FilterText: this.debouncedFilterText,\n TotalRecordCount: this.totalRecordCount,\n FilteredRecordCount: this.filteredRecordCount,\n PageSize: this.getEffectivePageSize(),\n CurrentPage: gridState?.CurrentPage ?? null,\n TotalPages: gridState?.TotalPages ?? null,\n SortColumn: gridState?.Sort?.field ?? null,\n SortDirection: this.normalizeSortDirection(gridState?.Sort?.direction ?? null),\n RelatedEntityNames: this.getRelatedEntityNames(),\n SelectedRecordName: this.state.selectedRecordName,\n DetailPanelOpen: this.state.detailPanelOpen,\n VisibleRecordNames: this.getVisibleRecordNames(),\n LoadedRecordCount: this.loadedRecords.length,\n HomeViewMode: this.state.homeViewMode,\n EntitySearchText: this.entityFilterText,\n VisibleEntityCount: this.filteredEntityCount,\n FavoriteEntityCount: this.state.favoriteEntities.length,\n // Publish the DISPLAY names the user sees on the entity cards (the \"MJ: \" prefix\n // stripped / DisplayName), so the agent passes back what the user actually says.\n AvailableEntityNames: this.entities.map(e => entityDisplayName(e.Name, e.DisplayName)),\n AppGroups: this.getAgentAppGroupSummaries(),\n });\n this.navigationService.SetAgentContext(this, context);\n }\n\n /**\n * Normalize the grid's SortDirection (`'asc' | 'desc' | null`) for the agent context.\n * The viewer can carry a null direction as \"unsorted\"; we only report 'asc'/'desc'.\n */\n private normalizeSortDirection(dir: 'asc' | 'desc' | null): 'asc' | 'desc' | null {\n return dir === 'asc' || dir === 'desc' ? dir : null;\n }\n\n /**\n * Names of the entities related to the selected entity, read straight from in-memory\n * {@link EntityInfo.RelatedEntities} metadata (no lookup). Bounded to a sane number so the\n * streamed context stays small; the context helper bounds it again. Returns [] at the home level.\n */\n private getRelatedEntityNames(): string[] {\n const entity = this.selectedEntity;\n if (!entity) {\n return [];\n }\n const seen = new Set<string>();\n const names: string[] = [];\n for (const r of entity.RelatedEntities) {\n const name = r.RelatedEntity;\n if (name && !seen.has(name)) {\n seen.add(name);\n names.push(name);\n }\n }\n return names;\n }\n\n /**\n * Display values of the records currently loaded in the grid (from {@link loadedRecords}),\n * in grid order, using the same name-field logic the detail panel / state use\n * ({@link getRecordDisplayName}). Drives the agent's VisibleRecordNames context and the\n * SelectRecord tool. Returns [] when no entity is selected or nothing is loaded.\n */\n private getVisibleRecordNames(): string[] {\n if (!this.selectedEntity || this.loadedRecords.length === 0) {\n return [];\n }\n return this.loadedRecords.map(r => this.getRecordDisplayName(r));\n }\n\n /**\n * Resolve an agent-supplied entity reference to one of the available entities, matching\n * the way the user names things (display name with the \"MJ: \" prefix stripped, e.g.\n * \"ML Models\" → \"MJ: ML Models\"). Delegates to the pure {@link resolveEntityByName} helper.\n */\n private resolveEntityByName(input: string): EntityInfo | null {\n return resolveEntityByName(input, this.entities);\n }\n\n /**\n * The record-view modes the CURRENT entity actually supports. Mirrors the gating in\n * {@link reconcileViewModeForEntity}: 'grid' and 'cards' are always available; 'timeline'\n * requires at least one Date field; 'map' requires geocoding support. Returns [] at the\n * home level. Read straight from in-memory {@link EntityInfo} metadata (no lookup).\n */\n private getAvailableViewTypesForSelectedEntity(): DataExplorerViewMode[] {\n const entity = this.selectedEntity;\n if (!entity) {\n return [];\n }\n const modes: DataExplorerViewMode[] = ['grid', 'cards'];\n if (entity.Fields.some(f => f.TSType === EntityFieldTSType.Date)) {\n modes.push('timeline');\n }\n if (entity.SupportsGeoCoding) {\n modes.push('map');\n }\n return modes;\n }\n\n /**\n * The grid's server-side page size. The dashboard forwards {@link viewerConfig} to the inner\n * viewer; when it doesn't set `pageSize` the viewer's default (100) applies. We surface that\n * effective value so the agent can derive total pages from the record counts.\n */\n private getEffectivePageSize(): number {\n return this.viewerConfig.pageSize ?? DATA_EXPLORER_DEFAULT_PAGE_SIZE;\n }\n\n /**\n * Summaries of the application groups currently shown on the home-screen entity browser\n * (name, visible-entity count, expanded flag). Reuses the same filtered grouping the UI\n * renders ({@link filteredAppEntityGroups}), so the agent sees exactly what the user sees.\n * Returns [] when scoped to a single application (no grouping).\n */\n private getAgentAppGroupSummaries(): AppGroupSummary[] {\n if (this.entityFilter?.applicationId) {\n return [];\n }\n return this.filteredAppEntityGroups.map(g => ({\n Name: g.applicationName,\n EntityCount: g.entities.length,\n Expanded: g.isExpanded,\n }));\n }\n\n /**\n * Saved views accessible to the current user for the selected entity, read from the\n * already-loaded {@link UserViewEngine} cache (no new RunView). Returns [] at the home\n * level. The engine's cache is populated lazily elsewhere (e.g. {@link restoreViewFromUrl}\n * and the view workspace); if it hasn't loaded yet this returns [] and the next state\n * change re-publishes once it has.\n */\n private getAccessibleViewsForSelectedEntity(): MJUserViewEntityExtended[] {\n if (!this.selectedEntity) {\n return [];\n }\n return UserViewEngine.Instance.GetAccessibleViewsForEntity(this.selectedEntity.ID);\n }\n\n /**\n * Resolve the display name for the active view id. Prefers the live\n * {@link selectedViewEntity}, then the accessible-views list, then the engine cache.\n */\n private resolveActiveViewName(accessibleViews: MJUserViewEntityExtended[]): string | null {\n const activeId = this.state.selectedViewId;\n if (!activeId) {\n return null;\n }\n if (this.selectedViewEntity && UUIDsEqual(this.selectedViewEntity.ID, activeId)) {\n return this.selectedViewEntity.Name;\n }\n const fromList = accessibleViews.find(v => UUIDsEqual(v.ID, activeId));\n if (fromList) {\n return fromList.Name;\n }\n return UserViewEngine.Instance.GetViewById(activeId)?.Name ?? null;\n }\n\n /**\n * Column/field names visible in the grid for the selected entity — the entity's\n * default-in-view fields, read straight from in-memory {@link EntityInfo} metadata\n * (no lookup). Falls back to all fields when none are flagged for view display.\n * Returns [] at the home level.\n */\n private getVisibleColumnNames(): string[] {\n if (!this.selectedEntity) {\n return [];\n }\n const inViewFields = this.selectedEntity.Fields.filter(f => f.DefaultInView);\n const fields = inViewFields.length > 0 ? inViewFields : this.selectedEntity.Fields;\n return fields.map(f => f.DisplayNameOrName);\n }\n\n /**\n * Tracks which tool set was last registered with the NavigationService, so the\n * mode-scoped re-registration ({@link syncAgentToolsForMode}) only fires on the\n * home↔entity transition rather than on every state change.\n */\n private lastRegisteredToolMode: 'home' | 'entity' | null = null;\n\n /**\n * Re-scope the agent's client tools to the CURRENT mode. The Data Explorer has two\n * surfaces with very different affordances:\n * - 'home' (no entity selected): the entity browser — browse/search entities, favorites,\n * application groups.\n * - 'entity' (an entity is selected): the record view — views, view types, filter, sort,\n * paginate, open record, export, view properties.\n *\n * We register the COMMON tools plus exactly one mode's tools, so a browser-only tool is\n * never exposed in record-view mode and vice-versa. Because {@link publishAgentContext}\n * fires on every state change but the tool set only changes on the mode flip, this guards\n * on {@link lastRegisteredToolMode} and only calls into NavigationService when the mode\n * actually changes.\n */\n private syncAgentToolsForMode(): void {\n const mode: 'home' | 'entity' = this.selectedEntity ? 'entity' : 'home';\n if (mode === this.lastRegisteredToolMode) {\n return;\n }\n this.lastRegisteredToolMode = mode;\n this.navigationService.SetAgentClientTools(this, [\n ...this.buildCommonTools(),\n ...(mode === 'home' ? this.buildEntityBrowserTools() : this.buildRecordViewTools()),\n ]);\n }\n\n /** The tool-definition shape the NavigationService accepts. */\n private buildAgentTool(\n name: string,\n description: string,\n parameterSchema: Record<string, unknown>,\n handler: (params: Record<string, unknown>) => Promise<unknown>,\n ): { Name: string; Description: string; ParameterSchema: Record<string, unknown>; Handler: (params: Record<string, unknown>) => Promise<unknown> } {\n return { Name: name, Description: description, ParameterSchema: parameterSchema, Handler: handler };\n }\n\n /**\n * COMMON tools — available in BOTH modes. Currently just {@link BackToEntityBrowser},\n * which deselects the current entity and returns to the entity browser (the home screen).\n */\n private buildCommonTools(): Array<ReturnType<DataExplorerDashboardComponent['buildAgentTool']>> {\n return [\n this.buildAgentTool(\n 'BackToEntityBrowser',\n 'Deselect the current entity and return to the entity browser (home screen) where the user can pick a different entity.',\n { type: 'object', properties: {} },\n async () => this.toolBackToEntityBrowser(),\n ),\n ];\n }\n\n /**\n * ENTITY-BROWSER tools — only registered at the home level (no entity selected).\n * Browse/search entities, manage favorites, expand/collapse application groups.\n */\n private buildEntityBrowserTools(): Array<ReturnType<DataExplorerDashboardComponent['buildAgentTool']>> {\n return [\n this.buildAgentTool(\n 'OpenEntityData',\n 'Open and load data for an entity by its name. Pass the display name the user says (e.g. \"AI Models\", \"ML Models\", \"Users\") exactly as it appears on the entity cards — the tool resolves it even though the full entity name may carry an \"MJ: \" prefix (e.g. \"MJ: ML Models\").',\n { type: 'object', properties: { entityName: { type: 'string' } }, required: ['entityName'] },\n async (params) => this.toolOpenEntityData(params),\n ),\n this.buildAgentTool(\n 'OpenEntity',\n 'Open and load data for an entity by its name (alias of OpenEntityData). Pass the display name the user says (e.g. \"AI Models\", \"ML Models\") — the tool resolves the \"MJ: \" prefix.',\n { type: 'object', properties: { entityName: { type: 'string' } }, required: ['entityName'] },\n async (params) => this.toolOpenEntityData(params),\n ),\n this.buildAgentTool(\n 'SearchEntities',\n 'Type into the home-screen entity-search box to filter the list of available entities by name/description.',\n { type: 'object', properties: { query: { type: 'string' } }, required: ['query'] },\n async (params) => this.toolSearchEntities(params),\n ),\n this.buildAgentTool(\n 'SetEntityBrowserMode',\n 'Switch the home-screen entity browser between showing all entities and favorites only. Valid modes: all, favorites.',\n { type: 'object', properties: { mode: { type: 'string' } }, required: ['mode'] },\n async (params) => this.toolSetEntityBrowserMode(params),\n ),\n this.buildAgentTool(\n 'ToggleEntityFavorite',\n \"Add or remove an entity from the user's favorites by entity name (reversible toggle). Pass the display name the user says (e.g. \\\"AI Models\\\") — the tool resolves the \\\"MJ: \\\" prefix.\",\n { type: 'object', properties: { entityName: { type: 'string' } }, required: ['entityName'] },\n async (params) => this.toolToggleEntityFavorite(params),\n ),\n this.buildAgentTool(\n 'ExpandAppGroup',\n 'Expand an application group in the home-screen entity browser by its application name (e.g. \"AI\", \"Admin\").',\n { type: 'object', properties: { appName: { type: 'string' } }, required: ['appName'] },\n async (params) => this.toolSetAppGroupExpanded(params, true),\n ),\n this.buildAgentTool(\n 'CollapseAppGroup',\n 'Collapse an application group in the home-screen entity browser by its application name (e.g. \"AI\", \"Admin\").',\n { type: 'object', properties: { appName: { type: 'string' } }, required: ['appName'] },\n async (params) => this.toolSetAppGroupExpanded(params, false),\n ),\n ];\n }\n\n /**\n * RECORD-VIEW tools — only registered when an entity is selected. Views, view types,\n * filter, sort, paginate, open/create record, navigate-to-related, export, view properties.\n */\n private buildRecordViewTools(): Array<ReturnType<DataExplorerDashboardComponent['buildAgentTool']>> {\n return [\n this.buildAgentTool(\n 'SelectView',\n 'Select a saved view for the current entity. Accepts either the view name (e.g. \"Active Accounts\", as listed in AvailableViews) or its view ID.',\n {\n type: 'object',\n properties: {\n view: { type: 'string', description: 'The view name or view ID to select.' },\n viewId: { type: 'string', description: 'Deprecated alias for \"view\" — the view ID.' },\n },\n },\n async (params) => this.toolSelectView(params),\n ),\n this.buildAgentTool(\n 'ChangeViewType',\n 'Change the record-view type for the selected entity. Valid types: grid, cards, timeline, map.',\n { type: 'object', properties: { type: { type: 'string' } }, required: ['type'] },\n async (params) => this.toolChangeViewType(params),\n ),\n this.buildAgentTool(\n 'SetViewMode',\n 'Set the record-view mode (alias of ChangeViewType). Valid modes: grid, cards, timeline, map.',\n { type: 'object', properties: { mode: { type: 'string' } }, required: ['mode'] },\n async (params) => this.toolSetViewMode(params),\n ),\n this.buildAgentTool(\n 'FilterRecords',\n 'Set the record filter for the current entity\\'s view via smart-filter text (a natural-language or simple search string applied to the grid).',\n { type: 'object', properties: { filterText: { type: 'string' } }, required: ['filterText'] },\n async (params) => this.toolFilterRecords(params),\n ),\n this.buildAgentTool(\n 'ClearRecordFilter',\n 'Clear the current record filter for the selected entity.',\n { type: 'object', properties: {} },\n async () => {\n this.clearRecordFilter();\n return { Success: true };\n },\n ),\n this.buildAgentTool(\n 'SelectRecord',\n 'Select a row in the current view (the equivalent of the user clicking a row): this highlights the row and opens its detail panel. Pick the row by position (\"first\", \"last\", or a 1-based index number) OR by name (matches a loaded record\\'s display value — see VisibleRecordNames, case-insensitive/contains). Compose with OpenRecord to then open the full form.',\n {\n type: 'object',\n properties: {\n position: { type: 'string', description: '\"first\", \"last\", or a 1-based index (a number is also accepted).' },\n name: { type: 'string', description: 'A loaded record display value to match (case-insensitive, contains).' },\n },\n },\n async (params) => this.toolSelectRecord(params),\n ),\n this.buildAgentTool(\n 'OpenRecord',\n 'Open the currently-selected record in its full record form.',\n { type: 'object', properties: {} },\n async () => this.toolOpenSelectedRecord(),\n ),\n this.buildAgentTool(\n 'CreateNewRecord',\n 'Open a new-record form for the currently-selected entity.',\n { type: 'object', properties: {} },\n async () => this.toolCreateNewRecord(),\n ),\n this.buildAgentTool(\n 'NavigateToRelated',\n 'Navigate to a related entity by name (see the RelatedEntities context field), optionally applying a SQL filter to show related records. Pass the display name the user says — the tool resolves the \"MJ: \" prefix.',\n {\n type: 'object',\n properties: { entityName: { type: 'string' }, filter: { type: 'string' } },\n required: ['entityName'],\n },\n async (params) => this.toolNavigateToRelated(params),\n ),\n this.buildAgentTool(\n 'ExportView',\n 'Export the current entity/view\\'s records to a file. Optional format: csv, excel, or json (defaults to excel).',\n { type: 'object', properties: { format: { type: 'string', description: 'csv | excel | json' } } },\n async (params) => this.toolExportView(params),\n ),\n this.buildAgentTool(\n 'OpenViewProperties',\n 'Open the view configuration / properties panel for the current entity\\'s view (the same panel as Cmd+,).',\n { type: 'object', properties: {} },\n async () => this.toolOpenViewProperties(),\n ),\n this.buildAgentTool(\n 'NextPage',\n 'Advance the record grid to the next page of results.',\n { type: 'object', properties: {} },\n async () => this.toolNextPage(),\n ),\n this.buildAgentTool(\n 'PreviousPage',\n 'Move the record grid to the previous page of results.',\n { type: 'object', properties: {} },\n async () => this.toolPreviousPage(),\n ),\n this.buildAgentTool(\n 'GoToPage',\n 'Jump the record grid to a specific 1-based page number.',\n { type: 'object', properties: { page: { type: 'number' } }, required: ['page'] },\n async (params) => this.toolGoToPage(params),\n ),\n this.buildAgentTool(\n 'SetPageSize',\n 'Set how many records load per page in the record grid (reloads from page 1).',\n { type: 'object', properties: { size: { type: 'number' } }, required: ['size'] },\n async (params) => this.toolSetPageSize(params),\n ),\n this.buildAgentTool(\n 'SetSort',\n 'Sort the record grid by a column. Provide the column field name and an optional direction (asc | desc, defaults to asc).',\n {\n type: 'object',\n properties: { column: { type: 'string' }, direction: { type: 'string', description: 'asc | desc' } },\n required: ['column'],\n },\n async (params) => this.toolSetSort(params),\n ),\n ];\n }\n\n /**\n * Build a tolerant \"entity not found\" error listing a few of the DISPLAY names the user\n * actually sees, so the agent can correct itself.\n */\n private entityNotFoundError(input: string): string {\n const sample = this.entities.slice(0, 6).map(e => entityDisplayName(e.Name, e.DisplayName)).join(', ');\n return `Entity \"${input}\" is not available in this explorer. Available entities include: ${sample || '(none)'}.`;\n }\n\n /** Resolve an entity by name and open its data. */\n private toolOpenEntityData(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n const entityName = String(params['entityName'] ?? '');\n const entity = this.resolveEntityByName(entityName);\n if (!entity) {\n return { Success: false, ErrorMessage: this.entityNotFoundError(entityName) };\n }\n this.onEntitySelected(entity);\n return { Success: true, Data: { EntityName: entity.Name } };\n }\n\n /** Apply a record filter for the selected entity. */\n private toolFilterRecords(params: Record<string, unknown>): { Success: boolean; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected to filter.' };\n }\n this.onFilterInputChanged(String(params['filterText'] ?? ''));\n return { Success: true };\n }\n\n /** Switch the record-view mode after validating it. */\n private toolSetViewMode(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n const mode = params['mode'];\n if (!isValidViewMode(mode)) {\n return { Success: false, ErrorMessage: `Invalid view mode \"${String(mode)}\". Valid modes: grid, cards, timeline, map.` };\n }\n this.stateService.setViewMode(mode);\n return { Success: true, Data: { ViewMode: mode } };\n }\n\n /**\n * Select a saved view by name OR id. The agent now sees view names via the\n * AvailableViews context field, so this resolves a supplied name (case-insensitive)\n * to its id against the in-memory {@link UserViewEngine} cache for the current entity.\n * A value that already matches a known view id is used directly.\n */\n private toolSelectView(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there are no saved views to choose from.' };\n }\n // Accept either \"view\" (name or id) or the legacy \"viewId\" alias.\n const raw = String(params['view'] ?? params['viewId'] ?? '').trim();\n if (!raw) {\n return { Success: false, ErrorMessage: 'A view name or view ID is required.' };\n }\n\n const accessibleViews = this.getAccessibleViewsForSelectedEntity();\n // Prefer an exact id match, then fall back to a case-insensitive name match.\n const lowered = raw.toLowerCase();\n const match =\n accessibleViews.find(v => UUIDsEqual(v.ID, raw)) ??\n accessibleViews.find(v => v.Name.toLowerCase() === lowered);\n\n if (!match) {\n const available = accessibleViews.map(v => v.Name).join(', ') || '(none)';\n return { Success: false, ErrorMessage: `No saved view named or identified by \"${raw}\" for \"${this.selectedEntity.Name}\". Available views: ${available}.` };\n }\n\n this.stateService.selectView(match.ID);\n return { Success: true, Data: { ViewId: match.ID, ViewName: match.Name } };\n }\n\n /**\n * Select a record/row in the current view by position or name, then drive the same\n * selection path a user row-click takes (open the detail panel, track recent, highlight\n * the grid row via the viewer's additive SelectRecord). Tolerant: clear errors when no\n * records are loaded or the position/name doesn't match.\n */\n private toolSelectRecord(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there are no records to select.' };\n }\n const request = this.parseRecordSelectionRequest(params);\n const recordNames = this.getVisibleRecordNames();\n const resolution = resolveRecordSelection(recordNames, request);\n if (!resolution.ok) {\n return { Success: false, ErrorMessage: resolution.error };\n }\n const record = this.loadedRecords[resolution.index];\n if (!record) {\n return { Success: false, ErrorMessage: 'The resolved record is no longer loaded in the view.' };\n }\n this.applyRecordSelection(record);\n return { Success: true, Data: { SelectedRecordName: this.getRecordDisplayName(record), Index: resolution.index + 1 } };\n }\n\n /**\n * Coerce the agent's loosely-typed SelectRecord params into a {@link RecordSelectionRequest}.\n * `position` may arrive as a string ('first'/'last'/'2') or a number; `name` as a string.\n */\n private parseRecordSelectionRequest(params: Record<string, unknown>): RecordSelectionRequest {\n const rawPosition = params['position'];\n const request: RecordSelectionRequest = {};\n if (typeof rawPosition === 'number') {\n request.position = rawPosition;\n } else if (typeof rawPosition === 'string') {\n const trimmed = rawPosition.trim().toLowerCase();\n if (trimmed === 'first' || trimmed === 'last') {\n request.position = trimmed;\n } else if (trimmed) {\n const n = Number(trimmed);\n if (Number.isFinite(n)) {\n request.position = n;\n } else {\n // A non-numeric, non-first/last \"position\" is really a name — fall back to name matching.\n request.name = rawPosition;\n }\n }\n }\n if (params['name'] != null) {\n request.name = String(params['name']);\n }\n return request;\n }\n\n /**\n * Drive the selection of a loaded record exactly like {@link onViewerRecordSelected}: set the\n * selected record + detail-panel entity, open the detail panel via the state service, and ask\n * the inner viewer to highlight the matching grid row (additive viewer.SelectRecord). Mirrors\n * the user row-click path so the detail panel opens and the grid reflects the selection.\n */\n private applyRecordSelection(record: Record<string, unknown>): void {\n const entity = this.selectedEntity;\n if (!entity) {\n return;\n }\n this.selectedRecord = record;\n this.detailPanelEntity = entity;\n const recordName = this.getRecordDisplayName(record);\n const pkString = buildPkString(record, entity);\n this.stateService.selectRecord(pkString, recordName);\n this.stateService.addRecentItem({\n entityName: entity.Name,\n compositeKeyString: pkString,\n displayName: recordName,\n });\n // Highlight the row in the grid (no-op when the grid view isn't mounted, e.g. cards/timeline).\n this.viewWorkspaceRef?.SelectRecord(record);\n this.cdr.detectChanges();\n }\n\n /** Open the currently-selected record in its full form. */\n private toolOpenSelectedRecord(): { Success: boolean; ErrorMessage?: string } {\n if (!this.selectedRecord) {\n return { Success: false, ErrorMessage: 'No record is currently selected to open.' };\n }\n // onOpenRecord uses detailPanelEntity; fall back to the selected entity when\n // the record came from the grid rather than the detail panel.\n if (!this.detailPanelEntity) {\n this.detailPanelEntity = this.selectedEntity;\n }\n if (!this.detailPanelEntity) {\n return { Success: false, ErrorMessage: 'No entity context is available for the selected record.' };\n }\n this.onOpenRecord(this.selectedRecord);\n return { Success: true };\n }\n\n /** Open a new-record form for the selected entity. */\n private toolCreateNewRecord(): { Success: boolean; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected to create a record for.' };\n }\n this.onCreateNewRecord();\n return { Success: true };\n }\n\n /** Navigate to a related entity, optionally applying a filter. */\n private toolNavigateToRelated(params: Record<string, unknown>): { Success: boolean; ErrorMessage?: string } {\n const entityName = String(params['entityName'] ?? '');\n const entity = this.resolveEntityByName(entityName);\n if (!entity) {\n return { Success: false, ErrorMessage: this.entityNotFoundError(entityName) };\n }\n const filter = params['filter'] != null ? String(params['filter']) : '';\n this.onNavigateToRelated({ entityName: entity.Name, filter });\n return { Success: true };\n }\n\n /** Drive the home-screen entity-search box. */\n private toolSearchEntities(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n const validated = validateStringParam(params['query'], 'query');\n if (!validated.ok) {\n return validated.result;\n }\n this.entityFilterText = validated.value;\n this.publishAgentContext();\n this.cdr.detectChanges();\n return { Success: true, Data: { Query: validated.value, VisibleEntityCount: this.filteredEntityCount } };\n }\n\n /** Switch the home-screen entity browser between 'all' and 'favorites'. */\n private toolSetEntityBrowserMode(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n const validated = validateEnumParam(params['mode'], VALID_ENTITY_BROWSER_MODES_FOR_VALIDATION, 'mode');\n if (!validated.ok) {\n return validated.result;\n }\n if (!isValidEntityBrowserMode(validated.value)) {\n return { Success: false, ErrorMessage: `Invalid mode \"${String(params['mode'])}\". Valid modes: all, favorites.` };\n }\n this.setHomeViewMode(validated.value);\n return { Success: true, Data: { EntityBrowserMode: validated.value } };\n }\n\n /** Add or remove an entity from favorites by name (reversible). */\n private async toolToggleEntityFavorite(params: Record<string, unknown>): Promise<{ Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string }> {\n const validated = validateStringParam(params['entityName'], 'entityName');\n if (!validated.ok) {\n return validated.result;\n }\n const entity = this.resolveEntityByName(validated.value);\n if (!entity) {\n return { Success: false, ErrorMessage: this.entityNotFoundError(validated.value) };\n }\n const wasFavorited = this.stateService.isEntityFavorited(entity.ID);\n const ok = wasFavorited\n ? await this.stateService.removeEntityFromFavorites(entity.ID)\n : await this.stateService.addEntityToFavorites(entity.Name, entity.ID);\n if (!ok) {\n return { Success: false, ErrorMessage: `Failed to ${wasFavorited ? 'remove' : 'add'} \"${entity.Name}\" ${wasFavorited ? 'from' : 'to'} favorites.` };\n }\n this.ngZone.run(() => {\n this.publishAgentContext();\n this.cdr.detectChanges();\n });\n return { Success: true, Data: { EntityName: entity.Name, Favorited: !wasFavorited } };\n }\n\n /**\n * Expand or collapse an application group by its application NAME (the agent sees names,\n * not the internal application IDs). Resolves the name against the currently-shown groups.\n */\n private toolSetAppGroupExpanded(params: Record<string, unknown>, expand: boolean): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (this.entityFilter?.applicationId) {\n return { Success: false, ErrorMessage: 'The entity browser is scoped to a single application, so there are no groups to expand or collapse.' };\n }\n const validated = validateStringParam(params['appName'], 'appName');\n if (!validated.ok) {\n return validated.result;\n }\n const lowered = validated.value.trim().toLowerCase();\n const group = this.appEntityGroups.find(g => g.applicationName.toLowerCase() === lowered);\n if (!group) {\n const available = this.appEntityGroups.map(g => g.applicationName).join(', ') || '(none)';\n return { Success: false, ErrorMessage: `No application group named \"${validated.value}\". Available groups: ${available}.` };\n }\n // toggleAppGroup flips state; only call it when the current state differs from the target.\n if (group.isExpanded !== expand) {\n this.toggleAppGroup(group.applicationId);\n }\n this.publishAgentContext();\n return { Success: true, Data: { AppName: group.applicationName, Expanded: expand } };\n }\n\n /** Change the record-view type (alias of SetViewMode). */\n private toolChangeViewType(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n return this.toolSetViewMode({ mode: params['type'] });\n }\n\n /** Deselect the current entity and return to the entity browser (home screen). */\n private toolBackToEntityBrowser(): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'Already at the entity browser — no entity is selected.' };\n }\n this.goToEntityBrowser();\n return { Success: true, Data: { AtHomeLevel: true } };\n }\n\n /**\n * Export the current entity/view's records. Delegates to the inner grid's Export()\n * (via the view workspace). Optional format: csv | excel | json (defaults to excel).\n */\n private async toolExportView(params: Record<string, unknown>): Promise<{ Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string }> {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected to export.' };\n }\n const format = this.normalizeExportFormat(params['format']);\n if (format === 'invalid') {\n return { Success: false, ErrorMessage: `Invalid format \"${String(params['format'])}\". Valid formats: csv, excel, json.` };\n }\n const workspace = this.viewWorkspaceRef;\n if (!workspace || !workspace.ExportRecords) {\n return { Success: false, ErrorMessage: 'The record grid is not ready to export yet.' };\n }\n try {\n const ok = await workspace.ExportRecords(format ?? undefined);\n if (!ok) {\n return { Success: false, ErrorMessage: 'Export is not available for the current view.' };\n }\n return { Success: true, Data: { EntityName: this.selectedEntity.Name, Format: format ?? 'excel' } };\n } catch (err) {\n return { Success: false, ErrorMessage: `Export failed: ${err instanceof Error ? err.message : String(err)}` };\n }\n }\n\n /** Narrow an untrusted export-format param to a supported value, or 'invalid'. */\n private normalizeExportFormat(raw: unknown): 'csv' | 'excel' | 'json' | null | 'invalid' {\n if (raw == null || raw === '') {\n return null; // default (excel)\n }\n const value = String(raw).toLowerCase();\n if (value === 'csv' || value === 'excel' || value === 'json') {\n return value;\n }\n return 'invalid';\n }\n\n /** Open the view configuration / properties panel (same as Cmd+,). */\n private toolOpenViewProperties(): { Success: boolean; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there are no view properties to configure.' };\n }\n if (!this.viewWorkspaceRef) {\n return { Success: false, ErrorMessage: 'The view workspace is not ready yet.' };\n }\n this.viewWorkspaceRef.onConfigureViewRequested();\n return { Success: true };\n }\n\n /** Advance the record grid to the next page. */\n private toolNextPage(): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n return this.applyPageChange(() => this.viewWorkspaceRef?.NextPage() ?? null);\n }\n\n /** Move the record grid to the previous page. */\n private toolPreviousPage(): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n return this.applyPageChange(() => this.viewWorkspaceRef?.PreviousPage() ?? null);\n }\n\n /** Jump the record grid to a specific 1-based page number. */\n private toolGoToPage(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n const validated = validateNonNegativeNumberParam(params['page'], 'page');\n if (!validated.ok) {\n return validated.result;\n }\n if (validated.value < 1) {\n return { Success: false, ErrorMessage: 'page must be 1 or greater.' };\n }\n return this.applyPageChange(() => this.viewWorkspaceRef?.GoToPage(validated.value) ?? null);\n }\n\n /**\n * Shared executor for the three pagination tools: run the workspace passthrough,\n * report the resulting page, and re-publish context. A null result means the grid\n * isn't paging (e.g. not mounted, or externally-supplied records).\n */\n private applyPageChange(action: () => number | null): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there is no record grid to page.' };\n }\n const page = action();\n if (page == null) {\n return { Success: false, ErrorMessage: 'The record grid is not ready to page yet.' };\n }\n this.publishAgentContext();\n return { Success: true, Data: { CurrentPage: page } };\n }\n\n /** Set the record grid's server-side page size (reloads from page 1). */\n private toolSetPageSize(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there is no record grid to resize.' };\n }\n const validated = validateNonNegativeNumberParam(params['size'], 'size');\n if (!validated.ok) {\n return validated.result;\n }\n if (validated.value < 1) {\n return { Success: false, ErrorMessage: 'size must be 1 or greater.' };\n }\n const applied = this.viewWorkspaceRef?.SetPageSize(validated.value) ?? null;\n if (applied == null) {\n return { Success: false, ErrorMessage: 'The record grid is not ready to set a page size yet.' };\n }\n this.publishAgentContext();\n return { Success: true, Data: { PageSize: applied } };\n }\n\n /** Sort the record grid by a column + optional direction (asc | desc, default asc). */\n private toolSetSort(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there is no record grid to sort.' };\n }\n const column = validateStringParam(params['column'], 'column');\n if (!column.ok) {\n return column.result;\n }\n const columnName = column.value.trim();\n if (!columnName) {\n return { Success: false, ErrorMessage: 'A column name is required to sort.' };\n }\n // Resolve the column against the entity's fields (case-insensitive) so we sort by a real field.\n const field = this.selectedEntity.Fields.find(\n f => f.Name.toLowerCase() === columnName.toLowerCase() || f.DisplayNameOrName.toLowerCase() === columnName.toLowerCase(),\n );\n if (!field) {\n return { Success: false, ErrorMessage: `No column named \"${columnName}\" on \"${this.selectedEntity.Name}\".` };\n }\n const rawDir = params['direction'] != null ? String(params['direction']).toLowerCase() : 'asc';\n if (rawDir !== 'asc' && rawDir !== 'desc') {\n return { Success: false, ErrorMessage: `Invalid direction \"${String(params['direction'])}\". Valid directions: asc, desc.` };\n }\n const applied = this.viewWorkspaceRef?.SetSort(field.Name, rawDir) ?? false;\n if (!applied) {\n return { Success: false, ErrorMessage: 'The record grid is not ready to sort yet.' };\n }\n this.publishAgentContext();\n return { Success: true, Data: { SortColumn: field.Name, SortDirection: rawDir } };\n }\n\n /**\n * Deselect the current entity and return to the entity browser. Mirrors the home path\n * used by {@link onBreadcrumbClick} (application level) and {@link applyParams} (no params):\n * clear the selected entity / record / detail panel and notify the state service.\n */\n private goToEntityBrowser(): void {\n this.selectedEntity = null;\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.selectEntity(null);\n this.stateService.closeDetailPanel();\n this.cdr.detectChanges();\n }\n\n /**\n * Handle keyboard shortcuts\n * \"/\" or Cmd+K focuses the filter input\n */\n @HostListener('document:keydown', ['$event'])\n handleKeyboardShortcut(event: KeyboardEvent): void {\n // Skip if user is typing in an input field\n const target = event.target as HTMLElement;\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n // Allow Escape to blur the input\n if (event.key === 'Escape') {\n (target as HTMLInputElement).blur();\n }\n return;\n }\n\n // \"/\" to focus filter\n if (event.key === '/') {\n event.preventDefault();\n this.focusFilterInput();\n return;\n }\n\n // Cmd+K or Ctrl+K to focus filter\n if ((event.metaKey || event.ctrlKey) && event.key === 'k') {\n event.preventDefault();\n this.focusFilterInput();\n return;\n }\n\n // View management shortcuts (only when an entity is selected). These delegate to the\n // view workspace, which now owns the full saved-view lifecycle.\n if (this.selectedEntity && (event.metaKey || event.ctrlKey)) {\n // Ctrl+S / Cmd+S: Save current view\n if (event.key === 's' && !event.shiftKey) {\n event.preventDefault();\n this.viewWorkspaceRef?.onQuickSaveRequested(false);\n return;\n }\n\n // Ctrl+Shift+S / Cmd+Shift+S: Save as new view\n if (event.key === 'S' || (event.key === 's' && event.shiftKey)) {\n event.preventDefault();\n this.viewWorkspaceRef?.onQuickSaveRequested(true);\n return;\n }\n\n // Ctrl+, / Cmd+,: Open config panel\n if (event.key === ',') {\n event.preventDefault();\n this.viewWorkspaceRef?.onConfigureViewRequested();\n return;\n }\n\n // Ctrl+Z / Cmd+Z: Revert unsaved changes (only when modified)\n if (event.key === 'z' && !event.shiftKey && this.state.viewModified) {\n event.preventDefault();\n void this.viewWorkspaceRef?.onRevertView();\n return;\n }\n }\n }\n\n /**\n * Focus the filter input\n */\n private focusFilterInput(): void {\n if (this.filterInputRef) {\n this.filterInputRef.nativeElement.focus();\n this.filterInputRef.nativeElement.select();\n }\n }\n\n override ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n super.ngOnDestroy();\n }\n\n async ngOnChanges(changes: SimpleChanges): Promise<void> {\n // Re-apply filter when entityFilter changes\n if (changes['entityFilter'] && !changes['entityFilter'].firstChange) {\n // Update context for new filter (loads context-specific state)\n await this.stateService.setContext(this.entityFilter);\n this.state = this.stateService.CurrentState;\n await this.loadEntities();\n }\n }\n\n protected initDashboard(): void {\n // Called by BaseDashboard\n }\n\n protected loadData(): void {\n // Data loading is handled by mj-entity-viewer\n }\n\n // ========================================\n // ENTITY MANAGEMENT\n // ========================================\n\n /**\n * Load all available entities the user can access, applying any configured filter\n * @param urlState Optional URL state - if provided, skip restoring persisted entity to avoid race conditions\n */\n private async loadEntities(urlState?: DataExplorerDeepLink | null): Promise<void> {\n this.isLoadingEntities = true;\n\n try {\n // First, load all entities the user can access\n this.allEntities = this.metadata.Entities\n .filter(e => {\n const perms = e.GetUserPermisions(this.metadata.CurrentUser);\n return perms.CanRead && e.IncludeInAPI;\n })\n .sort((a, b) => a.Name.localeCompare(b.Name));\n\n // If we have an applicationId filter, load the application entities\n if (this.entityFilter?.applicationId) {\n await this.loadApplicationEntityIds(this.entityFilter.applicationId);\n }\n\n // Apply filter to get the final entity list\n this.entities = this.applyEntityFilter(this.allEntities);\n\n // Build application groups for the home view (Concept D)\n this.buildAppEntityGroups();\n\n // Only restore entity from persisted state if there's no URL state\n // This prevents race conditions where persisted entity triggers data load\n // before URL state can override it\n if (!urlState && this.state.selectedEntityName) {\n this.selectedEntity = this.entities.find(e => e.Name === this.state.selectedEntityName) || null;\n }\n } finally {\n this.ngZone.run(() => {\n this.isLoadingEntities = false;\n this.cdr.detectChanges();\n });\n }\n }\n\n /**\n * Load entity IDs associated with a specific application\n */\n private async loadApplicationEntityIds(applicationId: string): Promise<void> {\n this.applicationEntityIds.clear();\n\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<MJApplicationEntityEntity>({\n EntityName: 'MJ: Application Entities',\n ExtraFilter: `ApplicationID = '${applicationId}'`,\n ResultType: 'entity_object'\n });\n\n if (result.Success && result.Results) {\n for (const appEntity of result.Results) {\n this.applicationEntityIds.add(appEntity.EntityID);\n }\n }\n }\n\n /**\n * Apply the configured filter to the entity list\n */\n private applyEntityFilter(entities: EntityInfo[]): EntityInfo[] {\n if (!this.entityFilter) {\n return entities;\n }\n\n return entities.filter(entity => {\n // Filter by application (via ApplicationEntities)\n if (this.entityFilter!.applicationId) {\n if (!this.applicationEntityIds.has(entity.ID)) {\n return false;\n }\n }\n\n // Filter by schema names\n if (this.entityFilter!.schemaNames && this.entityFilter!.schemaNames.length > 0) {\n if (!this.entityFilter!.schemaNames.includes(entity.SchemaName)) {\n return false;\n }\n }\n\n // Filter by explicit entity names\n if (this.entityFilter!.entityNames && this.entityFilter!.entityNames.length > 0) {\n if (!this.entityFilter!.entityNames.includes(entity.Name)) {\n return false;\n }\n }\n\n // Filter out system entities unless explicitly included\n if (!this.entityFilter!.includeSystemEntities) {\n // Skip entities with names starting with __ (MJ system entities)\n if (entity.Name.startsWith('__')) {\n return false;\n }\n // Could add more system schema checks here if needed\n }\n\n return true;\n });\n }\n\n /**\n * Handle entity selection from navigation panel or home screen\n */\n public onEntitySelected(entity: EntityInfo): void {\n this.resetRecordCounts();\n // Clear the previous entity's view — it belongs to the old entity and its sort/filter\n // state would leak into the new entity's query (e.g., ORDER BY FirstName on Groups).\n // The workspace resets its own view/grid state when its [Entity] input changes.\n this.selectedViewEntity = null;\n this.selectedEntity = entity;\n this.reconcileViewModeForEntity(entity);\n this.stateService.selectEntity(entity.Name);\n // Track entity access for recent entities\n this.stateService.trackEntityAccess(entity.Name, entity.ID);\n // mj-entity-viewer will automatically load data when entity changes\n }\n\n /**\n * Handle state changes from external sources\n */\n private onStateChanged(): void {\n if (this.state.selectedEntityName !== this.selectedEntity?.Name) {\n this.resetRecordCounts();\n this.selectedEntity = this.entities.find(e => e.Name === this.state.selectedEntityName) || null;\n this.reconcileViewModeForEntity(this.selectedEntity);\n }\n }\n\n /**\n * Reset viewMode to 'grid' if the current mode isn't supported by the given entity\n * (e.g., switching to an entity without geocoding while viewMode is 'map').\n */\n private reconcileViewModeForEntity(entity: EntityInfo | null): void {\n if (!entity) return;\n const mode = this.state.viewMode;\n const hasDateFields = entity.Fields.some(f => f.TSType === EntityFieldTSType.Date);\n const modeUnsupported =\n (mode === 'map' && !entity.SupportsGeoCoding) ||\n (mode === 'timeline' && !hasDateFields);\n if (modeUnsupported) {\n this.stateService.setViewMode('grid');\n }\n }\n\n /**\n * Reset record counts when entity changes.\n * The actual counts will be updated when mj-entity-viewer emits dataLoaded event.\n */\n private resetRecordCounts(): void {\n this.totalRecordCount = 0;\n this.filteredRecordCount = 0;\n }\n\n // ========================================\n // VIEW WORKSPACE EVENT HANDLERS\n // (View CRUD now lives in mj-view-workspace; these thin handlers only drive\n // Explorer routing + URL/state sync.)\n // ========================================\n\n /**\n * Handle a view selection emitted by the workspace. Tracks the selected view for routing/export\n * and syncs the selected-view-id + smart-filter into the Explorer state service for URL sync.\n * Grid-state application is owned by the workspace.\n */\n public onWorkspaceViewSelected(view: MJUserViewEntityExtended | null): void {\n this.selectedViewEntity = view;\n this.stateService.selectView(view?.ID ?? null);\n\n if (view && view.SmartFilterEnabled && view.SmartFilterPrompt) {\n this.stateService.setSmartFilterPrompt(view.SmartFilterPrompt);\n } else {\n this.stateService.setSmartFilterPrompt('');\n }\n // User search text is separate from a saved view's filter — always clear on view switch.\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n this.cdr.detectChanges();\n }\n\n /**\n * Handle the workspace's \"open view in tab\" request — route via NavigationService.\n */\n public onOpenInTabRequested(viewId: string): void {\n const viewName = this.selectedViewEntity?.Name || 'View';\n this.navigationService.OpenView(viewId, viewName, { forceNewTab: true });\n }\n\n /**\n * Handle the workspace's \"create new record\" request — route via NavigationService.\n */\n public onCreateNewRecordRequested(entity: EntityInfo): void {\n this.navigationService.OpenNewEntityRecord(entity.Name);\n }\n\n /**\n * Clear the Explorer \"view modified\" flag after the workspace persists/reverts a view.\n */\n public onWorkspaceViewSaved(): void {\n this.stateService.setViewModified(false);\n }\n\n // ========================================\n // VIEW MODE & FILTERING (Dashboard Header)\n // ========================================\n\n /**\n * Handle smart filter change from dashboard header\n */\n public onSmartFilterChanged(prompt: string): void {\n this.stateService.setSmartFilterPrompt(prompt);\n this.filterInput$.next(prompt);\n }\n\n /**\n * Handle direct keyboard input in the filter text box.\n * Only updates the live display text and pushes to the debounce subject.\n * Does NOT trigger state changes or URL updates — those happen after the debounce.\n */\n public onFilterInputChanged(filterText: string): void {\n this.liveFilterText = filterText;\n this.filterInput$.next(filterText);\n }\n\n /**\n * Clear the record filter (called by the X button).\n */\n public clearRecordFilter(): void {\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n this.stateService.setSmartFilterPrompt('');\n this.filterInput$.next('');\n this.cdr.detectChanges();\n }\n\n /**\n * Handle filter text change from mj-entity-viewer (two-way binding)\n */\n public onFilterTextChanged(filterText: string): void {\n this.liveFilterText = filterText;\n this.debouncedFilterText = filterText;\n this.stateService.setSmartFilterPrompt(filterText);\n this.cdr.detectChanges();\n }\n\n // ========================================\n // ENTITY VIEWER EVENT HANDLERS\n // ========================================\n\n /**\n * Handle record selection from mj-entity-viewer\n */\n public onViewerRecordSelected(event: RecordSelectedEvent): void {\n this.selectedRecord = event.record;\n // When selecting from grid, detail panel entity matches the grid entity\n this.detailPanelEntity = this.selectedEntity;\n const recordName = this.getRecordDisplayName(event.record);\n const pkString = event.compositeKey.ToConcatenatedString();\n this.stateService.selectRecord(pkString, recordName);\n\n // Add to recent items (local state for navigation panel)\n if (this.selectedEntity) {\n this.stateService.addRecentItem({\n entityName: this.selectedEntity.Name,\n compositeKeyString: pkString,\n displayName: recordName\n });\n\n // Update local recent records immediately for instant home screen updates\n const recordId = event.compositeKey.KeyValuePairs[0]?.Value?.toString() || '';\n this.stateService.addLocalRecentRecord(\n this.selectedEntity.Name,\n this.selectedEntity.ID,\n recordId,\n recordName\n );\n\n // Log to User Record Logs for persistence (fire-and-forget)\n this.recentAccessService.logAccess(\n this.selectedEntity.Name,\n event.compositeKey.Values(),\n 'record'\n );\n }\n }\n\n /**\n * Handle record opened from mj-entity-viewer (double-click or open button)\n */\n public onViewerRecordOpened(event: RecordOpenedEvent): void {\n this.OpenEntityRecord.emit({\n EntityName: event.entity.Name,\n RecordPKey: event.compositeKey\n });\n }\n\n /**\n * Handle the workspace's OpenRecordRequested (record open from the inner viewer). Builds the\n * composite key from the record and routes to the full record view via the OpenEntityRecord output.\n */\n public onWorkspaceOpenRecord(event: { entity: EntityInfo; record: Record<string, unknown> }): void {\n this.OpenEntityRecord.emit({\n EntityName: event.entity.Name,\n RecordPKey: buildCompositeKey(event.record, event.entity)\n });\n }\n\n /**\n * Handle data loaded from mj-entity-viewer\n */\n public onDataLoaded(event: DataLoadedEvent): void {\n this.totalRecordCount = event.totalRowCount;\n this.filteredRecordCount = event.loadedRowCount;\n // Store loaded records for back/forward navigation lookup\n this.loadedRecords = event.records;\n\n // Handle pending record selection from deep link\n if (this.pendingRecordSelection && this.selectedEntity) {\n const recordId = this.pendingRecordSelection;\n this.pendingRecordSelection = null; // Clear it so we don't keep trying\n\n // Try to find the record by primary key or concatenated string\n const entity = this.selectedEntity;\n const record = event.records.find(r => {\n const pkString = buildPkString(r, entity);\n const pkValue = entity.PrimaryKeys[0] ? String(r[entity.PrimaryKeys[0].Name] ?? '') : '';\n return pkString === recordId || pkValue === recordId;\n });\n\n if (record) {\n this.selectedRecord = record;\n this.detailPanelEntity = this.selectedEntity;\n const recordName = this.getRecordDisplayName(record);\n this.stateService.selectRecord(buildPkString(record, entity), recordName);\n } else {\n console.warn(`[DataExplorer] Deep link record not found: ${recordId}`);\n }\n }\n // Restore selected record if we have a persisted selectedRecordId\n else if (this.state.selectedRecordId && this.state.detailPanelOpen && !this.selectedRecord && this.selectedEntity) {\n const entity = this.selectedEntity;\n const record = event.records.find(r =>\n buildPkString(r, entity) === this.state.selectedRecordId\n );\n if (record) {\n this.selectedRecord = record;\n this.detailPanelEntity = this.selectedEntity;\n }\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Handle filtered count change from mj-entity-viewer\n */\n public onFilteredCountChanged(event: FilteredCountChangedEvent): void {\n this.filteredRecordCount = event.filteredCount;\n this.totalRecordCount = event.totalCount;\n this.cdr.detectChanges();\n }\n\n // ========================================\n // DETAIL PANEL\n // ========================================\n\n /**\n * Handle detail panel close\n */\n public onDetailPanelClosed(): void {\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.closeDetailPanel();\n }\n\n /**\n * Handle opening a record in full view (from detail panel)\n * Uses detailPanelEntity since the panel may be showing a different entity than the grid\n */\n public onOpenRecord(record: Record<string, unknown>): void {\n if (!this.detailPanelEntity) return;\n\n this.OpenEntityRecord.emit({\n EntityName: this.detailPanelEntity.Name,\n RecordPKey: buildCompositeKey(record, this.detailPanelEntity)\n });\n }\n\n /**\n * Handle creating a new record for the current entity\n */\n public onCreateNewRecord(): void {\n if (!this.selectedEntity) return;\n\n // Use NavigationService to open a new record form\n this.navigationService.OpenNewEntityRecord(this.selectedEntity.Name);\n }\n\n /**\n * Show a notification to the user\n */\n private showNotification(message: string, type: 'info' | 'success' | 'error', duration: number): void {\n const data: DisplaySimpleNotificationRequestData = {\n message: message,\n style: type,\n DisplayDuration: duration\n };\n MJGlobal.Instance.RaiseEvent({\n component: this,\n event: MJEventType.DisplaySimpleNotificationRequest,\n eventCode: \"\",\n args: data\n });\n }\n\n /**\n * Handle navigation to a related entity from detail panel.\n * Navigates within the explorer and applies filter to show related records.\n */\n public onNavigateToRelated(event: NavigateToRelatedEvent): void {\n const entity = this.entities.find(e => e.Name === event.entityName);\n if (!entity) {\n // Entity not in our filtered list - it may exist in the system but not be part of this app\n console.warn(`Entity not found in explorer: ${event.entityName}`);\n return;\n }\n\n // Close detail panel and clear current record\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.closeDetailPanel();\n\n // Navigate to the entity\n this.selectedEntity = entity;\n this.stateService.selectEntity(entity.Name);\n\n // Apply the filter to show related records\n // The filter is in SQL format like \"ParentID='xxx'\" - we just show it in the filter box\n // The entity viewer will apply it as a smart filter\n if (event.filter) {\n // Apply the filter to the smart filter state (separate from user search)\n this.stateService.setSmartFilterPrompt(event.filter);\n }\n }\n\n /**\n * Handle opening a related record - display in detail panel (not new tab)\n * The record is already loaded, so just update the detail panel\n */\n public onOpenRelatedRecord(event: { entityName: string; record: Record<string, unknown> }): void {\n this.showRecordInDetailPanel(event.entityName, event.record);\n }\n\n /**\n * Handle opening a foreign key record (from FK field link in detail panel)\n * Loads the record and displays it in the detail panel\n */\n public async onOpenForeignKeyRecord(event: { entityName: string; recordId: string }): Promise<void> {\n await this.loadAndShowRecordInDetailPanel(event.entityName, event.recordId);\n }\n\n /**\n * Show an already-loaded record in the detail panel\n * Note: This does NOT change selectedEntity (the main grid's entity)\n * It only updates detailPanelEntity which is used by the detail panel\n */\n private showRecordInDetailPanel(entityName: string, record: Record<string, unknown>): void {\n const entityInfo = this.metadata.Entities.find(e => e.Name === entityName);\n if (!entityInfo) {\n console.warn(`Entity not found: ${entityName}`);\n return;\n }\n\n // Update the detail panel entity and record\n // detailPanelEntity may differ from selectedEntity when viewing FK/related records\n this.detailPanelEntity = entityInfo;\n this.selectedRecord = record;\n\n // Use selectRecord to open the panel with proper state tracking\n const recordName = this.getRecordDisplayName(record, entityInfo);\n this.stateService.selectRecord(buildPkString(record, entityInfo), recordName);\n this.cdr.detectChanges();\n }\n\n /**\n * Load a record by ID and show it in the detail panel\n */\n private async loadAndShowRecordInDetailPanel(entityName: string, recordId: string): Promise<void> {\n const entityInfo = this.metadata.Entities.find(e => e.Name === entityName);\n if (!entityInfo) {\n console.warn(`Entity not found: ${entityName}`);\n return;\n }\n\n try {\n // Load the record\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<Record<string, unknown>>({\n EntityName: entityName,\n ExtraFilter: `ID='${recordId}'`,\n ResultType: 'simple',\n MaxRows: 1\n });\n\n if (result.Success && result.Results.length > 0) {\n this.ngZone.run(() => {\n this.showRecordInDetailPanel(entityName, result.Results[0]);\n });\n } else {\n console.warn(`Record not found: ${entityName} ID=${recordId}`);\n }\n } catch (error) {\n console.error(`Failed to load record: ${entityName} ID=${recordId}`, error);\n }\n }\n\n // ========================================\n // NAVIGATION PANEL\n // ========================================\n\n /**\n * Handle opening a record from navigation panel (recent/favorites)\n */\n public onOpenRecordFromNav(event: OpenRecordEvent): void {\n this.OpenEntityRecord.emit({\n EntityName: event.entityName,\n RecordPKey: event.compositeKey\n });\n }\n\n /**\n * Handle selecting a record from navigation panel (recent/favorites).\n * Navigates to the entity within Data Explorer and selects the record\n * in the detail panel (instead of opening full record view).\n */\n public onSelectRecordFromNav(event: SelectRecordEvent): void {\n const entity = this.entities.find(e => e.Name === event.entityName);\n if (entity) {\n // Set pending record selection - will be resolved in onDataLoaded\n this.pendingRecordSelection = event.recordId;\n this.onEntitySelected(entity);\n }\n }\n\n /**\n * Toggle navigation panel\n */\n public toggleNavigationPanel(): void {\n this.stateService.toggleNavigationPanel();\n }\n\n /**\n * Handle expand and focus from collapsed nav icon click\n */\n public onExpandAndFocus(section: 'favorites' | 'recent' | 'entities'): void {\n this.stateService.expandAndFocusSection(section);\n }\n\n // ========================================\n // DEEP LINK HANDLING\n // ========================================\n\n /**\n * Apply a deep link to navigate to a specific entity/record\n */\n private async applyDeepLink(deepLink: DataExplorerDeepLink): Promise<void> {\n // ViewTypeID-only: view type is no longer deep-linked — the inner viewer persists it.\n\n // Navigate to entity if specified\n if (deepLink.entity) {\n const entity = this.entities.find(e =>\n e.Name.toLowerCase() === deepLink.entity!.toLowerCase()\n );\n\n if (entity) {\n // Reset counts before setting entity to prevent stale data display\n this.resetRecordCounts();\n this.selectedEntity = entity;\n this.stateService.selectEntity(entity.Name);\n\n // Apply filter if specified (to smart filter state, not user search)\n if (deepLink.filter) {\n this.stateService.setSmartFilterPrompt(deepLink.filter);\n }\n\n // Note: Record selection is handled after data loads via onDataLoaded\n // We store the record ID to select once data is available\n if (deepLink.record) {\n this.pendingRecordSelection = deepLink.record;\n }\n } else {\n console.warn(`[DataExplorer] Deep link entity not found: ${deepLink.entity}`);\n }\n }\n }\n\n /** Record ID to select once data loads (from deep link) */\n private pendingRecordSelection: string | null = null;\n\n // ========================================\n // BREADCRUMB NAVIGATION\n // ========================================\n\n /**\n * Handle breadcrumb click - navigate to that level\n */\n public onBreadcrumbClick(breadcrumb: BreadcrumbItem, index: number): void {\n // Don't navigate if it's the last (current) breadcrumb\n if (index === this.breadcrumbs.length - 1) {\n return;\n }\n\n this.stateService.navigateToBreadcrumb(breadcrumb);\n\n // If navigating to application level, clear entity selection\n if (breadcrumb.type === 'application') {\n this.selectedEntity = null;\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n }\n }\n\n // ========================================\n // HELPERS\n // ========================================\n\n /**\n * Get the set of allowed entity names for filtering favorites/recents.\n * Returns null if no filter is active (all entities allowed).\n */\n public get allowedEntityNames(): Set<string> | null {\n if (!this.entityFilter) {\n return null;\n }\n return new Set(this.entities.map(e => e.Name));\n }\n\n /**\n * Get display name for a record\n */\n private getRecordDisplayName(record: Record<string, unknown>, entityInfo?: EntityInfo): string {\n const entity = entityInfo || this.selectedEntity;\n if (!entity) return 'Unknown';\n\n if (entity.NameField) {\n const nameValue = record[entity.NameField.Name];\n if (nameValue) return String(nameValue);\n }\n\n return buildPkString(record, entity);\n }\n\n /**\n * Get the icon class for an entity\n */\n public getEntityIcon(entity: EntityInfo): string {\n if (entity.Icon) {\n return this.formatEntityIcon(entity.Icon);\n }\n return 'fa-solid fa-table';\n }\n\n /**\n * Format entity icon to ensure proper Font Awesome class format\n */\n private formatEntityIcon(icon: string): string {\n if (!icon) {\n return 'fa-solid fa-table';\n }\n if (icon.startsWith('fa-') || icon.startsWith('fa ')) {\n if (icon.startsWith('fa-solid') || icon.startsWith('fa-regular') ||\n icon.startsWith('fa-light') || icon.startsWith('fa-brands') ||\n icon.startsWith('fa ')) {\n return icon;\n }\n return `fa-solid ${icon}`;\n }\n return `fa-solid fa-${icon}`;\n }\n\n // ========================================\n // URL DEEP LINKING (Framework Query Param Lifecycle)\n // ========================================\n\n /**\n * Build a DataExplorerDeepLink from framework query params.\n * Returns null if no relevant params found.\n */\n private buildDeepLinkFromParams(params: Record<string, string>): DataExplorerDeepLink | null {\n const entity = params['entity'] || null;\n const record = params['record'] || null;\n const filterParam = params['filter'] || null;\n const viewId = params['viewId'] || null;\n\n if (!entity && !record && !filterParam && !viewId) {\n return null;\n }\n\n // ViewTypeID-only: the active view type is persisted via UserView.ViewTypeID / per-user settings\n // by the inner viewer, NOT via URL query params. So we no longer read/write view/mapMode here.\n return {\n entity: entity || undefined,\n record: record || undefined,\n filter: filterParam || undefined,\n viewId: viewId || undefined\n };\n }\n\n /**\n * React to back/forward navigation or deep-link entry.\n * The base class calls this when query params change via popstate or deeplink.\n */\n protected override OnQueryParamsChanged(params: Record<string, string>, _source: 'popstate' | 'deeplink'): void {\n this.applyParams(params);\n }\n\n /**\n * Public entry point for the resource wrapper to forward query param changes.\n * The wrapper receives OnQueryParamsChanged from the framework and delegates here.\n */\n public HandleQueryParamsChanged(params: Record<string, string>, _source: 'popstate' | 'deeplink'): void {\n this.applyParams(params);\n }\n\n /**\n * Apply a params map (from framework query params) to the component state.\n */\n private async applyParams(params: Record<string, string>): Promise<void> {\n const deepLink = this.buildDeepLinkFromParams(params);\n if (deepLink) {\n await this.applyUrlState(deepLink);\n } else {\n // No params — go to home view\n this.selectedEntity = null;\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.selectEntity(null);\n this.stateService.closeDetailPanel();\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Push current navigation state to the URL via the framework.\n * Called whenever state changes so users can bookmark/share URLs.\n */\n private pushCurrentStateToUrl(): void {\n const hasEntity = !!this.state.selectedEntityName;\n const hasViewId = !!(this.state.selectedViewId && hasEntity);\n\n // ViewTypeID-only: the active view type is persisted by the inner viewer (UserView.ViewTypeID /\n // per-user settings), not via URL. We only round-trip entity / record / saved-view selection.\n const queryParams: Record<string, string | null> = {\n entity: this.state.selectedEntityName || null,\n record: (this.state.selectedRecordId && hasEntity) ? this.state.selectedRecordId : null,\n filter: null, // Never in URL — filters live in saved views (DB), not query strings\n viewId: hasViewId ? this.state.selectedViewId : null\n };\n\n\n this.UpdateQueryParams(queryParams);\n }\n\n /**\n * Apply URL state to the component.\n * Used both during init and for popstate handling.\n */\n private async applyUrlState(urlState: DataExplorerDeepLink): Promise<void> {\n // ViewTypeID-only: view type / map mode are no longer URL-driven — the inner viewer persists them.\n\n // Navigate to entity if specified\n if (urlState.entity) {\n const entity = this.entities.find(e =>\n e.Name.toLowerCase() === urlState.entity!.toLowerCase()\n );\n\n if (entity) {\n const entityChanged = this.selectedEntity?.Name !== entity.Name;\n\n if (entityChanged) {\n // Entity changed - reset counts and select new entity\n this.resetRecordCounts();\n this.selectedEntity = entity;\n this.stateService.selectEntity(entity.Name);\n }\n\n // Restore saved view by ID if specified. The workspace applies the view's grid state\n // itself once selectedViewEntity flows into its [SelectedView] input.\n if (urlState.viewId) {\n await this.restoreViewFromUrl(urlState.viewId, entity);\n } else {\n // No specific view — clear view selection to use default\n this.selectedViewEntity = null;\n this.stateService.selectView(null);\n }\n\n // Filters live in saved views (DB), never in URL query strings.\n // Clear smart filter on entity change when no specific view is selected.\n if (entityChanged && !urlState.viewId) {\n this.stateService.setSmartFilterPrompt('');\n }\n // User search text is always cleared when applying URL state\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n\n // Handle record selection\n if (urlState.record) {\n if (entityChanged) {\n // Entity changed - need to wait for data to load\n this.pendingRecordSelection = urlState.record;\n } else if (this.selectedEntity) {\n // Entity is the same - find record from already-loaded data\n const entity = this.selectedEntity;\n const record = this.loadedRecords.find(r => {\n const pkString = buildPkString(r, entity);\n const pkValue = entity.PrimaryKeys[0] ? String(r[entity.PrimaryKeys[0].Name] ?? '') : '';\n return pkString === urlState.record || pkValue === urlState.record;\n });\n\n if (record) {\n this.selectedRecord = record;\n this.detailPanelEntity = this.selectedEntity;\n const recordName = this.getRecordDisplayName(record);\n this.stateService.selectRecord(buildPkString(record, entity), recordName);\n } else {\n // Record not in current page - update state but panel won't show\n this.stateService.selectRecord(urlState.record, this.state.selectedRecordName || undefined);\n }\n }\n } else {\n // Clear record selection if not in URL\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.closeDetailPanel();\n }\n }\n } else {\n // No entity in URL - go to home view\n this.selectedEntity = null;\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.selectEntity(null);\n this.stateService.closeDetailPanel();\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Restore a saved view from the URL's viewId parameter.\n * Looks up the view by ID and sets it as selected; the workspace applies its grid state once\n * selectedViewEntity flows into its [SelectedView] input. Must be async because UserViewEngine's\n * cache may not be populated yet on cold page loads.\n */\n private async restoreViewFromUrl(viewId: string, entity: EntityInfo): Promise<void> {\n // Ensure the view engine cache is populated before querying —\n // on hard refresh, the cache may be empty and GetAccessibleViewsForEntity returns []\n await UserViewEngine.Instance.Config(false);\n\n const accessibleViews = UserViewEngine.Instance.GetAccessibleViewsForEntity(entity.ID);\n const view = accessibleViews.find(v => UUIDsEqual(v.ID, viewId)) || null;\n\n if (view) {\n this.selectedViewEntity = view;\n this.stateService.selectView(viewId);\n\n // Apply the view's smart filter if it has one\n if (view.SmartFilterEnabled && view.SmartFilterPrompt) {\n this.stateService.setSmartFilterPrompt(view.SmartFilterPrompt);\n }\n } else {\n console.warn('[DataExplorer] restoreViewFromUrl: view NOT FOUND, falling back to default. viewId=', viewId);\n this.selectedViewEntity = null;\n this.stateService.selectView(null);\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Emit the current display name based on selected entity/record.\n */\n private emitDisplayName(): void {\n if (this.state.selectedEntityName) {\n this.DisplayNameChanged.emit(this.state.selectedEntityName);\n } else {\n this.DisplayNameChanged.emit('Data');\n }\n }\n\n // ========================================\n // HOME SCREEN ACTIONS\n // ========================================\n\n /**\n * Toggle entity favorite status\n */\n public async toggleEntityFavorite(entity: EntityInfo, event: Event): Promise<void> {\n event.stopPropagation(); // Prevent card click\n if (this.stateService.isEntityFavorited(entity.ID)) {\n await this.stateService.removeEntityFromFavorites(entity.ID);\n } else {\n await this.stateService.addEntityToFavorites(entity.Name, entity.ID);\n }\n this.ngZone.run(() => this.cdr.detectChanges());\n }\n\n /**\n * Check if entity is favorited (for template)\n */\n public isEntityFavorited(entity: EntityInfo): boolean {\n return this.stateService.isEntityFavorited(entity.ID);\n }\n\n /**\n * Toggle show all entities vs common entities\n */\n public toggleShowAllEntities(): void {\n this.stateService.toggleShowAllEntities();\n }\n\n // ========================================\n // Concept D: Application Groups + Quick Access Panel\n // ========================================\n\n /**\n * Toggle an application group's expanded/collapsed state\n */\n public toggleAppGroup(groupId: string): void {\n this.stateService.toggleAppGroupExpanded(groupId);\n // Update local cache for immediate UI response\n const group = this.appEntityGroups.find(g => g.applicationId === groupId);\n if (group) {\n group.isExpanded = !group.isExpanded;\n }\n this.cdr.detectChanges();\n }\n\n /**\n * Set the home view mode (all vs favorites)\n */\n public setHomeViewMode(mode: 'all' | 'favorites'): void {\n this.stateService.setHomeViewMode(mode);\n }\n\n /**\n * Toggle the quick access (right) panel\n */\n public toggleQuickAccessPanel(): void {\n this.stateService.toggleQuickAccessPanel();\n }\n\n /**\n * Toggle a section in the quick access panel\n */\n public toggleQuickAccessSection(sectionId: string): void {\n this.stateService.toggleQuickAccessSection(sectionId);\n }\n\n /**\n * Build application entity groups from metadata.\n * Groups entities by their first application membership.\n * Entities not in any application go into \"System & Other\".\n */\n private buildAppEntityGroups(): void {\n // Skip grouping when filtered to a single application\n if (this.entityFilter?.applicationId) {\n this.appEntityGroups = [];\n return;\n }\n\n const applications = this.metadata.Applications;\n const entityIdToApps = new Map<string, ApplicationInfo[]>();\n const groupMap = new Map<string, AppEntityGroup>();\n\n // Build entity -> applications mapping (an entity can belong to multiple apps)\n for (const app of applications) {\n for (const appEntity of app.ApplicationEntities) {\n const apps = entityIdToApps.get(appEntity.EntityID);\n if (apps) {\n apps.push(app);\n } else {\n entityIdToApps.set(appEntity.EntityID, [app]);\n }\n }\n }\n\n // Assign each visible entity to all of its application groups\n const ungroupedEntities: EntityInfo[] = [];\n for (const entity of this.entities) {\n const apps = entityIdToApps.get(entity.ID);\n if (apps) {\n for (const app of apps) {\n this.addEntityToGroup(groupMap, app, entity);\n }\n } else {\n ungroupedEntities.push(entity);\n }\n }\n\n // Convert map to sorted array\n const groups = Array.from(groupMap.values())\n .sort((a, b) => a.applicationName.localeCompare(b.applicationName));\n\n // Add \"System & Other\" catch-all if there are ungrouped entities\n if (ungroupedEntities.length > 0) {\n groups.push({\n applicationId: '__system_other__',\n applicationName: 'System & Other',\n applicationIcon: 'fa-solid fa-ellipsis',\n applicationColor: 'var(--mj-text-disabled)',\n entities: ungroupedEntities,\n isExpanded: this.state.expandedAppGroups.includes('__system_other__')\n });\n }\n\n // Apply expanded state from persisted state\n for (const group of groups) {\n group.isExpanded = this.state.expandedAppGroups.includes(group.applicationId);\n }\n\n this.appEntityGroups = groups;\n }\n\n /**\n * Add an entity to its application group in the map, creating the group if needed\n */\n private addEntityToGroup(\n groupMap: Map<string, AppEntityGroup>,\n app: ApplicationInfo,\n entity: EntityInfo\n ): void {\n let group = groupMap.get(app.ID);\n if (!group) {\n group = {\n applicationId: app.ID,\n applicationName: app.Name,\n applicationIcon: app.Icon || 'fa-solid fa-cube',\n applicationColor: app.Color,\n entities: [],\n isExpanded: false\n };\n groupMap.set(app.ID, group);\n }\n group.entities.push(entity);\n }\n\n /**\n * Handle clicking on a recent record from home screen.\n * Navigates to the entity and sets up pending selection to select the record\n * and open the detail panel once data loads.\n */\n public onRecentRecordClick(record: RecentRecordAccess): void {\n const entity = this.entities.find(e => UUIDsEqual(e.ID, record.entityId));\n if (entity) {\n // Set pending record selection - will be resolved in onDataLoaded\n this.pendingRecordSelection = record.recordId;\n this.onEntitySelected(entity);\n }\n }\n\n /**\n * Handle clicking on a favorite record from home screen.\n * Navigates to the entity and sets up pending selection to select the record\n * and open the detail panel once data loads.\n */\n public onFavoriteRecordClick(record: FavoriteRecord): void {\n const entity = this.entities.find(e => UUIDsEqual(e.ID, record.entityId));\n if (entity) {\n // Set pending record selection - will be resolved in onDataLoaded\n this.pendingRecordSelection = record.recordId;\n this.onEntitySelected(entity);\n }\n }\n\n /**\n * Get the icon for an entity by ID (for recent records)\n */\n public getEntityIconById(entityId: string): string {\n const entity = this.metadata.Entities.find(e => UUIDsEqual(e.ID, entityId));\n if (entity) {\n return this.getEntityIcon(entity);\n }\n return 'fa-solid fa-table';\n }\n\n // Cache for relative time strings to prevent recalculation during change detection\n private relativeTimeCache = new Map<number, { formatted: string; cachedAt: number }>();\n\n /**\n * Format relative time for display (e.g., \"2 hours ago\")\n * Cached to prevent ExpressionChangedAfterItHasBeenCheckedError\n */\n public formatRelativeTime(date: Date): string {\n if (!date) return '';\n\n const timestamp = new Date(date).getTime();\n const now = Date.now();\n\n // Check cache - use cached value if less than 10 seconds old\n const cached = this.relativeTimeCache.get(timestamp);\n if (cached && (now - cached.cachedAt) < 10000) {\n return cached.formatted;\n }\n\n // Calculate new value\n const diff = now - timestamp;\n const minutes = Math.floor(diff / 60000);\n const hours = Math.floor(diff / 3600000);\n const days = Math.floor(diff / 86400000);\n\n let formatted: string;\n if (minutes < 1) formatted = 'Just now';\n else if (minutes < 60) formatted = `${minutes}m ago`;\n else if (hours < 24) formatted = `${hours}h ago`;\n else if (days < 7) formatted = `${days}d ago`;\n else formatted = new Date(date).toLocaleDateString();\n\n // Cache the result\n this.relativeTimeCache.set(timestamp, { formatted, cachedAt: now });\n\n // Cleanup old cache entries (keep last 100)\n if (this.relativeTimeCache.size > 100) {\n const firstKey = this.relativeTimeCache.keys().next().value;\n if (firstKey !== undefined) {\n this.relativeTimeCache.delete(firstKey);\n }\n }\n\n return formatted;\n }\n\n /**\n * Check if we're at the home level (no entity selected)\n */\n get isAtHomeLevel(): boolean {\n return !this.selectedEntity;\n }\n\n /**\n * NAVIGATION handler: open a *related* record on a (possibly different) entity, bubbled up from a\n * plug-in renderer through the workspace (e.g. a grid foreign-key drill-through). Resolves the\n * target entity and shows the record in the detail panel, mirroring the FK navigation path used\n * by {@link onOpenForeignKeyRecord}.\n *\n * @param nav the related-record navigation payload: the target entity name and the record's key.\n */\n public onOpenRelatedRecordRequested(nav: ViewRelatedRecordNavigation): void {\n if (nav?.entityName && nav.recordKey != null) {\n void this.loadAndShowRecordInDetailPanel(nav.entityName, String(nav.recordKey));\n }\n }\n}\n","<div class=\"data-explorer-container\">\n <!-- Navigation Panel (Left) - Hidden at home level, animated -->\n @if (!isAtHomeLevel) {\n <div\n class=\"navigation-panel\"\n [class.collapsed]=\"state.navigationPanelCollapsed\"\n [style.width.px]=\"state.navigationPanelCollapsed ? 48 : state.navigationPanelWidth\"\n [@slideInLeft]>\n\n <mj-explorer-navigation-panel\n [entities]=\"entities\"\n [appEntityGroups]=\"appEntityGroups\"\n [selectedEntityName]=\"state.selectedEntityName\"\n [favorites]=\"state.favorites\"\n [recentItems]=\"state.recentItems\"\n [collapsed]=\"state.navigationPanelCollapsed\"\n [allowedEntityNames]=\"allowedEntityNames\"\n [favoritesSectionExpanded]=\"state.favoritesSectionExpanded\"\n [recentSectionExpanded]=\"state.recentSectionExpanded\"\n [entitiesSectionExpanded]=\"state.entitiesSectionExpanded\"\n [viewsSectionExpanded]=\"state.viewsSectionExpanded\"\n (entitySelected)=\"onEntitySelected($event)\"\n (toggleCollapse)=\"toggleNavigationPanel()\"\n (sectionToggled)=\"stateService.toggleSection($event)\"\n (openRecord)=\"onOpenRecordFromNav($event)\"\n (selectRecord)=\"onSelectRecordFromNav($event)\"\n (expandAndFocus)=\"onExpandAndFocus($event)\">\n </mj-explorer-navigation-panel>\n </div>\n }\n\n <!-- Main Content Area -->\n <div class=\"content-area\">\n <!-- Breadcrumb Bar - Hidden at home level -->\n @if (!isAtHomeLevel && breadcrumbs.length > 0) {\n <div class=\"breadcrumb-bar\">\n @for (crumb of breadcrumbs; track crumb.label; let i = $index; let last = $last) {\n <span\n class=\"breadcrumb-item\"\n [class.clickable]=\"!last\"\n [class.current]=\"last\"\n (click)=\"onBreadcrumbClick(crumb, i)\"\n [title]=\"crumb.label\">\n @if (crumb.icon) {\n <i [class]=\"crumb.icon\" class=\"breadcrumb-icon\"></i>\n }\n <span class=\"breadcrumb-label\">{{ crumb.label }}</span>\n </span>\n @if (!last) {\n <i class=\"fa-solid fa-chevron-right breadcrumb-separator\"></i>\n }\n }\n </div>\n }\n\n <!-- Header -->\n <div class=\"content-header\" [class.home-header]=\"isAtHomeLevel\">\n <div class=\"header-left\">\n @if (selectedEntity) {\n <i [class]=\"getEntityIcon(selectedEntity)\" class=\"entity-icon\"></i>\n <h2 class=\"entity-title\">{{ selectedEntity.DisplayNameOrName }}</h2>\n @if (debouncedFilterText && filteredRecordCount !== totalRecordCount) {\n <span class=\"record-count\">{{ filteredRecordCount | number }} of {{ totalRecordCount | number }} records</span>\n } @else {\n <span class=\"record-count\">{{ totalRecordCount | number }} records</span>\n }\n\n <!-- View selector + view header now live inside mj-view-workspace (below). -->\n <!-- Add-to-List is now owned inside the grid plug-in renderer (it hosts its own dialog). -->\n } @else {\n @if (displayIcon) {\n <i [class]=\"displayIcon\" class=\"entity-icon\"></i>\n }\n <h2 class=\"entity-title\">{{ displayTitle }}</h2>\n <span class=\"record-count\">{{ entities.length }} entities available</span>\n }\n </div>\n\n <div class=\"header-center\">\n @if (selectedEntity) {\n <div class=\"smart-filter-container\">\n <i class=\"fa-solid fa-search filter-icon\"></i>\n <input\n #filterInput\n type=\"text\"\n class=\"smart-filter-input\"\n placeholder=\"Filter records... (press / to focus)\"\n [value]=\"liveFilterText\"\n (input)=\"onFilterInputChanged(filterInput.value)\"\n />\n @if (liveFilterText) {\n <button class=\"clear-filter-btn\" (click)=\"clearRecordFilter()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n }\n <!-- Home-level search moved to search hero section -->\n </div>\n\n <div class=\"header-right\">\n @if (selectedEntity) {\n <!-- View-type switcher AND all view-specific controls (timeline date/orientation/sort,\n map render mode, etc.) now live inside the plug-in renderers hosted by\n mj-view-workspace. Nothing view-type-specific lives in this header anymore. -->\n }\n @if (!selectedEntity) {\n <!-- Quick Access panel toggle -->\n <button\n class=\"header-action-btn\"\n [class.active]=\"state.quickAccessPanelOpen\"\n (click)=\"toggleQuickAccessPanel()\"\n title=\"Recents & Favorites\">\n <i class=\"fa-solid fa-clock-rotate-left\"></i>\n @if (recentRecords.length + favoriteRecords.length > 0) {\n <span class=\"qa-badge\">{{ recentRecords.length + favoriteRecords.length }}</span>\n }\n </button>\n }\n </div>\n </div>\n\n <!-- Content Body - Using mj-entity-viewer composite -->\n <div class=\"content-body\" [class.home-content]=\"isAtHomeLevel\">\n @if (!selectedEntity) {\n <!-- Concept D: Application Groups + Search-First Home View -->\n <div class=\"home-view-concept-d\">\n @if (isLoadingEntities) {\n <div class=\"loading-state\">\n <mj-loading text=\"Loading entities...\" size=\"medium\"></mj-loading>\n </div>\n } @else {\n <div class=\"home-main-area\" [class.panel-open]=\"state.quickAccessPanelOpen\">\n <!-- Search Hero -->\n <div class=\"search-hero\">\n <div class=\"search-hero-container\">\n <i class=\"fa-solid fa-magnifying-glass search-hero-icon\"></i>\n <input\n #filterInput\n type=\"text\"\n class=\"search-hero-input\"\n placeholder=\"Search entities...\"\n [(ngModel)]=\"entityFilterText\"\n />\n @if (entityFilterText) {\n <button class=\"search-hero-clear\" (click)=\"entityFilterText = ''\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n } @else {\n <span class=\"search-hero-shortcut\">/</span>\n }\n </div>\n\n <!-- Meta row: entity count + All/Favorites pills -->\n <div class=\"search-meta-row\">\n <span class=\"search-entity-count\">\n {{ filteredEntityCount }} entities\n @if (applicationCount > 0) {\n across {{ applicationCount }} applications\n }\n </span>\n <div class=\"pill-toggle\">\n <button\n class=\"pill-btn\"\n [class.active]=\"state.homeViewMode === 'all'\"\n (click)=\"setHomeViewMode('all')\">\n All Entities\n </button>\n <button\n class=\"pill-btn\"\n [class.active]=\"state.homeViewMode === 'favorites'\"\n (click)=\"setHomeViewMode('favorites')\">\n <i class=\"fa-solid fa-star\"></i> My Favorites\n </button>\n </div>\n </div>\n </div>\n\n <!-- Entity Groups Area -->\n <div class=\"entity-groups-area\">\n @if (entityFilter?.applicationId) {\n <!-- Single-app mode: flat entity grid (no grouping) -->\n <div class=\"entity-item-grid\">\n @for (entity of flatFilteredEntities; track entity.ID) {\n <div\n class=\"entity-item\"\n (click)=\"onEntitySelected(entity)\"\n [title]=\"entity.Description || entity.DisplayNameOrName\">\n <div class=\"entity-item-icon\">\n <i [class]=\"getEntityIcon(entity)\"></i>\n </div>\n <div class=\"entity-item-text\">\n <span class=\"entity-item-name\">{{ entity.DisplayNameOrName }}</span>\n @if (entity.Description) {\n <span class=\"entity-item-desc\">{{ entity.Description }}</span>\n }\n </div>\n <button\n class=\"entity-item-fav\"\n [class.favorited]=\"isEntityFavorited(entity)\"\n (click)=\"toggleEntityFavorite(entity, $event)\"\n [title]=\"isEntityFavorited(entity) ? 'Remove from favorites' : 'Add to favorites'\">\n <i [class]=\"isEntityFavorited(entity) ? 'fa-solid fa-star' : 'fa-regular fa-star'\"></i>\n </button>\n </div>\n }\n </div>\n } @else {\n <!-- Multi-app mode: grouped by application -->\n @for (group of filteredAppEntityGroups; track group.applicationId) {\n <div class=\"app-group\">\n <div class=\"app-group-header\" (click)=\"toggleAppGroup(group.applicationId)\">\n <div\n class=\"app-group-icon\"\n [style.background]=\"group.applicationColor ? group.applicationColor + '15' : null\"\n [style.color]=\"group.applicationColor || null\">\n <i [class]=\"group.applicationIcon || 'fa-solid fa-folder'\"></i>\n </div>\n <span class=\"app-group-name\">{{ group.applicationName }}</span>\n <span class=\"app-group-count\">{{ group.entities.length }}</span>\n <i class=\"fa-solid fa-chevron-right app-group-chevron\"\n [class.expanded]=\"group.isExpanded\"></i>\n </div>\n @if (group.isExpanded) {\n <div class=\"app-group-entities\">\n <div class=\"entity-item-grid\">\n @for (entity of group.entities; track entity.ID) {\n <div\n class=\"entity-item\"\n (click)=\"onEntitySelected(entity)\"\n [title]=\"entity.Description || entity.DisplayNameOrName\">\n <div class=\"entity-item-icon\">\n <i [class]=\"getEntityIcon(entity)\"></i>\n </div>\n <div class=\"entity-item-text\">\n <span class=\"entity-item-name\">{{ entity.DisplayNameOrName }}</span>\n @if (entity.Description) {\n <span class=\"entity-item-desc\">{{ entity.Description }}</span>\n }\n </div>\n <button\n class=\"entity-item-fav\"\n [class.favorited]=\"isEntityFavorited(entity)\"\n (click)=\"toggleEntityFavorite(entity, $event)\"\n [title]=\"isEntityFavorited(entity) ? 'Remove from favorites' : 'Add to favorites'\">\n <i [class]=\"isEntityFavorited(entity) ? 'fa-solid fa-star' : 'fa-regular fa-star'\"></i>\n </button>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n }\n\n <!-- No results -->\n @if (filteredEntityCount === 0 && entities.length > 0) {\n <mj-empty-state Variant=\"no-results\"\n Title=\"No entities found\"\n [Message]=\"NoEntityResultsMessage\" />\n }\n @if (entities.length === 0) {\n <mj-empty-state Icon=\"fa-solid fa-database\"\n Title=\"No Entities Available\"\n Message=\"There are no entities configured for this application.\" />\n }\n </div>\n </div>\n\n <!-- Quick Access Panel (right slide-in) -->\n <div class=\"quick-access-panel\" [class.open]=\"state.quickAccessPanelOpen\">\n <div class=\"qa-header\">\n <h3>Quick Access</h3>\n <button class=\"qa-close-btn\" (click)=\"toggleQuickAccessPanel()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n <div class=\"qa-body\">\n <!-- Recent Records (max 3) -->\n <mj-accordion-panel [Expanded]=\"isQuickAccessSectionExpanded('recentRecords')\" (ExpandedChange)=\"toggleQuickAccessSection('recentRecords')\">\n <ng-template mjAccordionTitle>\n <i class=\"fa-solid fa-clock-rotate-left qa-section-icon\"></i>\n <span>Recent Records</span>\n <span class=\"mj-accordion-badge mj-accordion-badge--right\">{{ quickAccessRecentRecords.length }}</span>\n </ng-template>\n @for (record of quickAccessRecentRecords; track record.entityId + '|' + record.recordId) {\n <div class=\"qa-item\" (click)=\"onRecentRecordClick(record)\">\n <div class=\"qa-item-icon\">\n <i [class]=\"getEntityIconById(record.entityId)\"></i>\n </div>\n <div class=\"qa-item-info\">\n <div class=\"qa-item-name\">{{ record.recordName || record.recordId }}</div>\n <div class=\"qa-item-meta\">{{ record.entityName }}</div>\n </div>\n <span class=\"qa-item-time\">{{ formatRelativeTime(record.latestAt) }}</span>\n </div>\n }\n @if (quickAccessRecentRecords.length === 0) {\n <div class=\"qa-empty\">No recent records</div>\n }\n </mj-accordion-panel>\n\n <!-- Recent Entities (max 3) -->\n <mj-accordion-panel [Expanded]=\"isQuickAccessSectionExpanded('recentEntities')\" (ExpandedChange)=\"toggleQuickAccessSection('recentEntities')\">\n <ng-template mjAccordionTitle>\n <i class=\"fa-solid fa-table qa-section-icon\"></i>\n <span>Recent Entities</span>\n <span class=\"mj-accordion-badge mj-accordion-badge--right\">{{ quickAccessRecentEntities.length }}</span>\n </ng-template>\n @for (entity of quickAccessRecentEntities; track entity.ID) {\n <div class=\"qa-item\" (click)=\"onEntitySelected(entity)\">\n <div class=\"qa-item-icon\">\n <i [class]=\"getEntityIcon(entity)\"></i>\n </div>\n <div class=\"qa-item-info\">\n <div class=\"qa-item-name\">{{ entity.DisplayNameOrName }}</div>\n </div>\n </div>\n }\n @if (quickAccessRecentEntities.length === 0) {\n <div class=\"qa-empty\">No recent entities</div>\n }\n </mj-accordion-panel>\n\n <!-- Favorite Records (max 3) -->\n <mj-accordion-panel [Expanded]=\"isQuickAccessSectionExpanded('favoriteRecords')\" (ExpandedChange)=\"toggleQuickAccessSection('favoriteRecords')\">\n <ng-template mjAccordionTitle>\n <i class=\"fa-solid fa-star qa-section-icon\" style=\"color: var(--mj-status-warning);\"></i>\n <span>Favorite Records</span>\n <span class=\"mj-accordion-badge mj-accordion-badge--right\">{{ quickAccessFavoriteRecords.length }}</span>\n </ng-template>\n @for (record of quickAccessFavoriteRecords; track record.userFavoriteId) {\n <div class=\"qa-item\" (click)=\"onFavoriteRecordClick(record)\">\n <div class=\"qa-item-icon\">\n <i [class]=\"getEntityIconById(record.entityId)\"></i>\n </div>\n <div class=\"qa-item-info\">\n <div class=\"qa-item-name\">{{ record.recordName || record.recordId }}</div>\n <div class=\"qa-item-meta\">{{ record.entityName }}</div>\n </div>\n </div>\n }\n @if (quickAccessFavoriteRecords.length === 0) {\n <div class=\"qa-empty\">No favorite records</div>\n }\n </mj-accordion-panel>\n </div>\n </div>\n }\n </div>\n } @else {\n <!--\n mj-view-workspace owns the saved-view lifecycle (select / save / duplicate / rename /\n delete / revert / quick-save) and the inner data renderer. Every view type is now a\n self-contained plug-in: view-type-specific features (export / add-to-list / delete /\n grid-state / timeline + map controls) live INSIDE the plug-in renderers and no longer\n bubble through the workspace. The dashboard only handles navigation (open record / open\n related record / create new record) + the generic filter/data-load/count signals + URL\n and view-CRUD state sync. AutoSaveView=true → the workspace persists view CRUD itself.\n -->\n <mj-view-workspace\n [Entity]=\"selectedEntity\"\n [AutoSaveView]=\"true\"\n [SelectedView]=\"selectedViewEntity\"\n [FilterText]=\"debouncedFilterText\"\n [SelectedRecordId]=\"state.selectedRecordId\"\n [ViewerConfig]=\"viewerConfig\"\n (SelectedViewChange)=\"onWorkspaceViewSelected($event)\"\n (ViewSelected)=\"onWorkspaceViewSelected($event)\"\n (OpenViewInTabRequested)=\"onOpenInTabRequested($event)\"\n (OpenRecordRequested)=\"onWorkspaceOpenRecord($event)\"\n (OpenRelatedRecordRequested)=\"onOpenRelatedRecordRequested($event)\"\n (CreateNewRecordRequested)=\"onCreateNewRecordRequested($event)\"\n (RecordSelected)=\"onViewerRecordSelected($event)\"\n (AfterViewSave)=\"onWorkspaceViewSaved()\"\n (AfterViewDelete)=\"onWorkspaceViewSaved()\"\n (FilterTextChanged)=\"onFilterTextChanged($event)\"\n (DataLoaded)=\"onDataLoaded($event)\"\n (FilteredCountChanged)=\"onFilteredCountChanged($event)\">\n </mj-view-workspace>\n }\n </div>\n </div>\n\n <!-- Detail Panel (Right - Slide In) -->\n @if (state.detailPanelOpen && selectedRecord) {\n <div class=\"detail-panel\" [style.width.px]=\"state.detailPanelWidth\">\n <mj-entity-record-detail-panel\n [entity]=\"detailPanelEntity\"\n [record]=\"selectedRecord\"\n (close)=\"onDetailPanelClosed()\"\n (openRecord)=\"onOpenRecord($event)\"\n (navigateToRelated)=\"onNavigateToRelated($event)\"\n (openRelatedRecord)=\"onOpenRelatedRecord($event)\"\n (openForeignKeyRecord)=\"onOpenForeignKeyRecord($event)\">\n </mj-entity-record-detail-panel>\n </div>\n }\n\n <!-- View config panel, filter dialog, quick-save/duplicate/shared-view-warning dialogs\n now live inside mj-view-workspace (the saved-view lifecycle moved there).\n Export + Add-to-List dialogs now live inside the grid plug-in renderer (it hosts its own\n Generic dialogs), so they are no longer rendered at the dashboard level. -->\n</div>\n"]}
1
+ {"version":3,"file":"data-explorer-dashboard.component.js","sourceRoot":"","sources":["../../src/DataExplorer/data-explorer-dashboard.component.ts","../../src/DataExplorer/data-explorer-dashboard.component.html"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAuD,KAAK,EAAE,MAAM,EAAE,YAAY,EAA4B,YA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ViewInit, ChangeDetectorRef, Input, Output, EventEmitter, OnChanges, SimpleChanges, HostListener, ElementRef, ViewChild, NgZone } from '@angular/core';\n\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { Subject } from 'rxjs';\nimport { takeUntil, debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { BaseDashboard, NavigationService } from '@memberjunction/ng-shared';\nimport { RecentAccessService } from '@memberjunction/ng-shared-generic';\nimport { RegisterClass , UUIDsEqual } from '@memberjunction/global';\nimport { EntityInfo, RunView, EntityFieldTSType, ApplicationInfo } from '@memberjunction/core';\n// CompositeKey is used via buildCompositeKey from ng-entity-viewer\nimport { MJApplicationEntityEntity, ResourceData, UserInfoEngine } from '@memberjunction/core-entities';\nimport {\n RecordSelectedEvent,\n RecordOpenedEvent,\n DataLoadedEvent,\n FilteredCountChangedEvent,\n EntityViewerConfig,\n NavigateToRelatedEvent,\n ViewWorkspaceComponent,\n ViewRelatedRecordNavigation,\n buildCompositeKey,\n buildPkString\n} from '@memberjunction/ng-entity-viewer';\nimport { MJUserViewEntityExtended, UserViewEngine } from '@memberjunction/core-entities';\nimport { ExplorerStateService } from './services/explorer-state.service';\nimport { DataExplorerState, DataExplorerFilter, BreadcrumbItem, DataExplorerDeepLink, RecentRecordAccess, FavoriteRecord, AppEntityGroup, DataExplorerViewMode } from './models/explorer-state.interface';\nimport { OpenRecordEvent, SelectRecordEvent } from './components/navigation-panel/navigation-panel.component';\nimport { DisplaySimpleNotificationRequestData, MJEventType, MJGlobal } from '@memberjunction/global';\nimport { buildDataExplorerAgentContext, isValidViewMode, isValidEntityBrowserMode, AppGroupSummary, entityDisplayName, resolveEntityByName, resolveRecordSelection, RecordSelectionRequest } from './data-explorer-agent-context';\nimport { validateStringParam, validateEnumParam, validateNonNegativeNumberParam, VALID_ENTITY_BROWSER_MODES_FOR_VALIDATION } from '../shared/agent-tool-validation';\n\n/**\n * Default server-side page size used by the inner entity viewer when {@link viewerConfig}\n * doesn't override `pageSize`. Mirrors the viewer's own default (EntityViewerComponent),\n * and is used to derive the agent-reported total page count.\n */\nconst DATA_EXPLORER_DEFAULT_PAGE_SIZE = 100;\n\n/**\n * Data Explorer Dashboard - Power user interface for exploring data across entities\n * Combines card-based browsing with grid views and relationship visualization\n *\n * Uses mj-entity-viewer composite component for the main content area,\n * which handles data loading, filtering, and view mode switching.\n */\n@Component({\n standalone: false,\n selector: 'mj-data-explorer-dashboard',\n templateUrl: './data-explorer-dashboard.component.html',\n styleUrls: ['./data-explorer-dashboard.component.css'],\n animations: [\n trigger('slideInLeft', [\n transition(':enter', [\n style({ transform: 'translateX(-100%)', opacity: 0 }),\n animate('200ms ease-out', style({ transform: 'translateX(0)', opacity: 1 }))\n ]),\n transition(':leave', [\n animate('200ms ease-in', style({ transform: 'translateX(-100%)', opacity: 0 }))\n ])\n ])\n ]\n})\n@RegisterClass(BaseDashboard, 'DataExplorer')\nexport class DataExplorerDashboardComponent extends BaseDashboard implements OnInit, OnDestroy, OnChanges, AfterViewInit {\n protected override destroy$ = new Subject<void>();\n private metadata = this.ProviderToUse;\n\n /** Reference to the filter input for keyboard shortcuts */\n @ViewChild('filterInput') filterInputRef: ElementRef<HTMLInputElement> | undefined;\n\n /** Reference to the view workspace (owns view CRUD + the inner data renderer) */\n @ViewChild(ViewWorkspaceComponent) viewWorkspaceRef: ViewWorkspaceComponent | undefined;\n\n /**\n * Optional filter to constrain which entities are shown in the explorer.\n * Can filter by applicationId, schemaNames, or explicit entityNames.\n */\n @Input() entityFilter: DataExplorerFilter | null = null;\n\n /**\n * Optional deep link to navigate to a specific entity/record on load.\n * Parsed from URL query parameters (e.g., ?entity=Users&record=123)\n */\n @Input() deepLink: DataExplorerDeepLink | null = null;\n\n /**\n * Optional context name to display in the header instead of \"Data Explorer\".\n * Use this to customize the explorer for specific applications (e.g., \"CRM\", \"Association Demo\").\n */\n @Input() contextName: string | null = null;\n\n /**\n * Optional context icon (Font Awesome class) to display in the header.\n * Use this alongside contextName for a fully customized header (e.g., \"fa-solid fa-users\" for CRM).\n */\n @Input() contextIcon: string | null = null;\n\n /**\n * Initial query params forwarded from the resource wrapper.\n * On hard refresh, the shell delivers params to the wrapper (which has Data.Configuration.queryParams),\n * not to this inner dashboard component. This input bridges that gap.\n */\n @Input() initialQueryParams: Record<string, string> = {};\n\n /**\n * Emitted when the display title should change (entity selected, record opened, etc.)\n */\n @Output() DisplayNameChanged = new EventEmitter<string>();\n\n // State\n public state: DataExplorerState;\n\n // Entity data - all entities available to the user\n private allEntities: EntityInfo[] = [];\n // Filtered entities based on entityFilter\n public entities: EntityInfo[] = [];\n // Application entity groups for the home view (Concept D)\n public appEntityGroups: AppEntityGroup[] = [];\n // Entity IDs for the current application (loaded when applicationId filter is set)\n private applicationEntityIds: Set<string> = new Set();\n public selectedEntity: EntityInfo | null = null;\n\n // Record counts (updated by mj-entity-viewer)\n public totalRecordCount = 0;\n public filteredRecordCount = 0;\n\n // Selected record for detail panel\n public selectedRecord: Record<string, unknown> | null = null;\n // Entity info for the detail panel (may differ from selectedEntity when viewing FK/related records)\n public detailPanelEntity: EntityInfo | null = null;\n // Currently loaded records from mj-entity-viewer (for back/forward navigation lookup)\n private loadedRecords: Record<string, unknown>[] = [];\n\n // Currently selected view entity (for view data loading)\n public selectedViewEntity: MJUserViewEntityExtended | null = null;\n\n // Live filter text (what the user sees in the input, updates immediately)\n public liveFilterText: string = '';\n // Debounced filter text (synced with mj-entity-viewer, updates after delay)\n public debouncedFilterText: string = '';\n private filterInput$ = new Subject<string>();\n\n // Entity filter text for home screen\n public entityFilterText: string = '';\n\n // Breadcrumbs for navigation display\n public breadcrumbs: BreadcrumbItem[] = [];\n\n // Loading state for entities\n public isLoadingEntities: boolean = true;\n\n // Recent records from User Record Logs\n public recentRecords: RecentRecordAccess[] = [];\n\n // Timer that refreshes the pre-computed relative-time labels on recentRecords (see refreshRecentRecordTimes / NG0100 note)\n private recentTimeRefreshTimer: ReturnType<typeof setInterval> | null = null;\n\n // Favorite records from User Favorites (non-entity favorites)\n public favoriteRecords: FavoriteRecord[] = [];\n\n // Loading state for home screen sections\n public isLoadingRecentRecords: boolean = true;\n\n // Entity filter for recent records (null = show all, string = filter by entityId)\n public recentRecordsEntityFilter: string | null = null;\n\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n return \"Data Explorer\"\n }\n\n // ========================================\n // Concept D: Application Groups + Search-First\n // ========================================\n\n /**\n * Get app entity groups filtered by current entityFilterText and homeViewMode.\n * When searching, auto-expands groups that contain matches.\n */\n get filteredAppEntityGroups(): AppEntityGroup[] {\n const filterText = this.entityFilterText.toLowerCase().trim();\n const showFavoritesOnly = this.state.homeViewMode === 'favorites';\n\n return this.appEntityGroups\n .map(group => this.filterGroupEntities(group, filterText, showFavoritesOnly))\n .filter(group => group.entities.length > 0);\n }\n\n /**\n * Filter a single group's entities by text and favorites mode.\n * Returns a new group with filtered entities and auto-expansion when searching.\n */\n private filterGroupEntities(\n group: AppEntityGroup,\n filterText: string,\n showFavoritesOnly: boolean\n ): AppEntityGroup {\n let filtered = group.entities;\n\n if (showFavoritesOnly) {\n filtered = filtered.filter(e => this.isEntityFavorited(e));\n }\n\n if (filterText) {\n filtered = filtered.filter(e =>\n e.Name.toLowerCase().includes(filterText) ||\n e.DisplayNameOrName.toLowerCase().includes(filterText) ||\n (e.Description && e.Description.toLowerCase().includes(filterText))\n );\n }\n\n return {\n ...group,\n entities: filtered,\n isExpanded: filterText ? true : group.isExpanded\n };\n }\n\n /**\n * Get a flat filtered entity list for single-application mode.\n * Used when entityFilter.applicationId is set, bypassing app grouping.\n */\n get flatFilteredEntities(): EntityInfo[] {\n let result = this.entities;\n\n if (this.state.homeViewMode === 'favorites') {\n result = result.filter(e => this.isEntityFavorited(e));\n }\n\n const filterText = this.entityFilterText.toLowerCase().trim();\n if (filterText) {\n result = result.filter(e =>\n e.Name.toLowerCase().includes(filterText) ||\n e.DisplayNameOrName.toLowerCase().includes(filterText) ||\n (e.Description && e.Description.toLowerCase().includes(filterText))\n );\n }\n\n return result;\n }\n\n /**\n * Total count of entities matching current filters (across all groups or flat list)\n */\n get filteredEntityCount(): number {\n if (this.entityFilter?.applicationId) {\n return this.flatFilteredEntities.length;\n }\n return this.filteredAppEntityGroups.reduce((sum, g) => sum + g.entities.length, 0);\n }\n\n /** No-results message for the entity list (echoes the filter text). */\n get NoEntityResultsMessage(): string {\n return `No entities match \"${this.entityFilterText}\".`;\n }\n\n /**\n * Count of applications that have at least one visible entity\n */\n get applicationCount(): number {\n return this.appEntityGroups.filter(g => g.entities.length > 0).length;\n }\n\n /**\n * Get recent entities for home screen display (max 5)\n */\n get recentEntities(): EntityInfo[] {\n return this.state.recentEntityAccesses\n .slice(0, 5)\n .map(r => this.entities.find(e => UUIDsEqual(e.ID, r.entityId)))\n .filter((e): e is EntityInfo => e !== undefined);\n }\n\n /**\n * Get favorite entities for home screen display\n */\n get favoriteEntities(): EntityInfo[] {\n return this.state.favoriteEntities\n .map(f => this.entities.find(e => UUIDsEqual(e.ID, f.entityId)))\n .filter((e): e is EntityInfo => e !== undefined);\n }\n\n /**\n * Recent records limited to 3 for the quick access panel\n */\n get quickAccessRecentRecords(): RecentRecordAccess[] {\n return this.recentRecords.slice(0, 3);\n }\n\n /**\n * Recent entities limited to 3 for the quick access panel\n */\n get quickAccessRecentEntities(): EntityInfo[] {\n return this.recentEntities.slice(0, 3);\n }\n\n /**\n * Favorite records limited to 3 for the quick access panel\n */\n get quickAccessFavoriteRecords(): FavoriteRecord[] {\n return this.favoriteRecords.slice(0, 3);\n }\n\n /**\n * Check if a quick access section is expanded\n */\n public isQuickAccessSectionExpanded(sectionId: string): boolean {\n return this.state.quickAccessSections[sectionId] !== false;\n }\n\n /**\n * Get unique entities from recent records for the filter strip.\n * Returns up to 5 entities, sorted by frequency in the recent records.\n */\n get uniqueRecentRecordEntities(): { entityId: string; entityName: string; icon: string; count: number }[] {\n const entityCounts = new Map<string, { entityId: string; entityName: string; count: number }>();\n\n for (const record of this.recentRecords) {\n const existing = entityCounts.get(record.entityId);\n if (existing) {\n existing.count++;\n } else {\n entityCounts.set(record.entityId, {\n entityId: record.entityId,\n entityName: record.entityName,\n count: 1\n });\n }\n }\n\n // Convert to array, sort by count (descending), take first 5\n return Array.from(entityCounts.values())\n .sort((a, b) => b.count - a.count)\n .slice(0, 5)\n .map(e => ({\n ...e,\n icon: this.getEntityIconById(e.entityId)\n }));\n }\n\n /**\n * Check if we should show the entity filter strip for recent records.\n * Only show when there are 2+ unique entities.\n */\n get showRecentRecordsEntityFilter(): boolean {\n return this.uniqueRecentRecordEntities.length >= 2;\n }\n\n /**\n * Get filtered recent records based on entity filter.\n */\n get filteredRecentRecords(): RecentRecordAccess[] {\n if (!this.recentRecordsEntityFilter) {\n return this.recentRecords;\n }\n return this.recentRecords.filter(r => r.entityId === this.recentRecordsEntityFilter);\n }\n\n /**\n * Set the entity filter for recent records\n */\n public setRecentRecordsEntityFilter(entityId: string | null): void {\n this.recentRecordsEntityFilter = entityId;\n }\n\n /**\n * Get the display title for the header.\n * Priority: contextName > entityFilter.applicationName > \"Data Explorer\"\n */\n get displayTitle(): string {\n return this.contextName || this.entityFilter?.applicationName || 'Data Explorer';\n }\n\n /**\n * Get the display icon for the header (when at home level).\n * Returns contextIcon if provided, otherwise null.\n */\n get displayIcon(): string | null {\n return this.contextIcon;\n }\n\n /**\n * Configuration for mj-entity-viewer composite component\n * Hides the built-in header since we have a custom header in the dashboard\n * Uses server-side pagination with 100 records per page (default)\n */\n public viewerConfig: Partial<EntityViewerConfig> = {\n showFilter: false, // We have our own filter in the dashboard header\n showViewModeToggle: true, // Use the viewer's metadata-driven view-type dropdown (no legacy header toggle)\n showRecordCount: false, // We show count in the dashboard header\n showPagination: true, // Show the pagination UI with \"Load More\" button\n serverSideFiltering: true, // Use RunView's UserSearchString for filtering\n serverSideSorting: true, // Use RunView's OrderBy for sorting\n height: '100%'\n };\n\n constructor(\n public stateService: ExplorerStateService,\n private cdr: ChangeDetectorRef,\n private recentAccessService: RecentAccessService,\n private ngZone: NgZone\n ) {\n super();\n this.state = this.stateService.CurrentState;\n }\n\n async ngOnInit(): Promise<void> {\n super.ngOnInit();\n try {\n // Ensure UserInfoEngine is configured before we try to access user settings\n // This prevents race conditions where we try to load default view settings\n // before the user settings have been loaded from the server\n await UserInfoEngine.Instance.Config(false);\n\n // Read initial query params — prefer params forwarded from the resource wrapper\n // (which has Data.Configuration.queryParams from the shell), then fall back to\n // this component's own GetQueryParams() for cases where the dashboard is used standalone.\n const wrapperParams = this.initialQueryParams && Object.keys(this.initialQueryParams).length > 0\n ? this.initialQueryParams\n : null;\n const ownParams = this.GetQueryParams();\n const rawParams = wrapperParams || (Object.keys(ownParams).length > 0 ? ownParams : {});\n\n const urlState = this.buildDeepLinkFromParams(rawParams);\n\n // Set context for state service (enables context-specific settings)\n this.stateService.Provider = this.ProviderToUse;\n await this.stateService.setContext(this.entityFilter);\n this.state = this.stateService.CurrentState;\n\n // User search text starts empty - it's separate from smart filter\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n\n // Load available entities (async to support applicationId filter)\n // Pass urlState so we don't restore persisted entity if URL specifies one\n await this.loadEntities(urlState);\n\n // Apply URL state after entities are loaded\n if (urlState) {\n await this.applyUrlState(urlState);\n } else if (this.deepLink) {\n await this.applyDeepLink(this.deepLink);\n }\n\n // Subscribe to state changes\n this.stateService.State\n .pipe(takeUntil(this.destroy$))\n .subscribe(state => {\n const entityChanged = state.selectedEntityName !== this.state.selectedEntityName;\n\n this.state = state;\n\n // When entity changes, clear user search text and update title\n if (entityChanged) {\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n this.emitDisplayName();\n }\n\n this.onStateChanged();\n\n // Update URL query params to reflect current state (for deep linking)\n this.pushCurrentStateToUrl();\n\n // Keep the AI agent's view of this surface in sync with every state change\n // (entity selection, view mode, filter, record selection, detail panel, etc.).\n this.publishAgentContext();\n\n // Re-scope the agent's client tools to the current mode (entity-browser vs\n // record-view). Cheap: the guard inside only re-registers on the home↔entity flip.\n this.syncAgentToolsForMode();\n\n this.cdr.detectChanges();\n });\n\n // Subscribe to breadcrumb changes\n this.stateService.Breadcrumbs\n .pipe(takeUntil(this.destroy$))\n .subscribe(breadcrumbs => {\n this.breadcrumbs = breadcrumbs;\n this.cdr.detectChanges();\n });\n\n // Setup debounced filter - 500ms delay allows comfortable typing before triggering search\n // IMPORTANT: Do NOT call setSmartFilterPrompt here. Updating the state service triggers\n // URL updates (via pushCurrentStateToUrl → UpdateQueryParams), which in turn can trigger\n // OnQueryParamsChanged, which would clear the filter text. The debouncedFilterText flows\n // directly to the entity-viewer via [filterText] binding — no state service involvement needed.\n this.filterInput$\n .pipe(\n debounceTime(500),\n distinctUntilChanged(),\n takeUntil(this.destroy$)\n )\n .subscribe(filterText => {\n this.debouncedFilterText = filterText;\n this.cdr.detectChanges();\n });\n\n // Subscribe to recent records changes\n this.stateService.RecentRecords\n .pipe(takeUntil(this.destroy$))\n .subscribe(records => {\n this.recentRecords = records;\n this.refreshRecentRecordTimes(); // pre-compute the \"N ago\" labels off the CD path (see NG0100 note)\n this.isLoadingRecentRecords = false;\n this.cdr.detectChanges();\n });\n\n // Refresh the pre-computed relative-time labels on a timer so \"Just now\" ages into \"1m ago\"\n // etc. without the template ever computing time during change detection. Updating the stored\n // field + running detectChanges here (rather than calling a Date.now()-based method from the\n // template binding) is what prevents the ExpressionChangedAfterItHasBeenCheckedError (NG0100).\n this.recentTimeRefreshTimer = setInterval(() => {\n if (this.recentRecords.length > 0) {\n this.refreshRecentRecordTimes();\n this.cdr.detectChanges();\n }\n }, 30000);\n\n // Subscribe to favorite records changes\n this.stateService.FavoriteRecords\n .pipe(takeUntil(this.destroy$))\n .subscribe(records => {\n this.favoriteRecords = records;\n this.cdr.detectChanges();\n });\n\n // Push initial state to URL (covers deepLink and persisted state)\n this.pushCurrentStateToUrl();\n } catch (err) {\n // Never let a setup failure hang the app loading screen — log it and still signal completion.\n console.error('[DataExplorer] ngOnInit setup failed (signaling load complete anyway):', err);\n } finally {\n // ALWAYS notify load complete — the loading screen waits on this; a thrown/awaited error before\n // it would otherwise hang the screen forever on a direct-URL (deep-link) refresh.\n this.NotifyLoadComplete();\n }\n }\n\n /**\n * After the view initializes, publish the initial agent context and register the\n * mode-scoped client tools the AI agent can invoke against this surface (the initial\n * mode is 'home' until an entity is selected). The ongoing context re-emit and tool\n * re-scoping both happen in the state subscription set up in {@link ngOnInit}.\n */\n ngAfterViewInit(): void {\n this.publishAgentContext();\n this.syncAgentToolsForMode();\n }\n\n // ========================================\n // AI AGENT CONTEXT & CLIENT TOOLS\n // ========================================\n\n /**\n * Publish the current Data Explorer state to the AI agent via NavigationService.\n *\n * When an entity is selected this reports the record-browsing surface\n * (SelectedEntityName, ViewMode, ActiveViewId, FilterText, Total/Filtered record\n * counts, SelectedRecordName, DetailPanelOpen). At the home level it instead reports\n * the entity-browsing surface (HomeViewMode, EntitySearchText, VisibleEntityCount).\n * The shaping lives in the pure {@link buildDataExplorerAgentContext} helper so it\n * stays unit-testable. Called on init and on every state change.\n */\n private publishAgentContext(): void {\n const accessibleViews = this.getAccessibleViewsForSelectedEntity();\n const gridState = this.viewWorkspaceRef?.GetGridState() ?? null;\n const context = buildDataExplorerAgentContext({\n SelectedEntityName: this.selectedEntity?.Name ?? null,\n ViewMode: this.state.viewMode,\n AvailableViewTypes: this.getAvailableViewTypesForSelectedEntity(),\n ActiveViewId: this.state.selectedViewId,\n ActiveViewName: this.resolveActiveViewName(accessibleViews),\n AvailableViewNames: accessibleViews.map(v => v.Name),\n VisibleColumnNames: this.getVisibleColumnNames(),\n FilterText: this.debouncedFilterText,\n TotalRecordCount: this.totalRecordCount,\n FilteredRecordCount: this.filteredRecordCount,\n PageSize: this.getEffectivePageSize(),\n CurrentPage: gridState?.CurrentPage ?? null,\n TotalPages: gridState?.TotalPages ?? null,\n SortColumn: gridState?.Sort?.field ?? null,\n SortDirection: this.normalizeSortDirection(gridState?.Sort?.direction ?? null),\n RelatedEntityNames: this.getRelatedEntityNames(),\n SelectedRecordName: this.state.selectedRecordName,\n DetailPanelOpen: this.state.detailPanelOpen,\n VisibleRecordNames: this.getVisibleRecordNames(),\n LoadedRecordCount: this.loadedRecords.length,\n HomeViewMode: this.state.homeViewMode,\n EntitySearchText: this.entityFilterText,\n VisibleEntityCount: this.filteredEntityCount,\n FavoriteEntityCount: this.state.favoriteEntities.length,\n // Publish the DISPLAY names the user sees on the entity cards (the \"MJ: \" prefix\n // stripped / DisplayName), so the agent passes back what the user actually says.\n AvailableEntityNames: this.entities.map(e => entityDisplayName(e.Name, e.DisplayName)),\n AppGroups: this.getAgentAppGroupSummaries(),\n });\n this.navigationService.SetAgentContext(this, context);\n }\n\n /**\n * Normalize the grid's SortDirection (`'asc' | 'desc' | null`) for the agent context.\n * The viewer can carry a null direction as \"unsorted\"; we only report 'asc'/'desc'.\n */\n private normalizeSortDirection(dir: 'asc' | 'desc' | null): 'asc' | 'desc' | null {\n return dir === 'asc' || dir === 'desc' ? dir : null;\n }\n\n /**\n * Names of the entities related to the selected entity, read straight from in-memory\n * {@link EntityInfo.RelatedEntities} metadata (no lookup). Bounded to a sane number so the\n * streamed context stays small; the context helper bounds it again. Returns [] at the home level.\n */\n private getRelatedEntityNames(): string[] {\n const entity = this.selectedEntity;\n if (!entity) {\n return [];\n }\n const seen = new Set<string>();\n const names: string[] = [];\n for (const r of entity.RelatedEntities) {\n const name = r.RelatedEntity;\n if (name && !seen.has(name)) {\n seen.add(name);\n names.push(name);\n }\n }\n return names;\n }\n\n /**\n * Display values of the records currently loaded in the grid (from {@link loadedRecords}),\n * in grid order, using the same name-field logic the detail panel / state use\n * ({@link getRecordDisplayName}). Drives the agent's VisibleRecordNames context and the\n * SelectRecord tool. Returns [] when no entity is selected or nothing is loaded.\n */\n private getVisibleRecordNames(): string[] {\n if (!this.selectedEntity || this.loadedRecords.length === 0) {\n return [];\n }\n return this.loadedRecords.map(r => this.getRecordDisplayName(r));\n }\n\n /**\n * Resolve an agent-supplied entity reference to one of the available entities, matching\n * the way the user names things (display name with the \"MJ: \" prefix stripped, e.g.\n * \"ML Models\" → \"MJ: ML Models\"). Delegates to the pure {@link resolveEntityByName} helper.\n */\n private resolveEntityByName(input: string): EntityInfo | null {\n return resolveEntityByName(input, this.entities);\n }\n\n /**\n * The record-view modes the CURRENT entity actually supports. Mirrors the gating in\n * {@link reconcileViewModeForEntity}: 'grid' and 'cards' are always available; 'timeline'\n * requires at least one Date field; 'map' requires geocoding support. Returns [] at the\n * home level. Read straight from in-memory {@link EntityInfo} metadata (no lookup).\n */\n private getAvailableViewTypesForSelectedEntity(): DataExplorerViewMode[] {\n const entity = this.selectedEntity;\n if (!entity) {\n return [];\n }\n const modes: DataExplorerViewMode[] = ['grid', 'cards'];\n if (entity.Fields.some(f => f.TSType === EntityFieldTSType.Date)) {\n modes.push('timeline');\n }\n if (entity.SupportsGeoCoding) {\n modes.push('map');\n }\n return modes;\n }\n\n /**\n * The grid's server-side page size. The dashboard forwards {@link viewerConfig} to the inner\n * viewer; when it doesn't set `pageSize` the viewer's default (100) applies. We surface that\n * effective value so the agent can derive total pages from the record counts.\n */\n private getEffectivePageSize(): number {\n return this.viewerConfig.pageSize ?? DATA_EXPLORER_DEFAULT_PAGE_SIZE;\n }\n\n /**\n * Summaries of the application groups currently shown on the home-screen entity browser\n * (name, visible-entity count, expanded flag). Reuses the same filtered grouping the UI\n * renders ({@link filteredAppEntityGroups}), so the agent sees exactly what the user sees.\n * Returns [] when scoped to a single application (no grouping).\n */\n private getAgentAppGroupSummaries(): AppGroupSummary[] {\n if (this.entityFilter?.applicationId) {\n return [];\n }\n return this.filteredAppEntityGroups.map(g => ({\n Name: g.applicationName,\n EntityCount: g.entities.length,\n Expanded: g.isExpanded,\n }));\n }\n\n /**\n * Saved views accessible to the current user for the selected entity, read from the\n * already-loaded {@link UserViewEngine} cache (no new RunView). Returns [] at the home\n * level. The engine's cache is populated lazily elsewhere (e.g. {@link restoreViewFromUrl}\n * and the view workspace); if it hasn't loaded yet this returns [] and the next state\n * change re-publishes once it has.\n */\n private getAccessibleViewsForSelectedEntity(): MJUserViewEntityExtended[] {\n if (!this.selectedEntity) {\n return [];\n }\n return UserViewEngine.Instance.GetAccessibleViewsForEntity(this.selectedEntity.ID);\n }\n\n /**\n * Resolve the display name for the active view id. Prefers the live\n * {@link selectedViewEntity}, then the accessible-views list, then the engine cache.\n */\n private resolveActiveViewName(accessibleViews: MJUserViewEntityExtended[]): string | null {\n const activeId = this.state.selectedViewId;\n if (!activeId) {\n return null;\n }\n if (this.selectedViewEntity && UUIDsEqual(this.selectedViewEntity.ID, activeId)) {\n return this.selectedViewEntity.Name;\n }\n const fromList = accessibleViews.find(v => UUIDsEqual(v.ID, activeId));\n if (fromList) {\n return fromList.Name;\n }\n return UserViewEngine.Instance.GetViewById(activeId)?.Name ?? null;\n }\n\n /**\n * Column/field names visible in the grid for the selected entity — the entity's\n * default-in-view fields, read straight from in-memory {@link EntityInfo} metadata\n * (no lookup). Falls back to all fields when none are flagged for view display.\n * Returns [] at the home level.\n */\n private getVisibleColumnNames(): string[] {\n if (!this.selectedEntity) {\n return [];\n }\n const inViewFields = this.selectedEntity.Fields.filter(f => f.DefaultInView);\n const fields = inViewFields.length > 0 ? inViewFields : this.selectedEntity.Fields;\n return fields.map(f => f.DisplayNameOrName);\n }\n\n /**\n * Tracks which tool set was last registered with the NavigationService, so the\n * mode-scoped re-registration ({@link syncAgentToolsForMode}) only fires on the\n * home↔entity transition rather than on every state change.\n */\n private lastRegisteredToolMode: 'home' | 'entity' | null = null;\n\n /**\n * Re-scope the agent's client tools to the CURRENT mode. The Data Explorer has two\n * surfaces with very different affordances:\n * - 'home' (no entity selected): the entity browser — browse/search entities, favorites,\n * application groups.\n * - 'entity' (an entity is selected): the record view — views, view types, filter, sort,\n * paginate, open record, export, view properties.\n *\n * We register the COMMON tools plus exactly one mode's tools, so a browser-only tool is\n * never exposed in record-view mode and vice-versa. Because {@link publishAgentContext}\n * fires on every state change but the tool set only changes on the mode flip, this guards\n * on {@link lastRegisteredToolMode} and only calls into NavigationService when the mode\n * actually changes.\n */\n private syncAgentToolsForMode(): void {\n const mode: 'home' | 'entity' = this.selectedEntity ? 'entity' : 'home';\n if (mode === this.lastRegisteredToolMode) {\n return;\n }\n this.lastRegisteredToolMode = mode;\n this.navigationService.SetAgentClientTools(this, [\n ...this.buildCommonTools(),\n ...(mode === 'home' ? this.buildEntityBrowserTools() : this.buildRecordViewTools()),\n ]);\n }\n\n /** The tool-definition shape the NavigationService accepts. */\n private buildAgentTool(\n name: string,\n description: string,\n parameterSchema: Record<string, unknown>,\n handler: (params: Record<string, unknown>) => Promise<unknown>,\n ): { Name: string; Description: string; ParameterSchema: Record<string, unknown>; Handler: (params: Record<string, unknown>) => Promise<unknown> } {\n return { Name: name, Description: description, ParameterSchema: parameterSchema, Handler: handler };\n }\n\n /**\n * COMMON tools — available in BOTH modes. Currently just {@link BackToEntityBrowser},\n * which deselects the current entity and returns to the entity browser (the home screen).\n */\n private buildCommonTools(): Array<ReturnType<DataExplorerDashboardComponent['buildAgentTool']>> {\n return [\n this.buildAgentTool(\n 'BackToEntityBrowser',\n 'Deselect the current entity and return to the entity browser (home screen) where the user can pick a different entity.',\n { type: 'object', properties: {} },\n async () => this.toolBackToEntityBrowser(),\n ),\n ];\n }\n\n /**\n * ENTITY-BROWSER tools — only registered at the home level (no entity selected).\n * Browse/search entities, manage favorites, expand/collapse application groups.\n */\n private buildEntityBrowserTools(): Array<ReturnType<DataExplorerDashboardComponent['buildAgentTool']>> {\n return [\n this.buildAgentTool(\n 'OpenEntityData',\n 'Open and load data for an entity by its name. Pass the display name the user says (e.g. \"AI Models\", \"ML Models\", \"Users\") exactly as it appears on the entity cards — the tool resolves it even though the full entity name may carry an \"MJ: \" prefix (e.g. \"MJ: ML Models\").',\n { type: 'object', properties: { entityName: { type: 'string' } }, required: ['entityName'] },\n async (params) => this.toolOpenEntityData(params),\n ),\n this.buildAgentTool(\n 'OpenEntity',\n 'Open and load data for an entity by its name (alias of OpenEntityData). Pass the display name the user says (e.g. \"AI Models\", \"ML Models\") — the tool resolves the \"MJ: \" prefix.',\n { type: 'object', properties: { entityName: { type: 'string' } }, required: ['entityName'] },\n async (params) => this.toolOpenEntityData(params),\n ),\n this.buildAgentTool(\n 'SearchEntities',\n 'Type into the home-screen entity-search box to filter the list of available entities by name/description.',\n { type: 'object', properties: { query: { type: 'string' } }, required: ['query'] },\n async (params) => this.toolSearchEntities(params),\n ),\n this.buildAgentTool(\n 'SetEntityBrowserMode',\n 'Switch the home-screen entity browser between showing all entities and favorites only. Valid modes: all, favorites.',\n { type: 'object', properties: { mode: { type: 'string' } }, required: ['mode'] },\n async (params) => this.toolSetEntityBrowserMode(params),\n ),\n this.buildAgentTool(\n 'ToggleEntityFavorite',\n \"Add or remove an entity from the user's favorites by entity name (reversible toggle). Pass the display name the user says (e.g. \\\"AI Models\\\") — the tool resolves the \\\"MJ: \\\" prefix.\",\n { type: 'object', properties: { entityName: { type: 'string' } }, required: ['entityName'] },\n async (params) => this.toolToggleEntityFavorite(params),\n ),\n this.buildAgentTool(\n 'ExpandAppGroup',\n 'Expand an application group in the home-screen entity browser by its application name (e.g. \"AI\", \"Admin\").',\n { type: 'object', properties: { appName: { type: 'string' } }, required: ['appName'] },\n async (params) => this.toolSetAppGroupExpanded(params, true),\n ),\n this.buildAgentTool(\n 'CollapseAppGroup',\n 'Collapse an application group in the home-screen entity browser by its application name (e.g. \"AI\", \"Admin\").',\n { type: 'object', properties: { appName: { type: 'string' } }, required: ['appName'] },\n async (params) => this.toolSetAppGroupExpanded(params, false),\n ),\n ];\n }\n\n /**\n * RECORD-VIEW tools — only registered when an entity is selected. Views, view types,\n * filter, sort, paginate, open/create record, navigate-to-related, export, view properties.\n */\n private buildRecordViewTools(): Array<ReturnType<DataExplorerDashboardComponent['buildAgentTool']>> {\n return [\n this.buildAgentTool(\n 'SelectView',\n 'Select a saved view for the current entity. Accepts either the view name (e.g. \"Active Accounts\", as listed in AvailableViews) or its view ID.',\n {\n type: 'object',\n properties: {\n view: { type: 'string', description: 'The view name or view ID to select.' },\n viewId: { type: 'string', description: 'Deprecated alias for \"view\" — the view ID.' },\n },\n },\n async (params) => this.toolSelectView(params),\n ),\n this.buildAgentTool(\n 'ChangeViewType',\n 'Change the record-view type for the selected entity. Valid types: grid, cards, timeline, map.',\n { type: 'object', properties: { type: { type: 'string' } }, required: ['type'] },\n async (params) => this.toolChangeViewType(params),\n ),\n this.buildAgentTool(\n 'SetViewMode',\n 'Set the record-view mode (alias of ChangeViewType). Valid modes: grid, cards, timeline, map.',\n { type: 'object', properties: { mode: { type: 'string' } }, required: ['mode'] },\n async (params) => this.toolSetViewMode(params),\n ),\n this.buildAgentTool(\n 'FilterRecords',\n 'Set the record filter for the current entity\\'s view via smart-filter text (a natural-language or simple search string applied to the grid).',\n { type: 'object', properties: { filterText: { type: 'string' } }, required: ['filterText'] },\n async (params) => this.toolFilterRecords(params),\n ),\n this.buildAgentTool(\n 'ClearRecordFilter',\n 'Clear the current record filter for the selected entity.',\n { type: 'object', properties: {} },\n async () => {\n this.clearRecordFilter();\n return { Success: true };\n },\n ),\n this.buildAgentTool(\n 'SelectRecord',\n 'Select a row in the current view (the equivalent of the user clicking a row): this highlights the row and opens its detail panel. Pick the row by position (\"first\", \"last\", or a 1-based index number) OR by name (matches a loaded record\\'s display value — see VisibleRecordNames, case-insensitive/contains). Compose with OpenRecord to then open the full form.',\n {\n type: 'object',\n properties: {\n position: { type: 'string', description: '\"first\", \"last\", or a 1-based index (a number is also accepted).' },\n name: { type: 'string', description: 'A loaded record display value to match (case-insensitive, contains).' },\n },\n },\n async (params) => this.toolSelectRecord(params),\n ),\n this.buildAgentTool(\n 'OpenRecord',\n 'Open the currently-selected record in its full record form.',\n { type: 'object', properties: {} },\n async () => this.toolOpenSelectedRecord(),\n ),\n this.buildAgentTool(\n 'CreateNewRecord',\n 'Open a new-record form for the currently-selected entity.',\n { type: 'object', properties: {} },\n async () => this.toolCreateNewRecord(),\n ),\n this.buildAgentTool(\n 'NavigateToRelated',\n 'Navigate to a related entity by name (see the RelatedEntities context field), optionally applying a SQL filter to show related records. Pass the display name the user says — the tool resolves the \"MJ: \" prefix.',\n {\n type: 'object',\n properties: { entityName: { type: 'string' }, filter: { type: 'string' } },\n required: ['entityName'],\n },\n async (params) => this.toolNavigateToRelated(params),\n ),\n this.buildAgentTool(\n 'ExportView',\n 'Export the current entity/view\\'s records to a file. Optional format: csv, excel, or json (defaults to excel).',\n { type: 'object', properties: { format: { type: 'string', description: 'csv | excel | json' } } },\n async (params) => this.toolExportView(params),\n ),\n this.buildAgentTool(\n 'OpenViewProperties',\n 'Open the view configuration / properties panel for the current entity\\'s view (the same panel as Cmd+,).',\n { type: 'object', properties: {} },\n async () => this.toolOpenViewProperties(),\n ),\n this.buildAgentTool(\n 'NextPage',\n 'Advance the record grid to the next page of results.',\n { type: 'object', properties: {} },\n async () => this.toolNextPage(),\n ),\n this.buildAgentTool(\n 'PreviousPage',\n 'Move the record grid to the previous page of results.',\n { type: 'object', properties: {} },\n async () => this.toolPreviousPage(),\n ),\n this.buildAgentTool(\n 'GoToPage',\n 'Jump the record grid to a specific 1-based page number.',\n { type: 'object', properties: { page: { type: 'number' } }, required: ['page'] },\n async (params) => this.toolGoToPage(params),\n ),\n this.buildAgentTool(\n 'SetPageSize',\n 'Set how many records load per page in the record grid (reloads from page 1).',\n { type: 'object', properties: { size: { type: 'number' } }, required: ['size'] },\n async (params) => this.toolSetPageSize(params),\n ),\n this.buildAgentTool(\n 'SetSort',\n 'Sort the record grid by a column. Provide the column field name and an optional direction (asc | desc, defaults to asc).',\n {\n type: 'object',\n properties: { column: { type: 'string' }, direction: { type: 'string', description: 'asc | desc' } },\n required: ['column'],\n },\n async (params) => this.toolSetSort(params),\n ),\n ];\n }\n\n /**\n * Build a tolerant \"entity not found\" error listing a few of the DISPLAY names the user\n * actually sees, so the agent can correct itself.\n */\n private entityNotFoundError(input: string): string {\n const sample = this.entities.slice(0, 6).map(e => entityDisplayName(e.Name, e.DisplayName)).join(', ');\n return `Entity \"${input}\" is not available in this explorer. Available entities include: ${sample || '(none)'}.`;\n }\n\n /** Resolve an entity by name and open its data. */\n private toolOpenEntityData(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n const entityName = String(params['entityName'] ?? '');\n const entity = this.resolveEntityByName(entityName);\n if (!entity) {\n return { Success: false, ErrorMessage: this.entityNotFoundError(entityName) };\n }\n this.onEntitySelected(entity);\n return { Success: true, Data: { EntityName: entity.Name } };\n }\n\n /** Apply a record filter for the selected entity. */\n private toolFilterRecords(params: Record<string, unknown>): { Success: boolean; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected to filter.' };\n }\n this.onFilterInputChanged(String(params['filterText'] ?? ''));\n return { Success: true };\n }\n\n /** Switch the record-view mode after validating it. */\n private toolSetViewMode(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n const mode = params['mode'];\n if (!isValidViewMode(mode)) {\n return { Success: false, ErrorMessage: `Invalid view mode \"${String(mode)}\". Valid modes: grid, cards, timeline, map.` };\n }\n this.stateService.setViewMode(mode);\n return { Success: true, Data: { ViewMode: mode } };\n }\n\n /**\n * Select a saved view by name OR id. The agent now sees view names via the\n * AvailableViews context field, so this resolves a supplied name (case-insensitive)\n * to its id against the in-memory {@link UserViewEngine} cache for the current entity.\n * A value that already matches a known view id is used directly.\n */\n private toolSelectView(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there are no saved views to choose from.' };\n }\n // Accept either \"view\" (name or id) or the legacy \"viewId\" alias.\n const raw = String(params['view'] ?? params['viewId'] ?? '').trim();\n if (!raw) {\n return { Success: false, ErrorMessage: 'A view name or view ID is required.' };\n }\n\n const accessibleViews = this.getAccessibleViewsForSelectedEntity();\n // Prefer an exact id match, then fall back to a case-insensitive name match.\n const lowered = raw.toLowerCase();\n const match =\n accessibleViews.find(v => UUIDsEqual(v.ID, raw)) ??\n accessibleViews.find(v => v.Name.toLowerCase() === lowered);\n\n if (!match) {\n const available = accessibleViews.map(v => v.Name).join(', ') || '(none)';\n return { Success: false, ErrorMessage: `No saved view named or identified by \"${raw}\" for \"${this.selectedEntity.Name}\". Available views: ${available}.` };\n }\n\n this.stateService.selectView(match.ID);\n return { Success: true, Data: { ViewId: match.ID, ViewName: match.Name } };\n }\n\n /**\n * Select a record/row in the current view by position or name, then drive the same\n * selection path a user row-click takes (open the detail panel, track recent, highlight\n * the grid row via the viewer's additive SelectRecord). Tolerant: clear errors when no\n * records are loaded or the position/name doesn't match.\n */\n private toolSelectRecord(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there are no records to select.' };\n }\n const request = this.parseRecordSelectionRequest(params);\n const recordNames = this.getVisibleRecordNames();\n const resolution = resolveRecordSelection(recordNames, request);\n if (!resolution.ok) {\n return { Success: false, ErrorMessage: resolution.error };\n }\n const record = this.loadedRecords[resolution.index];\n if (!record) {\n return { Success: false, ErrorMessage: 'The resolved record is no longer loaded in the view.' };\n }\n this.applyRecordSelection(record);\n return { Success: true, Data: { SelectedRecordName: this.getRecordDisplayName(record), Index: resolution.index + 1 } };\n }\n\n /**\n * Coerce the agent's loosely-typed SelectRecord params into a {@link RecordSelectionRequest}.\n * `position` may arrive as a string ('first'/'last'/'2') or a number; `name` as a string.\n */\n private parseRecordSelectionRequest(params: Record<string, unknown>): RecordSelectionRequest {\n const rawPosition = params['position'];\n const request: RecordSelectionRequest = {};\n if (typeof rawPosition === 'number') {\n request.position = rawPosition;\n } else if (typeof rawPosition === 'string') {\n const trimmed = rawPosition.trim().toLowerCase();\n if (trimmed === 'first' || trimmed === 'last') {\n request.position = trimmed;\n } else if (trimmed) {\n const n = Number(trimmed);\n if (Number.isFinite(n)) {\n request.position = n;\n } else {\n // A non-numeric, non-first/last \"position\" is really a name — fall back to name matching.\n request.name = rawPosition;\n }\n }\n }\n if (params['name'] != null) {\n request.name = String(params['name']);\n }\n return request;\n }\n\n /**\n * Drive the selection of a loaded record exactly like {@link onViewerRecordSelected}: set the\n * selected record + detail-panel entity, open the detail panel via the state service, and ask\n * the inner viewer to highlight the matching grid row (additive viewer.SelectRecord). Mirrors\n * the user row-click path so the detail panel opens and the grid reflects the selection.\n */\n private applyRecordSelection(record: Record<string, unknown>): void {\n const entity = this.selectedEntity;\n if (!entity) {\n return;\n }\n this.selectedRecord = record;\n this.detailPanelEntity = entity;\n const recordName = this.getRecordDisplayName(record);\n const pkString = buildPkString(record, entity);\n this.stateService.selectRecord(pkString, recordName);\n this.stateService.addRecentItem({\n entityName: entity.Name,\n compositeKeyString: pkString,\n displayName: recordName,\n });\n // Highlight the row in the grid (no-op when the grid view isn't mounted, e.g. cards/timeline).\n this.viewWorkspaceRef?.SelectRecord(record);\n this.cdr.detectChanges();\n }\n\n /** Open the currently-selected record in its full form. */\n private toolOpenSelectedRecord(): { Success: boolean; ErrorMessage?: string } {\n if (!this.selectedRecord) {\n return { Success: false, ErrorMessage: 'No record is currently selected to open.' };\n }\n // onOpenRecord uses detailPanelEntity; fall back to the selected entity when\n // the record came from the grid rather than the detail panel.\n if (!this.detailPanelEntity) {\n this.detailPanelEntity = this.selectedEntity;\n }\n if (!this.detailPanelEntity) {\n return { Success: false, ErrorMessage: 'No entity context is available for the selected record.' };\n }\n this.onOpenRecord(this.selectedRecord);\n return { Success: true };\n }\n\n /** Open a new-record form for the selected entity. */\n private toolCreateNewRecord(): { Success: boolean; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected to create a record for.' };\n }\n this.onCreateNewRecord();\n return { Success: true };\n }\n\n /** Navigate to a related entity, optionally applying a filter. */\n private toolNavigateToRelated(params: Record<string, unknown>): { Success: boolean; ErrorMessage?: string } {\n const entityName = String(params['entityName'] ?? '');\n const entity = this.resolveEntityByName(entityName);\n if (!entity) {\n return { Success: false, ErrorMessage: this.entityNotFoundError(entityName) };\n }\n const filter = params['filter'] != null ? String(params['filter']) : '';\n this.onNavigateToRelated({ entityName: entity.Name, filter });\n return { Success: true };\n }\n\n /** Drive the home-screen entity-search box. */\n private toolSearchEntities(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n const validated = validateStringParam(params['query'], 'query');\n if (!validated.ok) {\n return validated.result;\n }\n this.entityFilterText = validated.value;\n this.publishAgentContext();\n this.cdr.detectChanges();\n return { Success: true, Data: { Query: validated.value, VisibleEntityCount: this.filteredEntityCount } };\n }\n\n /** Switch the home-screen entity browser between 'all' and 'favorites'. */\n private toolSetEntityBrowserMode(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n const validated = validateEnumParam(params['mode'], VALID_ENTITY_BROWSER_MODES_FOR_VALIDATION, 'mode');\n if (!validated.ok) {\n return validated.result;\n }\n if (!isValidEntityBrowserMode(validated.value)) {\n return { Success: false, ErrorMessage: `Invalid mode \"${String(params['mode'])}\". Valid modes: all, favorites.` };\n }\n this.setHomeViewMode(validated.value);\n return { Success: true, Data: { EntityBrowserMode: validated.value } };\n }\n\n /** Add or remove an entity from favorites by name (reversible). */\n private async toolToggleEntityFavorite(params: Record<string, unknown>): Promise<{ Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string }> {\n const validated = validateStringParam(params['entityName'], 'entityName');\n if (!validated.ok) {\n return validated.result;\n }\n const entity = this.resolveEntityByName(validated.value);\n if (!entity) {\n return { Success: false, ErrorMessage: this.entityNotFoundError(validated.value) };\n }\n const wasFavorited = this.stateService.isEntityFavorited(entity.ID);\n const ok = wasFavorited\n ? await this.stateService.removeEntityFromFavorites(entity.ID)\n : await this.stateService.addEntityToFavorites(entity.Name, entity.ID);\n if (!ok) {\n return { Success: false, ErrorMessage: `Failed to ${wasFavorited ? 'remove' : 'add'} \"${entity.Name}\" ${wasFavorited ? 'from' : 'to'} favorites.` };\n }\n this.ngZone.run(() => {\n this.publishAgentContext();\n this.cdr.detectChanges();\n });\n return { Success: true, Data: { EntityName: entity.Name, Favorited: !wasFavorited } };\n }\n\n /**\n * Expand or collapse an application group by its application NAME (the agent sees names,\n * not the internal application IDs). Resolves the name against the currently-shown groups.\n */\n private toolSetAppGroupExpanded(params: Record<string, unknown>, expand: boolean): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (this.entityFilter?.applicationId) {\n return { Success: false, ErrorMessage: 'The entity browser is scoped to a single application, so there are no groups to expand or collapse.' };\n }\n const validated = validateStringParam(params['appName'], 'appName');\n if (!validated.ok) {\n return validated.result;\n }\n const lowered = validated.value.trim().toLowerCase();\n const group = this.appEntityGroups.find(g => g.applicationName.toLowerCase() === lowered);\n if (!group) {\n const available = this.appEntityGroups.map(g => g.applicationName).join(', ') || '(none)';\n return { Success: false, ErrorMessage: `No application group named \"${validated.value}\". Available groups: ${available}.` };\n }\n // toggleAppGroup flips state; only call it when the current state differs from the target.\n if (group.isExpanded !== expand) {\n this.toggleAppGroup(group.applicationId);\n }\n this.publishAgentContext();\n return { Success: true, Data: { AppName: group.applicationName, Expanded: expand } };\n }\n\n /** Change the record-view type (alias of SetViewMode). */\n private toolChangeViewType(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n return this.toolSetViewMode({ mode: params['type'] });\n }\n\n /** Deselect the current entity and return to the entity browser (home screen). */\n private toolBackToEntityBrowser(): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'Already at the entity browser — no entity is selected.' };\n }\n this.goToEntityBrowser();\n return { Success: true, Data: { AtHomeLevel: true } };\n }\n\n /**\n * Export the current entity/view's records. Delegates to the inner grid's Export()\n * (via the view workspace). Optional format: csv | excel | json (defaults to excel).\n */\n private async toolExportView(params: Record<string, unknown>): Promise<{ Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string }> {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected to export.' };\n }\n const format = this.normalizeExportFormat(params['format']);\n if (format === 'invalid') {\n return { Success: false, ErrorMessage: `Invalid format \"${String(params['format'])}\". Valid formats: csv, excel, json.` };\n }\n const workspace = this.viewWorkspaceRef;\n if (!workspace || !workspace.ExportRecords) {\n return { Success: false, ErrorMessage: 'The record grid is not ready to export yet.' };\n }\n try {\n const ok = await workspace.ExportRecords(format ?? undefined);\n if (!ok) {\n return { Success: false, ErrorMessage: 'Export is not available for the current view.' };\n }\n return { Success: true, Data: { EntityName: this.selectedEntity.Name, Format: format ?? 'excel' } };\n } catch (err) {\n return { Success: false, ErrorMessage: `Export failed: ${err instanceof Error ? err.message : String(err)}` };\n }\n }\n\n /** Narrow an untrusted export-format param to a supported value, or 'invalid'. */\n private normalizeExportFormat(raw: unknown): 'csv' | 'excel' | 'json' | null | 'invalid' {\n if (raw == null || raw === '') {\n return null; // default (excel)\n }\n const value = String(raw).toLowerCase();\n if (value === 'csv' || value === 'excel' || value === 'json') {\n return value;\n }\n return 'invalid';\n }\n\n /** Open the view configuration / properties panel (same as Cmd+,). */\n private toolOpenViewProperties(): { Success: boolean; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there are no view properties to configure.' };\n }\n if (!this.viewWorkspaceRef) {\n return { Success: false, ErrorMessage: 'The view workspace is not ready yet.' };\n }\n this.viewWorkspaceRef.onConfigureViewRequested();\n return { Success: true };\n }\n\n /** Advance the record grid to the next page. */\n private toolNextPage(): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n return this.applyPageChange(() => this.viewWorkspaceRef?.NextPage() ?? null);\n }\n\n /** Move the record grid to the previous page. */\n private toolPreviousPage(): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n return this.applyPageChange(() => this.viewWorkspaceRef?.PreviousPage() ?? null);\n }\n\n /** Jump the record grid to a specific 1-based page number. */\n private toolGoToPage(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n const validated = validateNonNegativeNumberParam(params['page'], 'page');\n if (!validated.ok) {\n return validated.result;\n }\n if (validated.value < 1) {\n return { Success: false, ErrorMessage: 'page must be 1 or greater.' };\n }\n return this.applyPageChange(() => this.viewWorkspaceRef?.GoToPage(validated.value) ?? null);\n }\n\n /**\n * Shared executor for the three pagination tools: run the workspace passthrough,\n * report the resulting page, and re-publish context. A null result means the grid\n * isn't paging (e.g. not mounted, or externally-supplied records).\n */\n private applyPageChange(action: () => number | null): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there is no record grid to page.' };\n }\n const page = action();\n if (page == null) {\n return { Success: false, ErrorMessage: 'The record grid is not ready to page yet.' };\n }\n this.publishAgentContext();\n return { Success: true, Data: { CurrentPage: page } };\n }\n\n /** Set the record grid's server-side page size (reloads from page 1). */\n private toolSetPageSize(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there is no record grid to resize.' };\n }\n const validated = validateNonNegativeNumberParam(params['size'], 'size');\n if (!validated.ok) {\n return validated.result;\n }\n if (validated.value < 1) {\n return { Success: false, ErrorMessage: 'size must be 1 or greater.' };\n }\n const applied = this.viewWorkspaceRef?.SetPageSize(validated.value) ?? null;\n if (applied == null) {\n return { Success: false, ErrorMessage: 'The record grid is not ready to set a page size yet.' };\n }\n this.publishAgentContext();\n return { Success: true, Data: { PageSize: applied } };\n }\n\n /** Sort the record grid by a column + optional direction (asc | desc, default asc). */\n private toolSetSort(params: Record<string, unknown>): { Success: boolean; Data?: Record<string, unknown>; ErrorMessage?: string } {\n if (!this.selectedEntity) {\n return { Success: false, ErrorMessage: 'No entity is selected, so there is no record grid to sort.' };\n }\n const column = validateStringParam(params['column'], 'column');\n if (!column.ok) {\n return column.result;\n }\n const columnName = column.value.trim();\n if (!columnName) {\n return { Success: false, ErrorMessage: 'A column name is required to sort.' };\n }\n // Resolve the column against the entity's fields (case-insensitive) so we sort by a real field.\n const field = this.selectedEntity.Fields.find(\n f => f.Name.toLowerCase() === columnName.toLowerCase() || f.DisplayNameOrName.toLowerCase() === columnName.toLowerCase(),\n );\n if (!field) {\n return { Success: false, ErrorMessage: `No column named \"${columnName}\" on \"${this.selectedEntity.Name}\".` };\n }\n const rawDir = params['direction'] != null ? String(params['direction']).toLowerCase() : 'asc';\n if (rawDir !== 'asc' && rawDir !== 'desc') {\n return { Success: false, ErrorMessage: `Invalid direction \"${String(params['direction'])}\". Valid directions: asc, desc.` };\n }\n const applied = this.viewWorkspaceRef?.SetSort(field.Name, rawDir) ?? false;\n if (!applied) {\n return { Success: false, ErrorMessage: 'The record grid is not ready to sort yet.' };\n }\n this.publishAgentContext();\n return { Success: true, Data: { SortColumn: field.Name, SortDirection: rawDir } };\n }\n\n /**\n * Deselect the current entity and return to the entity browser. Mirrors the home path\n * used by {@link onBreadcrumbClick} (application level) and {@link applyParams} (no params):\n * clear the selected entity / record / detail panel and notify the state service.\n */\n private goToEntityBrowser(): void {\n this.selectedEntity = null;\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.selectEntity(null);\n this.stateService.closeDetailPanel();\n this.cdr.detectChanges();\n }\n\n /**\n * Handle keyboard shortcuts\n * \"/\" or Cmd+K focuses the filter input\n */\n @HostListener('document:keydown', ['$event'])\n handleKeyboardShortcut(event: KeyboardEvent): void {\n // Skip if user is typing in an input field\n const target = event.target as HTMLElement;\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n // Allow Escape to blur the input\n if (event.key === 'Escape') {\n (target as HTMLInputElement).blur();\n }\n return;\n }\n\n // \"/\" to focus filter\n if (event.key === '/') {\n event.preventDefault();\n this.focusFilterInput();\n return;\n }\n\n // Cmd+K or Ctrl+K to focus filter\n if ((event.metaKey || event.ctrlKey) && event.key === 'k') {\n event.preventDefault();\n this.focusFilterInput();\n return;\n }\n\n // View management shortcuts (only when an entity is selected). These delegate to the\n // view workspace, which now owns the full saved-view lifecycle.\n if (this.selectedEntity && (event.metaKey || event.ctrlKey)) {\n // Ctrl+S / Cmd+S: Save current view\n if (event.key === 's' && !event.shiftKey) {\n event.preventDefault();\n this.viewWorkspaceRef?.onQuickSaveRequested(false);\n return;\n }\n\n // Ctrl+Shift+S / Cmd+Shift+S: Save as new view\n if (event.key === 'S' || (event.key === 's' && event.shiftKey)) {\n event.preventDefault();\n this.viewWorkspaceRef?.onQuickSaveRequested(true);\n return;\n }\n\n // Ctrl+, / Cmd+,: Open config panel\n if (event.key === ',') {\n event.preventDefault();\n this.viewWorkspaceRef?.onConfigureViewRequested();\n return;\n }\n\n // Ctrl+Z / Cmd+Z: Revert unsaved changes (only when modified)\n if (event.key === 'z' && !event.shiftKey && this.state.viewModified) {\n event.preventDefault();\n void this.viewWorkspaceRef?.onRevertView();\n return;\n }\n }\n }\n\n /**\n * Focus the filter input\n */\n private focusFilterInput(): void {\n if (this.filterInputRef) {\n this.filterInputRef.nativeElement.focus();\n this.filterInputRef.nativeElement.select();\n }\n }\n\n override ngOnDestroy(): void {\n if (this.recentTimeRefreshTimer !== null) {\n clearInterval(this.recentTimeRefreshTimer);\n this.recentTimeRefreshTimer = null;\n }\n this.destroy$.next();\n this.destroy$.complete();\n super.ngOnDestroy();\n }\n\n async ngOnChanges(changes: SimpleChanges): Promise<void> {\n // Re-apply filter when entityFilter changes\n if (changes['entityFilter'] && !changes['entityFilter'].firstChange) {\n // Update context for new filter (loads context-specific state)\n await this.stateService.setContext(this.entityFilter);\n this.state = this.stateService.CurrentState;\n await this.loadEntities();\n }\n }\n\n protected initDashboard(): void {\n // Called by BaseDashboard\n }\n\n protected loadData(): void {\n // Data loading is handled by mj-entity-viewer\n }\n\n // ========================================\n // ENTITY MANAGEMENT\n // ========================================\n\n /**\n * Load all available entities the user can access, applying any configured filter\n * @param urlState Optional URL state - if provided, skip restoring persisted entity to avoid race conditions\n */\n private async loadEntities(urlState?: DataExplorerDeepLink | null): Promise<void> {\n this.isLoadingEntities = true;\n\n try {\n // First, load all entities the user can access\n this.allEntities = this.metadata.Entities\n .filter(e => {\n const perms = e.GetUserPermisions(this.metadata.CurrentUser);\n return perms.CanRead && e.IncludeInAPI;\n })\n .sort((a, b) => a.Name.localeCompare(b.Name));\n\n // If we have an applicationId filter, load the application entities\n if (this.entityFilter?.applicationId) {\n await this.loadApplicationEntityIds(this.entityFilter.applicationId);\n }\n\n // Apply filter to get the final entity list\n this.entities = this.applyEntityFilter(this.allEntities);\n\n // Build application groups for the home view (Concept D)\n this.buildAppEntityGroups();\n\n // Only restore entity from persisted state if there's no URL state\n // This prevents race conditions where persisted entity triggers data load\n // before URL state can override it\n if (!urlState && this.state.selectedEntityName) {\n this.selectedEntity = this.entities.find(e => e.Name === this.state.selectedEntityName) || null;\n }\n } finally {\n this.ngZone.run(() => {\n this.isLoadingEntities = false;\n this.cdr.detectChanges();\n });\n }\n }\n\n /**\n * Load entity IDs associated with a specific application\n */\n private async loadApplicationEntityIds(applicationId: string): Promise<void> {\n this.applicationEntityIds.clear();\n\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<MJApplicationEntityEntity>({\n EntityName: 'MJ: Application Entities',\n ExtraFilter: `ApplicationID = '${applicationId}'`,\n ResultType: 'entity_object'\n });\n\n if (result.Success && result.Results) {\n for (const appEntity of result.Results) {\n this.applicationEntityIds.add(appEntity.EntityID);\n }\n }\n }\n\n /**\n * Apply the configured filter to the entity list\n */\n private applyEntityFilter(entities: EntityInfo[]): EntityInfo[] {\n if (!this.entityFilter) {\n return entities;\n }\n\n return entities.filter(entity => {\n // Filter by application (via ApplicationEntities)\n if (this.entityFilter!.applicationId) {\n if (!this.applicationEntityIds.has(entity.ID)) {\n return false;\n }\n }\n\n // Filter by schema names\n if (this.entityFilter!.schemaNames && this.entityFilter!.schemaNames.length > 0) {\n if (!this.entityFilter!.schemaNames.includes(entity.SchemaName)) {\n return false;\n }\n }\n\n // Filter by explicit entity names\n if (this.entityFilter!.entityNames && this.entityFilter!.entityNames.length > 0) {\n if (!this.entityFilter!.entityNames.includes(entity.Name)) {\n return false;\n }\n }\n\n // Filter out system entities unless explicitly included\n if (!this.entityFilter!.includeSystemEntities) {\n // Skip entities with names starting with __ (MJ system entities)\n if (entity.Name.startsWith('__')) {\n return false;\n }\n // Could add more system schema checks here if needed\n }\n\n return true;\n });\n }\n\n /**\n * Handle entity selection from navigation panel or home screen\n */\n public onEntitySelected(entity: EntityInfo): void {\n this.resetRecordCounts();\n // Clear the previous entity's view — it belongs to the old entity and its sort/filter\n // state would leak into the new entity's query (e.g., ORDER BY FirstName on Groups).\n // The workspace resets its own view/grid state when its [Entity] input changes.\n this.selectedViewEntity = null;\n this.selectedEntity = entity;\n this.reconcileViewModeForEntity(entity);\n this.stateService.selectEntity(entity.Name);\n // Track entity access for recent entities\n this.stateService.trackEntityAccess(entity.Name, entity.ID);\n // mj-entity-viewer will automatically load data when entity changes\n }\n\n /**\n * Handle state changes from external sources\n */\n private onStateChanged(): void {\n if (this.state.selectedEntityName !== this.selectedEntity?.Name) {\n this.resetRecordCounts();\n this.selectedEntity = this.entities.find(e => e.Name === this.state.selectedEntityName) || null;\n this.reconcileViewModeForEntity(this.selectedEntity);\n }\n }\n\n /**\n * Reset viewMode to 'grid' if the current mode isn't supported by the given entity\n * (e.g., switching to an entity without geocoding while viewMode is 'map').\n */\n private reconcileViewModeForEntity(entity: EntityInfo | null): void {\n if (!entity) return;\n const mode = this.state.viewMode;\n const hasDateFields = entity.Fields.some(f => f.TSType === EntityFieldTSType.Date);\n const modeUnsupported =\n (mode === 'map' && !entity.SupportsGeoCoding) ||\n (mode === 'timeline' && !hasDateFields);\n if (modeUnsupported) {\n this.stateService.setViewMode('grid');\n }\n }\n\n /**\n * Reset record counts when entity changes.\n * The actual counts will be updated when mj-entity-viewer emits dataLoaded event.\n */\n private resetRecordCounts(): void {\n this.totalRecordCount = 0;\n this.filteredRecordCount = 0;\n }\n\n // ========================================\n // VIEW WORKSPACE EVENT HANDLERS\n // (View CRUD now lives in mj-view-workspace; these thin handlers only drive\n // Explorer routing + URL/state sync.)\n // ========================================\n\n /**\n * Handle a view selection emitted by the workspace. Tracks the selected view for routing/export\n * and syncs the selected-view-id + smart-filter into the Explorer state service for URL sync.\n * Grid-state application is owned by the workspace.\n */\n public onWorkspaceViewSelected(view: MJUserViewEntityExtended | null): void {\n this.selectedViewEntity = view;\n this.stateService.selectView(view?.ID ?? null);\n\n if (view && view.SmartFilterEnabled && view.SmartFilterPrompt) {\n this.stateService.setSmartFilterPrompt(view.SmartFilterPrompt);\n } else {\n this.stateService.setSmartFilterPrompt('');\n }\n // User search text is separate from a saved view's filter — always clear on view switch.\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n this.cdr.detectChanges();\n }\n\n /**\n * Handle the workspace's \"open view in tab\" request — route via NavigationService.\n */\n public onOpenInTabRequested(viewId: string): void {\n const viewName = this.selectedViewEntity?.Name || 'View';\n this.navigationService.OpenView(viewId, viewName, { forceNewTab: true });\n }\n\n /**\n * Handle the workspace's \"create new record\" request — route via NavigationService.\n */\n public onCreateNewRecordRequested(entity: EntityInfo): void {\n this.navigationService.OpenNewEntityRecord(entity.Name);\n }\n\n /**\n * Clear the Explorer \"view modified\" flag after the workspace persists/reverts a view.\n */\n public onWorkspaceViewSaved(): void {\n this.stateService.setViewModified(false);\n }\n\n // ========================================\n // VIEW MODE & FILTERING (Dashboard Header)\n // ========================================\n\n /**\n * Handle smart filter change from dashboard header\n */\n public onSmartFilterChanged(prompt: string): void {\n this.stateService.setSmartFilterPrompt(prompt);\n this.filterInput$.next(prompt);\n }\n\n /**\n * Handle direct keyboard input in the filter text box.\n * Only updates the live display text and pushes to the debounce subject.\n * Does NOT trigger state changes or URL updates — those happen after the debounce.\n */\n public onFilterInputChanged(filterText: string): void {\n this.liveFilterText = filterText;\n this.filterInput$.next(filterText);\n }\n\n /**\n * Clear the record filter (called by the X button).\n */\n public clearRecordFilter(): void {\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n this.stateService.setSmartFilterPrompt('');\n this.filterInput$.next('');\n this.cdr.detectChanges();\n }\n\n /**\n * Handle filter text change from mj-entity-viewer (two-way binding)\n */\n public onFilterTextChanged(filterText: string): void {\n this.liveFilterText = filterText;\n this.debouncedFilterText = filterText;\n this.stateService.setSmartFilterPrompt(filterText);\n this.cdr.detectChanges();\n }\n\n // ========================================\n // ENTITY VIEWER EVENT HANDLERS\n // ========================================\n\n /**\n * Handle record selection from mj-entity-viewer\n */\n public onViewerRecordSelected(event: RecordSelectedEvent): void {\n this.selectedRecord = event.record;\n // When selecting from grid, detail panel entity matches the grid entity\n this.detailPanelEntity = this.selectedEntity;\n const recordName = this.getRecordDisplayName(event.record);\n const pkString = event.compositeKey.ToConcatenatedString();\n this.stateService.selectRecord(pkString, recordName);\n\n // Add to recent items (local state for navigation panel)\n if (this.selectedEntity) {\n this.stateService.addRecentItem({\n entityName: this.selectedEntity.Name,\n compositeKeyString: pkString,\n displayName: recordName\n });\n\n // Update local recent records immediately for instant home screen updates\n const recordId = event.compositeKey.KeyValuePairs[0]?.Value?.toString() || '';\n this.stateService.addLocalRecentRecord(\n this.selectedEntity.Name,\n this.selectedEntity.ID,\n recordId,\n recordName\n );\n\n // Log to User Record Logs for persistence (fire-and-forget)\n this.recentAccessService.logAccess(\n this.selectedEntity.Name,\n event.compositeKey.Values(),\n 'record'\n );\n }\n }\n\n /**\n * Handle record opened from mj-entity-viewer (double-click or open button)\n */\n public onViewerRecordOpened(event: RecordOpenedEvent): void {\n this.OpenEntityRecord.emit({\n EntityName: event.entity.Name,\n RecordPKey: event.compositeKey\n });\n }\n\n /**\n * Handle the workspace's OpenRecordRequested (record open from the inner viewer). Builds the\n * composite key from the record and routes to the full record view via the OpenEntityRecord output.\n */\n public onWorkspaceOpenRecord(event: { entity: EntityInfo; record: Record<string, unknown> }): void {\n this.OpenEntityRecord.emit({\n EntityName: event.entity.Name,\n RecordPKey: buildCompositeKey(event.record, event.entity)\n });\n }\n\n /**\n * Handle data loaded from mj-entity-viewer\n */\n public onDataLoaded(event: DataLoadedEvent): void {\n this.totalRecordCount = event.totalRowCount;\n this.filteredRecordCount = event.loadedRowCount;\n // Store loaded records for back/forward navigation lookup\n this.loadedRecords = event.records;\n\n // Handle pending record selection from deep link\n if (this.pendingRecordSelection && this.selectedEntity) {\n const recordId = this.pendingRecordSelection;\n this.pendingRecordSelection = null; // Clear it so we don't keep trying\n\n // Try to find the record by primary key or concatenated string\n const entity = this.selectedEntity;\n const record = event.records.find(r => {\n const pkString = buildPkString(r, entity);\n const pkValue = entity.PrimaryKeys[0] ? String(r[entity.PrimaryKeys[0].Name] ?? '') : '';\n return pkString === recordId || pkValue === recordId;\n });\n\n if (record) {\n this.selectedRecord = record;\n this.detailPanelEntity = this.selectedEntity;\n const recordName = this.getRecordDisplayName(record);\n this.stateService.selectRecord(buildPkString(record, entity), recordName);\n } else {\n console.warn(`[DataExplorer] Deep link record not found: ${recordId}`);\n }\n }\n // Restore selected record if we have a persisted selectedRecordId\n else if (this.state.selectedRecordId && this.state.detailPanelOpen && !this.selectedRecord && this.selectedEntity) {\n const entity = this.selectedEntity;\n const record = event.records.find(r =>\n buildPkString(r, entity) === this.state.selectedRecordId\n );\n if (record) {\n this.selectedRecord = record;\n this.detailPanelEntity = this.selectedEntity;\n }\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Handle filtered count change from mj-entity-viewer\n */\n public onFilteredCountChanged(event: FilteredCountChangedEvent): void {\n this.filteredRecordCount = event.filteredCount;\n this.totalRecordCount = event.totalCount;\n this.cdr.detectChanges();\n }\n\n // ========================================\n // DETAIL PANEL\n // ========================================\n\n /**\n * Handle detail panel close\n */\n public onDetailPanelClosed(): void {\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.closeDetailPanel();\n }\n\n /**\n * Handle opening a record in full view (from detail panel)\n * Uses detailPanelEntity since the panel may be showing a different entity than the grid\n */\n public onOpenRecord(record: Record<string, unknown>): void {\n if (!this.detailPanelEntity) return;\n\n this.OpenEntityRecord.emit({\n EntityName: this.detailPanelEntity.Name,\n RecordPKey: buildCompositeKey(record, this.detailPanelEntity)\n });\n }\n\n /**\n * Handle creating a new record for the current entity\n */\n public onCreateNewRecord(): void {\n if (!this.selectedEntity) return;\n\n // Use NavigationService to open a new record form\n this.navigationService.OpenNewEntityRecord(this.selectedEntity.Name);\n }\n\n /**\n * Show a notification to the user\n */\n private showNotification(message: string, type: 'info' | 'success' | 'error', duration: number): void {\n const data: DisplaySimpleNotificationRequestData = {\n message: message,\n style: type,\n DisplayDuration: duration\n };\n MJGlobal.Instance.RaiseEvent({\n component: this,\n event: MJEventType.DisplaySimpleNotificationRequest,\n eventCode: \"\",\n args: data\n });\n }\n\n /**\n * Handle navigation to a related entity from detail panel.\n * Navigates within the explorer and applies filter to show related records.\n */\n public onNavigateToRelated(event: NavigateToRelatedEvent): void {\n const entity = this.entities.find(e => e.Name === event.entityName);\n if (!entity) {\n // Entity not in our filtered list - it may exist in the system but not be part of this app\n console.warn(`Entity not found in explorer: ${event.entityName}`);\n return;\n }\n\n // Close detail panel and clear current record\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.closeDetailPanel();\n\n // Navigate to the entity\n this.selectedEntity = entity;\n this.stateService.selectEntity(entity.Name);\n\n // Apply the filter to show related records\n // The filter is in SQL format like \"ParentID='xxx'\" - we just show it in the filter box\n // The entity viewer will apply it as a smart filter\n if (event.filter) {\n // Apply the filter to the smart filter state (separate from user search)\n this.stateService.setSmartFilterPrompt(event.filter);\n }\n }\n\n /**\n * Handle opening a related record - display in detail panel (not new tab)\n * The record is already loaded, so just update the detail panel\n */\n public onOpenRelatedRecord(event: { entityName: string; record: Record<string, unknown> }): void {\n this.showRecordInDetailPanel(event.entityName, event.record);\n }\n\n /**\n * Handle opening a foreign key record (from FK field link in detail panel)\n * Loads the record and displays it in the detail panel\n */\n public async onOpenForeignKeyRecord(event: { entityName: string; recordId: string }): Promise<void> {\n await this.loadAndShowRecordInDetailPanel(event.entityName, event.recordId);\n }\n\n /**\n * Show an already-loaded record in the detail panel\n * Note: This does NOT change selectedEntity (the main grid's entity)\n * It only updates detailPanelEntity which is used by the detail panel\n */\n private showRecordInDetailPanel(entityName: string, record: Record<string, unknown>): void {\n const entityInfo = this.metadata.Entities.find(e => e.Name === entityName);\n if (!entityInfo) {\n console.warn(`Entity not found: ${entityName}`);\n return;\n }\n\n // Update the detail panel entity and record\n // detailPanelEntity may differ from selectedEntity when viewing FK/related records\n this.detailPanelEntity = entityInfo;\n this.selectedRecord = record;\n\n // Use selectRecord to open the panel with proper state tracking\n const recordName = this.getRecordDisplayName(record, entityInfo);\n this.stateService.selectRecord(buildPkString(record, entityInfo), recordName);\n this.cdr.detectChanges();\n }\n\n /**\n * Load a record by ID and show it in the detail panel\n */\n private async loadAndShowRecordInDetailPanel(entityName: string, recordId: string): Promise<void> {\n const entityInfo = this.metadata.Entities.find(e => e.Name === entityName);\n if (!entityInfo) {\n console.warn(`Entity not found: ${entityName}`);\n return;\n }\n\n try {\n // Load the record\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const result = await rv.RunView<Record<string, unknown>>({\n EntityName: entityName,\n ExtraFilter: `ID='${recordId}'`,\n ResultType: 'simple',\n MaxRows: 1\n });\n\n if (result.Success && result.Results.length > 0) {\n this.ngZone.run(() => {\n this.showRecordInDetailPanel(entityName, result.Results[0]);\n });\n } else {\n console.warn(`Record not found: ${entityName} ID=${recordId}`);\n }\n } catch (error) {\n console.error(`Failed to load record: ${entityName} ID=${recordId}`, error);\n }\n }\n\n // ========================================\n // NAVIGATION PANEL\n // ========================================\n\n /**\n * Handle opening a record from navigation panel (recent/favorites)\n */\n public onOpenRecordFromNav(event: OpenRecordEvent): void {\n this.OpenEntityRecord.emit({\n EntityName: event.entityName,\n RecordPKey: event.compositeKey\n });\n }\n\n /**\n * Handle selecting a record from navigation panel (recent/favorites).\n * Navigates to the entity within Data Explorer and selects the record\n * in the detail panel (instead of opening full record view).\n */\n public onSelectRecordFromNav(event: SelectRecordEvent): void {\n const entity = this.entities.find(e => e.Name === event.entityName);\n if (entity) {\n // Set pending record selection - will be resolved in onDataLoaded\n this.pendingRecordSelection = event.recordId;\n this.onEntitySelected(entity);\n }\n }\n\n /**\n * Toggle navigation panel\n */\n public toggleNavigationPanel(): void {\n this.stateService.toggleNavigationPanel();\n }\n\n /**\n * Handle expand and focus from collapsed nav icon click\n */\n public onExpandAndFocus(section: 'favorites' | 'recent' | 'entities'): void {\n this.stateService.expandAndFocusSection(section);\n }\n\n // ========================================\n // DEEP LINK HANDLING\n // ========================================\n\n /**\n * Apply a deep link to navigate to a specific entity/record\n */\n private async applyDeepLink(deepLink: DataExplorerDeepLink): Promise<void> {\n // ViewTypeID-only: view type is no longer deep-linked — the inner viewer persists it.\n\n // Navigate to entity if specified\n if (deepLink.entity) {\n const entity = this.entities.find(e =>\n e.Name.toLowerCase() === deepLink.entity!.toLowerCase()\n );\n\n if (entity) {\n // Reset counts before setting entity to prevent stale data display\n this.resetRecordCounts();\n this.selectedEntity = entity;\n this.stateService.selectEntity(entity.Name);\n\n // Apply filter if specified (to smart filter state, not user search)\n if (deepLink.filter) {\n this.stateService.setSmartFilterPrompt(deepLink.filter);\n }\n\n // Note: Record selection is handled after data loads via onDataLoaded\n // We store the record ID to select once data is available\n if (deepLink.record) {\n this.pendingRecordSelection = deepLink.record;\n }\n } else {\n console.warn(`[DataExplorer] Deep link entity not found: ${deepLink.entity}`);\n }\n }\n }\n\n /** Record ID to select once data loads (from deep link) */\n private pendingRecordSelection: string | null = null;\n\n // ========================================\n // BREADCRUMB NAVIGATION\n // ========================================\n\n /**\n * Handle breadcrumb click - navigate to that level\n */\n public onBreadcrumbClick(breadcrumb: BreadcrumbItem, index: number): void {\n // Don't navigate if it's the last (current) breadcrumb\n if (index === this.breadcrumbs.length - 1) {\n return;\n }\n\n this.stateService.navigateToBreadcrumb(breadcrumb);\n\n // If navigating to application level, clear entity selection\n if (breadcrumb.type === 'application') {\n this.selectedEntity = null;\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n }\n }\n\n // ========================================\n // HELPERS\n // ========================================\n\n /**\n * Get the set of allowed entity names for filtering favorites/recents.\n * Returns null if no filter is active (all entities allowed).\n */\n public get allowedEntityNames(): Set<string> | null {\n if (!this.entityFilter) {\n return null;\n }\n return new Set(this.entities.map(e => e.Name));\n }\n\n /**\n * Get display name for a record\n */\n private getRecordDisplayName(record: Record<string, unknown>, entityInfo?: EntityInfo): string {\n const entity = entityInfo || this.selectedEntity;\n if (!entity) return 'Unknown';\n\n if (entity.NameField) {\n const nameValue = record[entity.NameField.Name];\n if (nameValue) return String(nameValue);\n }\n\n return buildPkString(record, entity);\n }\n\n /**\n * Get the icon class for an entity\n */\n public getEntityIcon(entity: EntityInfo): string {\n if (entity.Icon) {\n return this.formatEntityIcon(entity.Icon);\n }\n return 'fa-solid fa-table';\n }\n\n /**\n * Format entity icon to ensure proper Font Awesome class format\n */\n private formatEntityIcon(icon: string): string {\n if (!icon) {\n return 'fa-solid fa-table';\n }\n if (icon.startsWith('fa-') || icon.startsWith('fa ')) {\n if (icon.startsWith('fa-solid') || icon.startsWith('fa-regular') ||\n icon.startsWith('fa-light') || icon.startsWith('fa-brands') ||\n icon.startsWith('fa ')) {\n return icon;\n }\n return `fa-solid ${icon}`;\n }\n return `fa-solid fa-${icon}`;\n }\n\n // ========================================\n // URL DEEP LINKING (Framework Query Param Lifecycle)\n // ========================================\n\n /**\n * Build a DataExplorerDeepLink from framework query params.\n * Returns null if no relevant params found.\n */\n private buildDeepLinkFromParams(params: Record<string, string>): DataExplorerDeepLink | null {\n const entity = params['entity'] || null;\n const record = params['record'] || null;\n const filterParam = params['filter'] || null;\n const viewId = params['viewId'] || null;\n\n if (!entity && !record && !filterParam && !viewId) {\n return null;\n }\n\n // ViewTypeID-only: the active view type is persisted via UserView.ViewTypeID / per-user settings\n // by the inner viewer, NOT via URL query params. So we no longer read/write view/mapMode here.\n return {\n entity: entity || undefined,\n record: record || undefined,\n filter: filterParam || undefined,\n viewId: viewId || undefined\n };\n }\n\n /**\n * React to back/forward navigation or deep-link entry.\n * The base class calls this when query params change via popstate or deeplink.\n */\n protected override OnQueryParamsChanged(params: Record<string, string>, _source: 'popstate' | 'deeplink'): void {\n this.applyParams(params);\n }\n\n /**\n * Public entry point for the resource wrapper to forward query param changes.\n * The wrapper receives OnQueryParamsChanged from the framework and delegates here.\n */\n public HandleQueryParamsChanged(params: Record<string, string>, _source: 'popstate' | 'deeplink'): void {\n this.applyParams(params);\n }\n\n /**\n * Apply a params map (from framework query params) to the component state.\n */\n private async applyParams(params: Record<string, string>): Promise<void> {\n const deepLink = this.buildDeepLinkFromParams(params);\n if (deepLink) {\n await this.applyUrlState(deepLink);\n } else {\n // No params — go to home view\n this.selectedEntity = null;\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.selectEntity(null);\n this.stateService.closeDetailPanel();\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Push current navigation state to the URL via the framework.\n * Called whenever state changes so users can bookmark/share URLs.\n */\n private pushCurrentStateToUrl(): void {\n const hasEntity = !!this.state.selectedEntityName;\n const hasViewId = !!(this.state.selectedViewId && hasEntity);\n\n // ViewTypeID-only: the active view type is persisted by the inner viewer (UserView.ViewTypeID /\n // per-user settings), not via URL. We only round-trip entity / record / saved-view selection.\n const queryParams: Record<string, string | null> = {\n entity: this.state.selectedEntityName || null,\n record: (this.state.selectedRecordId && hasEntity) ? this.state.selectedRecordId : null,\n filter: null, // Never in URL — filters live in saved views (DB), not query strings\n viewId: hasViewId ? this.state.selectedViewId : null\n };\n\n\n this.UpdateQueryParams(queryParams);\n }\n\n /**\n * Apply URL state to the component.\n * Used both during init and for popstate handling.\n */\n private async applyUrlState(urlState: DataExplorerDeepLink): Promise<void> {\n // ViewTypeID-only: view type / map mode are no longer URL-driven — the inner viewer persists them.\n\n // Navigate to entity if specified\n if (urlState.entity) {\n const entity = this.entities.find(e =>\n e.Name.toLowerCase() === urlState.entity!.toLowerCase()\n );\n\n if (entity) {\n const entityChanged = this.selectedEntity?.Name !== entity.Name;\n\n if (entityChanged) {\n // Entity changed - reset counts and select new entity\n this.resetRecordCounts();\n this.selectedEntity = entity;\n this.stateService.selectEntity(entity.Name);\n }\n\n // Restore saved view by ID if specified. The workspace applies the view's grid state\n // itself once selectedViewEntity flows into its [SelectedView] input.\n if (urlState.viewId) {\n await this.restoreViewFromUrl(urlState.viewId, entity);\n } else {\n // No specific view — clear view selection to use default\n this.selectedViewEntity = null;\n this.stateService.selectView(null);\n }\n\n // Filters live in saved views (DB), never in URL query strings.\n // Clear smart filter on entity change when no specific view is selected.\n if (entityChanged && !urlState.viewId) {\n this.stateService.setSmartFilterPrompt('');\n }\n // User search text is always cleared when applying URL state\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n\n // Handle record selection\n if (urlState.record) {\n if (entityChanged) {\n // Entity changed - need to wait for data to load\n this.pendingRecordSelection = urlState.record;\n } else if (this.selectedEntity) {\n // Entity is the same - find record from already-loaded data\n const entity = this.selectedEntity;\n const record = this.loadedRecords.find(r => {\n const pkString = buildPkString(r, entity);\n const pkValue = entity.PrimaryKeys[0] ? String(r[entity.PrimaryKeys[0].Name] ?? '') : '';\n return pkString === urlState.record || pkValue === urlState.record;\n });\n\n if (record) {\n this.selectedRecord = record;\n this.detailPanelEntity = this.selectedEntity;\n const recordName = this.getRecordDisplayName(record);\n this.stateService.selectRecord(buildPkString(record, entity), recordName);\n } else {\n // Record not in current page - update state but panel won't show\n this.stateService.selectRecord(urlState.record, this.state.selectedRecordName || undefined);\n }\n }\n } else {\n // Clear record selection if not in URL\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.closeDetailPanel();\n }\n }\n } else {\n // No entity in URL - go to home view\n this.selectedEntity = null;\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.selectEntity(null);\n this.stateService.closeDetailPanel();\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Restore a saved view from the URL's viewId parameter.\n * Looks up the view by ID and sets it as selected; the workspace applies its grid state once\n * selectedViewEntity flows into its [SelectedView] input. Must be async because UserViewEngine's\n * cache may not be populated yet on cold page loads.\n */\n private async restoreViewFromUrl(viewId: string, entity: EntityInfo): Promise<void> {\n // Ensure the view engine cache is populated before querying —\n // on hard refresh, the cache may be empty and GetAccessibleViewsForEntity returns []\n await UserViewEngine.Instance.Config(false);\n\n const accessibleViews = UserViewEngine.Instance.GetAccessibleViewsForEntity(entity.ID);\n const view = accessibleViews.find(v => UUIDsEqual(v.ID, viewId)) || null;\n\n if (view) {\n this.selectedViewEntity = view;\n this.stateService.selectView(viewId);\n\n // Apply the view's smart filter if it has one\n if (view.SmartFilterEnabled && view.SmartFilterPrompt) {\n this.stateService.setSmartFilterPrompt(view.SmartFilterPrompt);\n }\n } else {\n console.warn('[DataExplorer] restoreViewFromUrl: view NOT FOUND, falling back to default. viewId=', viewId);\n this.selectedViewEntity = null;\n this.stateService.selectView(null);\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Emit the current display name based on selected entity/record.\n */\n private emitDisplayName(): void {\n if (this.state.selectedEntityName) {\n this.DisplayNameChanged.emit(this.state.selectedEntityName);\n } else {\n this.DisplayNameChanged.emit('Data');\n }\n }\n\n // ========================================\n // HOME SCREEN ACTIONS\n // ========================================\n\n /**\n * Toggle entity favorite status\n */\n public async toggleEntityFavorite(entity: EntityInfo, event: Event): Promise<void> {\n event.stopPropagation(); // Prevent card click\n if (this.stateService.isEntityFavorited(entity.ID)) {\n await this.stateService.removeEntityFromFavorites(entity.ID);\n } else {\n await this.stateService.addEntityToFavorites(entity.Name, entity.ID);\n }\n this.ngZone.run(() => this.cdr.detectChanges());\n }\n\n /**\n * Check if entity is favorited (for template)\n */\n public isEntityFavorited(entity: EntityInfo): boolean {\n return this.stateService.isEntityFavorited(entity.ID);\n }\n\n /**\n * Toggle show all entities vs common entities\n */\n public toggleShowAllEntities(): void {\n this.stateService.toggleShowAllEntities();\n }\n\n // ========================================\n // Concept D: Application Groups + Quick Access Panel\n // ========================================\n\n /**\n * Toggle an application group's expanded/collapsed state\n */\n public toggleAppGroup(groupId: string): void {\n this.stateService.toggleAppGroupExpanded(groupId);\n // Update local cache for immediate UI response\n const group = this.appEntityGroups.find(g => g.applicationId === groupId);\n if (group) {\n group.isExpanded = !group.isExpanded;\n }\n this.cdr.detectChanges();\n }\n\n /**\n * Set the home view mode (all vs favorites)\n */\n public setHomeViewMode(mode: 'all' | 'favorites'): void {\n this.stateService.setHomeViewMode(mode);\n }\n\n /**\n * Toggle the quick access (right) panel\n */\n public toggleQuickAccessPanel(): void {\n this.stateService.toggleQuickAccessPanel();\n }\n\n /**\n * Toggle a section in the quick access panel\n */\n public toggleQuickAccessSection(sectionId: string): void {\n this.stateService.toggleQuickAccessSection(sectionId);\n }\n\n /**\n * Build application entity groups from metadata.\n * Groups entities by their first application membership.\n * Entities not in any application go into \"System & Other\".\n */\n private buildAppEntityGroups(): void {\n // Skip grouping when filtered to a single application\n if (this.entityFilter?.applicationId) {\n this.appEntityGroups = [];\n return;\n }\n\n const applications = this.metadata.Applications;\n const entityIdToApps = new Map<string, ApplicationInfo[]>();\n const groupMap = new Map<string, AppEntityGroup>();\n\n // Build entity -> applications mapping (an entity can belong to multiple apps)\n for (const app of applications) {\n for (const appEntity of app.ApplicationEntities) {\n const apps = entityIdToApps.get(appEntity.EntityID);\n if (apps) {\n apps.push(app);\n } else {\n entityIdToApps.set(appEntity.EntityID, [app]);\n }\n }\n }\n\n // Assign each visible entity to all of its application groups\n const ungroupedEntities: EntityInfo[] = [];\n for (const entity of this.entities) {\n const apps = entityIdToApps.get(entity.ID);\n if (apps) {\n for (const app of apps) {\n this.addEntityToGroup(groupMap, app, entity);\n }\n } else {\n ungroupedEntities.push(entity);\n }\n }\n\n // Convert map to sorted array\n const groups = Array.from(groupMap.values())\n .sort((a, b) => a.applicationName.localeCompare(b.applicationName));\n\n // Add \"System & Other\" catch-all if there are ungrouped entities\n if (ungroupedEntities.length > 0) {\n groups.push({\n applicationId: '__system_other__',\n applicationName: 'System & Other',\n applicationIcon: 'fa-solid fa-ellipsis',\n applicationColor: 'var(--mj-text-disabled)',\n entities: ungroupedEntities,\n isExpanded: this.state.expandedAppGroups.includes('__system_other__')\n });\n }\n\n // Apply expanded state from persisted state\n for (const group of groups) {\n group.isExpanded = this.state.expandedAppGroups.includes(group.applicationId);\n }\n\n this.appEntityGroups = groups;\n }\n\n /**\n * Add an entity to its application group in the map, creating the group if needed\n */\n private addEntityToGroup(\n groupMap: Map<string, AppEntityGroup>,\n app: ApplicationInfo,\n entity: EntityInfo\n ): void {\n let group = groupMap.get(app.ID);\n if (!group) {\n group = {\n applicationId: app.ID,\n applicationName: app.Name,\n applicationIcon: app.Icon || 'fa-solid fa-cube',\n applicationColor: app.Color,\n entities: [],\n isExpanded: false\n };\n groupMap.set(app.ID, group);\n }\n group.entities.push(entity);\n }\n\n /**\n * Handle clicking on a recent record from home screen.\n * Navigates to the entity and sets up pending selection to select the record\n * and open the detail panel once data loads.\n */\n public onRecentRecordClick(record: RecentRecordAccess): void {\n const entity = this.entities.find(e => UUIDsEqual(e.ID, record.entityId));\n if (entity) {\n // Set pending record selection - will be resolved in onDataLoaded\n this.pendingRecordSelection = record.recordId;\n this.onEntitySelected(entity);\n }\n }\n\n /**\n * Handle clicking on a favorite record from home screen.\n * Navigates to the entity and sets up pending selection to select the record\n * and open the detail panel once data loads.\n */\n public onFavoriteRecordClick(record: FavoriteRecord): void {\n const entity = this.entities.find(e => UUIDsEqual(e.ID, record.entityId));\n if (entity) {\n // Set pending record selection - will be resolved in onDataLoaded\n this.pendingRecordSelection = record.recordId;\n this.onEntitySelected(entity);\n }\n }\n\n /**\n * Get the icon for an entity by ID (for recent records)\n */\n public getEntityIconById(entityId: string): string {\n const entity = this.metadata.Entities.find(e => UUIDsEqual(e.ID, entityId));\n if (entity) {\n return this.getEntityIcon(entity);\n }\n return 'fa-solid fa-table';\n }\n\n /**\n * Pre-compute the \"N ago\" relative-time label for each recent record into its `relativeTime`\n * field. The template binds `record.relativeTime` (a stable value) instead of calling\n * {@link formatRelativeTime} — which reads `Date.now()` — during change detection. Recomputing\n * time inside a template binding is what produced the NG0100\n * ExpressionChangedAfterItHasBeenCheckedError (the value could differ between the two dev-mode\n * CD passes when a minute boundary was crossed); binding a stored field cannot. Called when the\n * record set loads and on a timer so the labels stay current.\n */\n private refreshRecentRecordTimes(): void {\n for (const record of this.recentRecords) {\n record.relativeTime = this.formatRelativeTime(record.latestAt);\n }\n }\n\n /**\n * Format relative time for display (e.g., \"2 hours ago\").\n * NOTE: this reads Date.now(), so it must NOT be called directly from a template binding —\n * use the pre-computed {@link RecentRecordAccess.relativeTime} field (see refreshRecentRecordTimes).\n */\n private formatRelativeTime(date: Date): string {\n if (!date) return '';\n\n const diff = Date.now() - new Date(date).getTime();\n const minutes = Math.floor(diff / 60000);\n const hours = Math.floor(diff / 3600000);\n const days = Math.floor(diff / 86400000);\n\n if (minutes < 1) return 'Just now';\n if (minutes < 60) return `${minutes}m ago`;\n if (hours < 24) return `${hours}h ago`;\n if (days < 7) return `${days}d ago`;\n return new Date(date).toLocaleDateString();\n }\n\n /**\n * Check if we're at the home level (no entity selected)\n */\n get isAtHomeLevel(): boolean {\n return !this.selectedEntity;\n }\n\n /**\n * NAVIGATION handler: open a *related* record on a (possibly different) entity, bubbled up from a\n * plug-in renderer through the workspace (e.g. a grid foreign-key drill-through). Resolves the\n * target entity and shows the record in the detail panel, mirroring the FK navigation path used\n * by {@link onOpenForeignKeyRecord}.\n *\n * @param nav the related-record navigation payload: the target entity name and the record's key.\n */\n public onOpenRelatedRecordRequested(nav: ViewRelatedRecordNavigation): void {\n if (nav?.entityName && nav.recordKey != null) {\n void this.loadAndShowRecordInDetailPanel(nav.entityName, String(nav.recordKey));\n }\n }\n}\n","<div class=\"data-explorer-container\">\n <!-- Navigation Panel (Left) - Hidden at home level, animated -->\n @if (!isAtHomeLevel) {\n <div\n class=\"navigation-panel\"\n [class.collapsed]=\"state.navigationPanelCollapsed\"\n [style.width.px]=\"state.navigationPanelCollapsed ? 48 : state.navigationPanelWidth\"\n [@slideInLeft]>\n\n <mj-explorer-navigation-panel\n [entities]=\"entities\"\n [appEntityGroups]=\"appEntityGroups\"\n [selectedEntityName]=\"state.selectedEntityName\"\n [favorites]=\"state.favorites\"\n [recentItems]=\"state.recentItems\"\n [collapsed]=\"state.navigationPanelCollapsed\"\n [allowedEntityNames]=\"allowedEntityNames\"\n [favoritesSectionExpanded]=\"state.favoritesSectionExpanded\"\n [recentSectionExpanded]=\"state.recentSectionExpanded\"\n [entitiesSectionExpanded]=\"state.entitiesSectionExpanded\"\n [viewsSectionExpanded]=\"state.viewsSectionExpanded\"\n (entitySelected)=\"onEntitySelected($event)\"\n (toggleCollapse)=\"toggleNavigationPanel()\"\n (sectionToggled)=\"stateService.toggleSection($event)\"\n (openRecord)=\"onOpenRecordFromNav($event)\"\n (selectRecord)=\"onSelectRecordFromNav($event)\"\n (expandAndFocus)=\"onExpandAndFocus($event)\">\n </mj-explorer-navigation-panel>\n </div>\n }\n\n <!-- Main Content Area -->\n <div class=\"content-area\">\n <!-- Breadcrumb Bar - Hidden at home level -->\n @if (!isAtHomeLevel && breadcrumbs.length > 0) {\n <div class=\"breadcrumb-bar\">\n @for (crumb of breadcrumbs; track crumb.label; let i = $index; let last = $last) {\n <span\n class=\"breadcrumb-item\"\n [class.clickable]=\"!last\"\n [class.current]=\"last\"\n (click)=\"onBreadcrumbClick(crumb, i)\"\n [title]=\"crumb.label\">\n @if (crumb.icon) {\n <i [class]=\"crumb.icon\" class=\"breadcrumb-icon\"></i>\n }\n <span class=\"breadcrumb-label\">{{ crumb.label }}</span>\n </span>\n @if (!last) {\n <i class=\"fa-solid fa-chevron-right breadcrumb-separator\"></i>\n }\n }\n </div>\n }\n\n <!-- Header -->\n <div class=\"content-header\" [class.home-header]=\"isAtHomeLevel\">\n <div class=\"header-left\">\n @if (selectedEntity) {\n <i [class]=\"getEntityIcon(selectedEntity)\" class=\"entity-icon\"></i>\n <h2 class=\"entity-title\">{{ selectedEntity.DisplayNameOrName }}</h2>\n @if (debouncedFilterText && filteredRecordCount !== totalRecordCount) {\n <span class=\"record-count\">{{ filteredRecordCount | number }} of {{ totalRecordCount | number }} records</span>\n } @else {\n <span class=\"record-count\">{{ totalRecordCount | number }} records</span>\n }\n\n <!-- View selector + view header now live inside mj-view-workspace (below). -->\n <!-- Add-to-List is now owned inside the grid plug-in renderer (it hosts its own dialog). -->\n } @else {\n @if (displayIcon) {\n <i [class]=\"displayIcon\" class=\"entity-icon\"></i>\n }\n <h2 class=\"entity-title\">{{ displayTitle }}</h2>\n <span class=\"record-count\">{{ entities.length }} entities available</span>\n }\n </div>\n\n <div class=\"header-center\">\n @if (selectedEntity) {\n <div class=\"smart-filter-container\">\n <i class=\"fa-solid fa-search filter-icon\"></i>\n <input\n #filterInput\n type=\"text\"\n class=\"smart-filter-input\"\n placeholder=\"Filter records... (press / to focus)\"\n [value]=\"liveFilterText\"\n (input)=\"onFilterInputChanged(filterInput.value)\"\n />\n @if (liveFilterText) {\n <button class=\"clear-filter-btn\" (click)=\"clearRecordFilter()\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n }\n <!-- Home-level search moved to search hero section -->\n </div>\n\n <div class=\"header-right\">\n @if (selectedEntity) {\n <!-- View-type switcher AND all view-specific controls (timeline date/orientation/sort,\n map render mode, etc.) now live inside the plug-in renderers hosted by\n mj-view-workspace. Nothing view-type-specific lives in this header anymore. -->\n }\n @if (!selectedEntity) {\n <!-- Quick Access panel toggle -->\n <button\n class=\"header-action-btn\"\n [class.active]=\"state.quickAccessPanelOpen\"\n (click)=\"toggleQuickAccessPanel()\"\n title=\"Recents & Favorites\">\n <i class=\"fa-solid fa-clock-rotate-left\"></i>\n @if (recentRecords.length + favoriteRecords.length > 0) {\n <span class=\"qa-badge\">{{ recentRecords.length + favoriteRecords.length }}</span>\n }\n </button>\n }\n </div>\n </div>\n\n <!-- Content Body - Using mj-entity-viewer composite -->\n <div class=\"content-body\" [class.home-content]=\"isAtHomeLevel\">\n @if (!selectedEntity) {\n <!-- Concept D: Application Groups + Search-First Home View -->\n <div class=\"home-view-concept-d\">\n @if (isLoadingEntities) {\n <div class=\"loading-state\">\n <mj-loading text=\"Loading entities...\" size=\"medium\"></mj-loading>\n </div>\n } @else {\n <div class=\"home-main-area\" [class.panel-open]=\"state.quickAccessPanelOpen\">\n <!-- Search Hero -->\n <div class=\"search-hero\">\n <div class=\"search-hero-container\">\n <i class=\"fa-solid fa-magnifying-glass search-hero-icon\"></i>\n <input\n #filterInput\n type=\"text\"\n class=\"search-hero-input\"\n placeholder=\"Search entities...\"\n [(ngModel)]=\"entityFilterText\"\n />\n @if (entityFilterText) {\n <button class=\"search-hero-clear\" (click)=\"entityFilterText = ''\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n } @else {\n <span class=\"search-hero-shortcut\">/</span>\n }\n </div>\n\n <!-- Meta row: entity count + All/Favorites pills -->\n <div class=\"search-meta-row\">\n <span class=\"search-entity-count\">\n {{ filteredEntityCount }} entities\n @if (applicationCount > 0) {\n across {{ applicationCount }} applications\n }\n </span>\n <div class=\"pill-toggle\">\n <button\n class=\"pill-btn\"\n [class.active]=\"state.homeViewMode === 'all'\"\n (click)=\"setHomeViewMode('all')\">\n All Entities\n </button>\n <button\n class=\"pill-btn\"\n [class.active]=\"state.homeViewMode === 'favorites'\"\n (click)=\"setHomeViewMode('favorites')\">\n <i class=\"fa-solid fa-star\"></i> My Favorites\n </button>\n </div>\n </div>\n </div>\n\n <!-- Entity Groups Area -->\n <div class=\"entity-groups-area\">\n @if (entityFilter?.applicationId) {\n <!-- Single-app mode: flat entity grid (no grouping) -->\n <div class=\"entity-item-grid\">\n @for (entity of flatFilteredEntities; track entity.ID) {\n <div\n class=\"entity-item\"\n (click)=\"onEntitySelected(entity)\"\n [title]=\"entity.Description || entity.DisplayNameOrName\">\n <div class=\"entity-item-icon\">\n <i [class]=\"getEntityIcon(entity)\"></i>\n </div>\n <div class=\"entity-item-text\">\n <span class=\"entity-item-name\">{{ entity.DisplayNameOrName }}</span>\n @if (entity.Description) {\n <span class=\"entity-item-desc\">{{ entity.Description }}</span>\n }\n </div>\n <button\n class=\"entity-item-fav\"\n [class.favorited]=\"isEntityFavorited(entity)\"\n (click)=\"toggleEntityFavorite(entity, $event)\"\n [title]=\"isEntityFavorited(entity) ? 'Remove from favorites' : 'Add to favorites'\">\n <i [class]=\"isEntityFavorited(entity) ? 'fa-solid fa-star' : 'fa-regular fa-star'\"></i>\n </button>\n </div>\n }\n </div>\n } @else {\n <!-- Multi-app mode: grouped by application -->\n @for (group of filteredAppEntityGroups; track group.applicationId) {\n <div class=\"app-group\">\n <div class=\"app-group-header\" (click)=\"toggleAppGroup(group.applicationId)\">\n <div\n class=\"app-group-icon\"\n [style.background]=\"group.applicationColor ? group.applicationColor + '15' : null\"\n [style.color]=\"group.applicationColor || null\">\n <i [class]=\"group.applicationIcon || 'fa-solid fa-folder'\"></i>\n </div>\n <span class=\"app-group-name\">{{ group.applicationName }}</span>\n <span class=\"app-group-count\">{{ group.entities.length }}</span>\n <i class=\"fa-solid fa-chevron-right app-group-chevron\"\n [class.expanded]=\"group.isExpanded\"></i>\n </div>\n @if (group.isExpanded) {\n <div class=\"app-group-entities\">\n <div class=\"entity-item-grid\">\n @for (entity of group.entities; track entity.ID) {\n <div\n class=\"entity-item\"\n (click)=\"onEntitySelected(entity)\"\n [title]=\"entity.Description || entity.DisplayNameOrName\">\n <div class=\"entity-item-icon\">\n <i [class]=\"getEntityIcon(entity)\"></i>\n </div>\n <div class=\"entity-item-text\">\n <span class=\"entity-item-name\">{{ entity.DisplayNameOrName }}</span>\n @if (entity.Description) {\n <span class=\"entity-item-desc\">{{ entity.Description }}</span>\n }\n </div>\n <button\n class=\"entity-item-fav\"\n [class.favorited]=\"isEntityFavorited(entity)\"\n (click)=\"toggleEntityFavorite(entity, $event)\"\n [title]=\"isEntityFavorited(entity) ? 'Remove from favorites' : 'Add to favorites'\">\n <i [class]=\"isEntityFavorited(entity) ? 'fa-solid fa-star' : 'fa-regular fa-star'\"></i>\n </button>\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n }\n\n <!-- No results -->\n @if (filteredEntityCount === 0 && entities.length > 0) {\n <mj-empty-state Variant=\"no-results\"\n Title=\"No entities found\"\n [Message]=\"NoEntityResultsMessage\" />\n }\n @if (entities.length === 0) {\n <mj-empty-state Icon=\"fa-solid fa-database\"\n Title=\"No Entities Available\"\n Message=\"There are no entities configured for this application.\" />\n }\n </div>\n </div>\n\n <!-- Quick Access Panel (right slide-in) -->\n <div class=\"quick-access-panel\" [class.open]=\"state.quickAccessPanelOpen\">\n <div class=\"qa-header\">\n <h3>Quick Access</h3>\n <button class=\"qa-close-btn\" (click)=\"toggleQuickAccessPanel()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n </div>\n <div class=\"qa-body\">\n <!-- Recent Records (max 3) -->\n <mj-accordion-panel [Expanded]=\"isQuickAccessSectionExpanded('recentRecords')\" (ExpandedChange)=\"toggleQuickAccessSection('recentRecords')\">\n <ng-template mjAccordionTitle>\n <i class=\"fa-solid fa-clock-rotate-left qa-section-icon\"></i>\n <span>Recent Records</span>\n <span class=\"mj-accordion-badge mj-accordion-badge--right\">{{ quickAccessRecentRecords.length }}</span>\n </ng-template>\n @for (record of quickAccessRecentRecords; track record.entityId + '|' + record.recordId) {\n <div class=\"qa-item\" (click)=\"onRecentRecordClick(record)\">\n <div class=\"qa-item-icon\">\n <i [class]=\"getEntityIconById(record.entityId)\"></i>\n </div>\n <div class=\"qa-item-info\">\n <div class=\"qa-item-name\">{{ record.recordName || record.recordId }}</div>\n <div class=\"qa-item-meta\">{{ record.entityName }}</div>\n </div>\n <span class=\"qa-item-time\">{{ record.relativeTime }}</span>\n </div>\n }\n @if (quickAccessRecentRecords.length === 0) {\n <div class=\"qa-empty\">No recent records</div>\n }\n </mj-accordion-panel>\n\n <!-- Recent Entities (max 3) -->\n <mj-accordion-panel [Expanded]=\"isQuickAccessSectionExpanded('recentEntities')\" (ExpandedChange)=\"toggleQuickAccessSection('recentEntities')\">\n <ng-template mjAccordionTitle>\n <i class=\"fa-solid fa-table qa-section-icon\"></i>\n <span>Recent Entities</span>\n <span class=\"mj-accordion-badge mj-accordion-badge--right\">{{ quickAccessRecentEntities.length }}</span>\n </ng-template>\n @for (entity of quickAccessRecentEntities; track entity.ID) {\n <div class=\"qa-item\" (click)=\"onEntitySelected(entity)\">\n <div class=\"qa-item-icon\">\n <i [class]=\"getEntityIcon(entity)\"></i>\n </div>\n <div class=\"qa-item-info\">\n <div class=\"qa-item-name\">{{ entity.DisplayNameOrName }}</div>\n </div>\n </div>\n }\n @if (quickAccessRecentEntities.length === 0) {\n <div class=\"qa-empty\">No recent entities</div>\n }\n </mj-accordion-panel>\n\n <!-- Favorite Records (max 3) -->\n <mj-accordion-panel [Expanded]=\"isQuickAccessSectionExpanded('favoriteRecords')\" (ExpandedChange)=\"toggleQuickAccessSection('favoriteRecords')\">\n <ng-template mjAccordionTitle>\n <i class=\"fa-solid fa-star qa-section-icon\" style=\"color: var(--mj-status-warning);\"></i>\n <span>Favorite Records</span>\n <span class=\"mj-accordion-badge mj-accordion-badge--right\">{{ quickAccessFavoriteRecords.length }}</span>\n </ng-template>\n @for (record of quickAccessFavoriteRecords; track record.userFavoriteId) {\n <div class=\"qa-item\" (click)=\"onFavoriteRecordClick(record)\">\n <div class=\"qa-item-icon\">\n <i [class]=\"getEntityIconById(record.entityId)\"></i>\n </div>\n <div class=\"qa-item-info\">\n <div class=\"qa-item-name\">{{ record.recordName || record.recordId }}</div>\n <div class=\"qa-item-meta\">{{ record.entityName }}</div>\n </div>\n </div>\n }\n @if (quickAccessFavoriteRecords.length === 0) {\n <div class=\"qa-empty\">No favorite records</div>\n }\n </mj-accordion-panel>\n </div>\n </div>\n }\n </div>\n } @else {\n <!--\n mj-view-workspace owns the saved-view lifecycle (select / save / duplicate / rename /\n delete / revert / quick-save) and the inner data renderer. Every view type is now a\n self-contained plug-in: view-type-specific features (export / add-to-list / delete /\n grid-state / timeline + map controls) live INSIDE the plug-in renderers and no longer\n bubble through the workspace. The dashboard only handles navigation (open record / open\n related record / create new record) + the generic filter/data-load/count signals + URL\n and view-CRUD state sync. AutoSaveView=true → the workspace persists view CRUD itself.\n -->\n <mj-view-workspace\n [Entity]=\"selectedEntity\"\n [AutoSaveView]=\"true\"\n [SelectedView]=\"selectedViewEntity\"\n [FilterText]=\"debouncedFilterText\"\n [SelectedRecordId]=\"state.selectedRecordId\"\n [ViewerConfig]=\"viewerConfig\"\n (SelectedViewChange)=\"onWorkspaceViewSelected($event)\"\n (ViewSelected)=\"onWorkspaceViewSelected($event)\"\n (OpenViewInTabRequested)=\"onOpenInTabRequested($event)\"\n (OpenRecordRequested)=\"onWorkspaceOpenRecord($event)\"\n (OpenRelatedRecordRequested)=\"onOpenRelatedRecordRequested($event)\"\n (CreateNewRecordRequested)=\"onCreateNewRecordRequested($event)\"\n (RecordSelected)=\"onViewerRecordSelected($event)\"\n (AfterViewSave)=\"onWorkspaceViewSaved()\"\n (AfterViewDelete)=\"onWorkspaceViewSaved()\"\n (FilterTextChanged)=\"onFilterTextChanged($event)\"\n (DataLoaded)=\"onDataLoaded($event)\"\n (FilteredCountChanged)=\"onFilteredCountChanged($event)\">\n </mj-view-workspace>\n }\n </div>\n </div>\n\n <!-- Detail Panel (Right - Slide In) -->\n @if (state.detailPanelOpen && selectedRecord) {\n <div class=\"detail-panel\" [style.width.px]=\"state.detailPanelWidth\">\n <mj-entity-record-detail-panel\n [entity]=\"detailPanelEntity\"\n [record]=\"selectedRecord\"\n (close)=\"onDetailPanelClosed()\"\n (openRecord)=\"onOpenRecord($event)\"\n (navigateToRelated)=\"onNavigateToRelated($event)\"\n (openRelatedRecord)=\"onOpenRelatedRecord($event)\"\n (openForeignKeyRecord)=\"onOpenForeignKeyRecord($event)\">\n </mj-entity-record-detail-panel>\n </div>\n }\n\n <!-- View config panel, filter dialog, quick-save/duplicate/shared-view-warning dialogs\n now live inside mj-view-workspace (the saved-view lifecycle moved there).\n Export + Add-to-List dialogs now live inside the grid plug-in renderer (it hosts its own\n Generic dialogs), so they are no longer rendered at the dashboard level. -->\n</div>\n"]}