@memberjunction/ng-dashboards 5.40.2 → 5.42.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.
- package/dist/AI/components/analytics/ai-analytics-resource.component.d.ts +38 -4
- package/dist/AI/components/analytics/ai-analytics-resource.component.d.ts.map +1 -1
- package/dist/AI/components/analytics/ai-analytics-resource.component.js +148 -20
- package/dist/AI/components/analytics/ai-analytics-resource.component.js.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-management-data.d.ts +216 -0
- package/dist/AI/components/analytics/realtime/realtime-management-data.d.ts.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-management-data.js +313 -0
- package/dist/AI/components/analytics/realtime/realtime-management-data.js.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-management.component.d.ts +103 -0
- package/dist/AI/components/analytics/realtime/realtime-management.component.d.ts.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-management.component.js +1060 -0
- package/dist/AI/components/analytics/realtime/realtime-management.component.js.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-overview.component.d.ts +87 -0
- package/dist/AI/components/analytics/realtime/realtime-overview.component.d.ts.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-overview.component.js +710 -0
- package/dist/AI/components/analytics/realtime/realtime-overview.component.js.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts +127 -0
- package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-session-data.js +233 -0
- package/dist/AI/components/analytics/realtime/realtime-session-data.js.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-sessions.component.d.ts +94 -0
- package/dist/AI/components/analytics/realtime/realtime-sessions.component.d.ts.map +1 -0
- package/dist/AI/components/analytics/realtime/realtime-sessions.component.js +728 -0
- package/dist/AI/components/analytics/realtime/realtime-sessions.component.js.map +1 -0
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js +2 -2
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.js +2 -2
- package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +2 -2
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/AI/index.d.ts +5 -0
- package/dist/AI/index.d.ts.map +1 -1
- package/dist/AI/index.js +7 -0
- package/dist/AI/index.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +2 -2
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/Home/home-dashboard.component.js +12 -8
- package/dist/Home/home-dashboard.component.js.map +1 -1
- package/dist/Integration/components/connections/connections.component.d.ts +12 -0
- package/dist/Integration/components/connections/connections.component.d.ts.map +1 -1
- package/dist/Integration/components/connections/connections.component.js +419 -333
- package/dist/Integration/components/connections/connections.component.js.map +1 -1
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js +5 -5
- package/dist/KnowledgeHub/components/config/knowledge-config-resource.component.js.map +1 -1
- package/dist/MCP/mcp-dashboard.component.d.ts +16 -2
- package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -1
- package/dist/MCP/mcp-dashboard.component.js +37 -5
- package/dist/MCP/mcp-dashboard.component.js.map +1 -1
- package/dist/ai-dashboards.module.d.ts +22 -19
- package/dist/ai-dashboards.module.d.ts.map +1 -1
- package/dist/ai-dashboards.module.js +18 -0
- package/dist/ai-dashboards.module.js.map +1 -1
- package/dist/core-dashboards.module.d.ts +1 -1
- package/dist/core-dashboards.module.d.ts.map +1 -1
- package/dist/core-dashboards.module.js +3 -1
- package/dist/core-dashboards.module.js.map +1 -1
- package/package.json +55 -55
|
@@ -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":";;;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C,8BAA8B","sourcesContent":["import { Component, OnInit, OnDestroy, 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 } from './models/explorer-state.interface';\nimport { OpenRecordEvent, SelectRecordEvent } from './components/navigation-panel/navigation-panel.component';\nimport { DisplaySimpleNotificationRequestData, MJEventType, MJGlobal } from '@memberjunction/global';\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 {\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 /**\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 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 * 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 <div class=\"home-no-results\">\n <i class=\"fa-solid fa-magnifying-glass\"></i>\n <p>No entities match \"{{ entityFilterText }}\"</p>\n </div>\n }\n @if (entities.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-database empty-icon\"></i>\n <h3>No Entities Available</h3>\n <p>There are no entities configured for this application.</p>\n </div>\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 <div class=\"qa-section\" [class.collapsed]=\"!isQuickAccessSectionExpanded('recentRecords')\">\n <div class=\"qa-section-header\" (click)=\"toggleQuickAccessSection('recentRecords')\">\n <i class=\"fa-solid fa-clock-rotate-left qa-section-icon\"></i>\n <span>Recent Records</span>\n <span class=\"qa-section-count\">{{ quickAccessRecentRecords.length }}</span>\n <i class=\"fa-solid fa-chevron-down qa-section-chevron\"></i>\n </div>\n <div class=\"qa-section-body\">\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 </div>\n </div>\n\n <!-- Recent Entities (max 3) -->\n <div class=\"qa-section\" [class.collapsed]=\"!isQuickAccessSectionExpanded('recentEntities')\">\n <div class=\"qa-section-header\" (click)=\"toggleQuickAccessSection('recentEntities')\">\n <i class=\"fa-solid fa-table qa-section-icon\"></i>\n <span>Recent Entities</span>\n <span class=\"qa-section-count\">{{ quickAccessRecentEntities.length }}</span>\n <i class=\"fa-solid fa-chevron-down qa-section-chevron\"></i>\n </div>\n <div class=\"qa-section-body\">\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 </div>\n </div>\n\n <!-- Favorite Records (max 3) -->\n <div class=\"qa-section\" [class.collapsed]=\"!isQuickAccessSectionExpanded('favoriteRecords')\">\n <div class=\"qa-section-header\" (click)=\"toggleQuickAccessSection('favoriteRecords')\">\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=\"qa-section-count\">{{ quickAccessFavoriteRecords.length }}</span>\n <i class=\"fa-solid fa-chevron-down qa-section-chevron\"></i>\n </div>\n <div class=\"qa-section-body\">\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 </div>\n </div>\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,EAAwC,KAAK,EAAE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DetectorRef, 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 } from './models/explorer-state.interface';\nimport { OpenRecordEvent, SelectRecordEvent } from './components/navigation-panel/navigation-panel.component';\nimport { DisplaySimpleNotificationRequestData, MJEventType, MJGlobal } from '@memberjunction/global';\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 {\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 /**\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 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 * 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 <div class=\"home-no-results\">\n <i class=\"fa-solid fa-magnifying-glass\"></i>\n <p>No entities match \"{{ entityFilterText }}\"</p>\n </div>\n }\n @if (entities.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-database empty-icon\"></i>\n <h3>No Entities Available</h3>\n <p>There are no entities configured for this application.</p>\n </div>\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 <div class=\"qa-section\" [class.collapsed]=\"!isQuickAccessSectionExpanded('recentRecords')\">\n <div class=\"qa-section-header\" (click)=\"toggleQuickAccessSection('recentRecords')\">\n <i class=\"fa-solid fa-clock-rotate-left qa-section-icon\"></i>\n <span>Recent Records</span>\n <span class=\"qa-section-count\">{{ quickAccessRecentRecords.length }}</span>\n <i class=\"fa-solid fa-chevron-down qa-section-chevron\"></i>\n </div>\n <div class=\"qa-section-body\">\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 </div>\n </div>\n\n <!-- Recent Entities (max 3) -->\n <div class=\"qa-section\" [class.collapsed]=\"!isQuickAccessSectionExpanded('recentEntities')\">\n <div class=\"qa-section-header\" (click)=\"toggleQuickAccessSection('recentEntities')\">\n <i class=\"fa-solid fa-table qa-section-icon\"></i>\n <span>Recent Entities</span>\n <span class=\"qa-section-count\">{{ quickAccessRecentEntities.length }}</span>\n <i class=\"fa-solid fa-chevron-down qa-section-chevron\"></i>\n </div>\n <div class=\"qa-section-body\">\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 </div>\n </div>\n\n <!-- Favorite Records (max 3) -->\n <div class=\"qa-section\" [class.collapsed]=\"!isQuickAccessSectionExpanded('favoriteRecords')\">\n <div class=\"qa-section-header\" (click)=\"toggleQuickAccessSection('favoriteRecords')\">\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=\"qa-section-count\">{{ quickAccessFavoriteRecords.length }}</span>\n <i class=\"fa-solid fa-chevron-down qa-section-chevron\"></i>\n </div>\n <div class=\"qa-section-body\">\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 </div>\n </div>\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"]}
|