@memberjunction/ng-dashboards 5.10.0 → 5.11.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/DataExplorer/data-explorer-dashboard.component.d.ts +6 -2
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +24 -6
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.d.ts +55 -1
- package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.js +659 -194
- package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
- package/package.json +40 -40
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-explorer-dashboard.component.js","sourceRoot":"","sources":["../../src/DataExplorer/data-explorer-dashboard.component.ts","../../src/DataExplorer/data-explorer-dashboard.component.html"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAwC,KAAK,EAA4B,YAAY,EAAc,SAAS,EAAU,MAAM,eAAe,CAAC;AAC9J,OAAO,EAAU,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAqB,MAAM,2BAA2B,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAG,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAc,OAAO,EAAE,iBAAiB,EAAmB,MAAM,sBAAsB,CAAC;AACzG,mEAAmE;AACnE,OAAO,EAA2C,cAAc,EAA4B,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,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;4BACrD,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;yBAC7E,CAAC;wBACF,UAAU,CAAC,QAAQ,EAAE;4BACnB,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;yBAChF,CAAC;qBACH,CAAC;iBACH;;kBAQA,SAAS;mBAAC,aAAa;;kBAGvB,SAAS;mBAAC,qBAAqB;;kBAG/B,SAAS;mBAAC,qBAAqB;;kBAG/B,SAAS;mBAAC,wBAAwB;;kBAMlC,KAAK;;kBAML,KAAK;;kBAML,KAAK;;kBAML,KAAK;;kBA2kBL,YAAY;mBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;;kFAjnBjC,8BAA8B","sourcesContent":["import { Component, OnInit, OnDestroy, ChangeDetectorRef, Input, OnChanges, SimpleChanges, HostListener, ElementRef, ViewChild, NgZone } from '@angular/core';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { Subject } from 'rxjs';\nimport { takeUntil, debounceTime, distinctUntilChanged, filter } from 'rxjs/operators';\nimport { BaseDashboard, NavigationService } from '@memberjunction/ng-shared';\nimport { RecentAccessService } from '@memberjunction/ng-shared-generic';\nimport { RegisterClass , UUIDsEqual } from '@memberjunction/global';\nimport { Metadata, EntityInfo, RunView, EntityFieldTSType, ApplicationInfo } from '@memberjunction/core';\n// CompositeKey is used via buildCompositeKey from ng-entity-viewer\nimport { MJApplicationEntityEntity, ResourceData, UserInfoEngine, ViewGridAggregatesConfig } from '@memberjunction/core-entities';\nimport {\n RecordSelectedEvent,\n RecordOpenedEvent,\n DataLoadedEvent,\n FilteredCountChangedEvent,\n EntityViewerConfig,\n EntityViewMode,\n NavigateToRelatedEvent,\n EntityViewerComponent,\n ViewGridState,\n GridStateChangedEvent,\n ViewSaveEvent,\n ViewConfigPanelComponent,\n ViewConfigSummary,\n QuickSaveEvent,\n DuplicateViewEvent,\n SharedViewAction,\n buildCompositeKey,\n buildPkString\n} from '@memberjunction/ng-entity-viewer';\nimport { ViewSelectedEvent, SaveViewRequestedEvent, ViewSelectorComponent } from './components/view-selector/view-selector.component';\nimport { CompositeFilterDescriptor, FilterFieldInfo, createEmptyFilter } from '@memberjunction/ng-filter-builder';\nimport { MJUserViewEntityExtended } 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, MJEvent, MJEventType, MJGlobal } from '@memberjunction/global';\nimport { ListManagementDialogConfig, ListManagementResult } from '@memberjunction/ng-list-management';\nimport {\n ExportService,\n ExportDialogConfig,\n ExportDialogResult\n} from '@memberjunction/ng-export-service';\nimport {\n ExportColumn,\n ExportData\n} from '@memberjunction/export-engine';\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 private destroy$ = new Subject<void>();\n private metadata = new Metadata();\n\n /** Reference to the filter input for keyboard shortcuts */\n @ViewChild('filterInput') filterInputRef: ElementRef<HTMLInputElement> | undefined;\n\n /** Reference to the view selector for refreshing after save */\n @ViewChild(ViewSelectorComponent) viewSelectorRef: ViewSelectorComponent | undefined;\n\n /** Reference to the entity viewer for refreshing after view save */\n @ViewChild(EntityViewerComponent) entityViewerRef: EntityViewerComponent | undefined;\n\n /** Reference to the view config panel for passing filter state */\n @ViewChild(ViewConfigPanelComponent) viewConfigPanelRef: ViewConfigPanelComponent | 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 // 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 // Date field dropdown state\n public isDateFieldDropdownOpen: boolean = false;\n\n // Flag to skip URL updates during initialization (when applying deep link)\n private skipUrlUpdates: boolean = true;\n\n // Track the last URL we navigated to, to avoid reacting to our own navigation\n private lastNavigatedUrl: string = '';\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 // Export functionality\n public showExportDialog: boolean = false;\n public exportDialogConfig: ExportDialogConfig | null = null;\n\n // List management\n public showListManagementDialog: boolean = false;\n public listManagementConfig: ListManagementDialogConfig | null = null;\n\n // Selection tracking for grid - needed to enable Add to List button in header\n public selectedRecordIds: string[] = [];\n public selectedRecords: Record<string, unknown>[] = [];\n\n // Quick Save Dialog state (F-001)\n public showQuickSaveDialog: boolean = false;\n public quickSaveSummary: ViewConfigSummary | null = null;\n\n // Duplicate View Dialog state (F-005)\n public showDuplicateDialog: boolean = false;\n public duplicateSourceViewName: string = '';\n public duplicateSummary: ViewConfigSummary | null = null;\n private duplicateTargetViewId: string | null = null;\n\n // Shared View Warning Dialog state (Scenario 5)\n public showSharedViewWarning: boolean = false;\n private pendingQuickSaveEvent: QuickSaveEvent | 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 * Check if the currently selected entity has date fields available for timeline view.\n * Used to conditionally show the timeline toggle button in the header.\n */\n get entityHasDateFields(): boolean {\n if (!this.selectedEntity) return false;\n return this.selectedEntity.Fields.some(\n f => f.TSType === EntityFieldTSType.Date\n );\n }\n\n /**\n * Get available date fields for the currently selected entity.\n * Used for the date field selector in timeline view.\n */\n get availableDateFields(): { name: string; displayName: string }[] {\n if (!this.selectedEntity) return [];\n return this.selectedEntity.Fields\n .filter(f => f.TSType === EntityFieldTSType.Date)\n .sort((a, b) => {\n // Prioritize DefaultInView fields, then by Sequence\n if (a.DefaultInView && !b.DefaultInView) return -1;\n if (!a.DefaultInView && b.DefaultInView) return 1;\n return a.Sequence - b.Sequence;\n })\n .map(f => ({\n name: f.Name,\n displayName: f.DisplayNameOrName\n }));\n }\n\n /**\n * Get the effective timeline date field name.\n * Returns stored value if valid, otherwise first available date field.\n */\n get effectiveTimelineDateField(): string | null {\n const available = this.availableDateFields;\n if (available.length === 0) return null;\n\n // Check if stored value is still valid\n if (this.state.timelineDateFieldName && available.some(f => f.name === this.state.timelineDateFieldName)) {\n return this.state.timelineDateFieldName;\n }\n\n // Default to first available\n return available[0].name;\n }\n\n /**\n * Get the display name of the effective timeline date field.\n */\n get effectiveTimelineDateFieldDisplayName(): string {\n const fieldName = this.effectiveTimelineDateField;\n if (!fieldName) return '';\n const field = this.availableDateFields.find(f => f.name === fieldName);\n return field?.displayName || fieldName;\n }\n\n /**\n * Set the timeline date field.\n */\n setTimelineDateField(fieldName: string): void {\n this.state.timelineDateFieldName = fieldName;\n this.stateService.updateState({ timelineDateFieldName: fieldName });\n this.isDateFieldDropdownOpen = false;\n this.cdr.detectChanges();\n }\n\n /**\n * Toggle the date field dropdown open/closed.\n */\n toggleDateFieldDropdown(): void {\n this.isDateFieldDropdownOpen = !this.isDateFieldDropdownOpen;\n }\n\n /**\n * Close the date field dropdown.\n */\n closeDateFieldDropdown(): void {\n this.isDateFieldDropdownOpen = false;\n }\n\n /**\n * Toggle timeline orientation between vertical and horizontal.\n */\n toggleTimelineOrientation(): void {\n const newOrientation = this.state.timelineOrientation === 'vertical' ? 'horizontal' : 'vertical';\n this.state.timelineOrientation = newOrientation;\n this.stateService.updateState({ timelineOrientation: newOrientation });\n this.cdr.detectChanges();\n }\n\n /**\n * Toggle timeline sort order between newest first (desc) and oldest first (asc).\n */\n toggleTimelineSortOrder(): void {\n const newSortOrder = this.state.timelineSortOrder === 'desc' ? 'asc' : 'desc';\n this.state.timelineSortOrder = newSortOrder;\n this.stateService.updateState({ timelineSortOrder: newSortOrder });\n this.cdr.detectChanges();\n }\n\n /**\n * Get the current timeline configuration for the entity-viewer.\n */\n get currentTimelineConfig(): { dateFieldName: string; orientation: 'vertical' | 'horizontal'; sortOrder: 'asc' | 'desc' } | null {\n const dateField = this.effectiveTimelineDateField;\n if (!dateField) return null;\n return {\n dateFieldName: dateField,\n orientation: this.state.timelineOrientation,\n sortOrder: this.state.timelineSortOrder\n };\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: false, // We have our own toggle in the dashboard header\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 /**\n * Current grid state (built from view entity or local state changes)\n * This is passed to mj-entity-viewer to control column display\n */\n public currentGridState: ViewGridState | null = null;\n\n // Filter dialog state (rendered at dashboard level for full viewport width)\n public isFilterDialogOpen: boolean = false;\n public filterDialogFields: FilterFieldInfo[] = [];\n public filterDialogState: CompositeFilterDescriptor = createEmptyFilter();\n public filterDialogDisabled: boolean = false;\n\n // View save state\n public isSavingView: boolean = false;\n\n constructor(\n public stateService: ExplorerStateService,\n private cdr: ChangeDetectorRef,\n private router: Router,\n private recentAccessService: RecentAccessService,\n private navigationService: NavigationService,\n private exportService: ExportService,\n private ngZone: NgZone\n ) {\n super();\n this.state = this.stateService.CurrentState;\n }\n\n async ngOnInit(): Promise<void> {\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 // Parse URL state FIRST - URL wins over persisted state\n // This must happen before loading entities to prevent race conditions\n const urlState = this.parseUrlState();\n\n // Set context for state service (enables context-specific settings)\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 // URL has state - apply it (overrides persisted state)\n this.applyUrlState(urlState);\n } else if (this.deepLink) {\n // No URL state but @Input deepLink provided - use that\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\n if (entityChanged) {\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n }\n\n this.onStateChanged();\n\n // Update URL to reflect current state (for deep linking)\n if (!this.skipUrlUpdates) {\n this.updateUrl();\n }\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 the shell's workspace sync, which fires NavigationEnd, which triggers\n // applyUrlState, which clears the filter text. The debouncedFilterText flows directly\n // 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 // Subscribe to router NavigationEnd events for back/forward button support\n this.router.events\n .pipe(\n filter((event): event is NavigationEnd => event instanceof NavigationEnd),\n takeUntil(this.destroy$)\n )\n .subscribe(event => {\n // Only react to navigation events that weren't triggered by us\n // Normalize URLs by decoding to handle + vs %20 encoding differences\n // Note: decodeURIComponent doesn't decode +, so we also replace + with space\n const currentUrl = event.urlAfterRedirects || event.url;\n const normalizedCurrentUrl = decodeURIComponent(currentUrl).replace(/\\+/g, ' ');\n const normalizedLastUrl = decodeURIComponent(this.lastNavigatedUrl).replace(/\\+/g, ' ');\n const isExternal = normalizedCurrentUrl !== normalizedLastUrl;\n if (isExternal) {\n this.onExternalNavigation(currentUrl);\n }\n });\n\n // Enable URL updates now that initialization is complete\n this.skipUrlUpdates = false;\n\n // Update URL to reflect current state (whether from URL, deepLink, or persisted)\n this.updateUrl();\n\n // Notify that loading is complete (for resource wrapper integration)\n this.NotifyLoadComplete();\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)\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.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.onQuickSaveRequested(true);\n return;\n }\n\n // Ctrl+Shift+V / Cmd+Shift+V: Open view selector\n if ((event.key === 'V' || (event.key === 'v' && event.shiftKey))) {\n event.preventDefault();\n this.viewSelectorRef?.toggleDropdown();\n return;\n }\n\n // Ctrl+, / Cmd+,: Toggle config panel\n if (event.key === ',') {\n event.preventDefault();\n if (this.state.viewConfigPanelOpen) {\n this.onCloseViewConfigPanel();\n } else {\n this.onConfigureViewRequested();\n }\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 this.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 = new RunView();\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 // Ensure any pending grid state changes are saved before switching entities\n // This ensures column resizes/reorders are saved to the current entity's view before switching\n this.entityViewerRef?.EnsurePendingChangesSaved();\n\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 this.selectedViewEntity = null;\n this.selectedEntity = entity;\n // Load user's saved default grid state for this entity (if any)\n // This ensures formatting and column settings persist across sessions\n this.currentGridState = this.loadUserDefaultGridState();\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 // Load user's saved default grid state for this entity (if any)\n this.currentGridState = this.loadUserDefaultGridState();\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 MANAGEMENT\n // ========================================\n\n /**\n * Handle view selection from view selector dropdown\n */\n public onViewSelected(event: ViewSelectedEvent): void {\n // Ensure any pending grid state changes are saved before switching views\n // This ensures column resizes/reorders are saved to the current view before switching\n this.entityViewerRef?.EnsurePendingChangesSaved();\n\n this.selectedViewEntity = event.view;\n this.stateService.selectView(event.viewId);\n\n // When a view is selected, apply its configuration\n if (event.view) {\n // Parse and apply the view's grid state\n this.currentGridState = this.parseViewGridState(event.view);\n\n // Apply the view's filter - for Smart Filter views, use SmartFilterPrompt\n // For regular filter views, the WhereClause is applied in the entity-viewer\n if (event.view.SmartFilterEnabled && event.view.SmartFilterPrompt) {\n this.stateService.setSmartFilterPrompt(event.view.SmartFilterPrompt);\n } else {\n // Clear the smart filter when switching to a view with regular filters\n this.stateService.setSmartFilterPrompt('');\n }\n // Always clear user search text when switching views - smart filter is separate\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n } else {\n // Switching to default view - load user's saved defaults from UserInfoEngine\n this.currentGridState = this.loadUserDefaultGridState();\n this.stateService.setSmartFilterPrompt('');\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n }\n\n // detectChanges pushes the new bindings to entity-viewer; its viewEntity setter\n // already calls deferReload() so no explicit refresh() is needed.\n this.cdr.detectChanges();\n }\n\n /**\n * Load user's saved default grid state from UserInfoEngine\n * Returns null if no saved state exists\n */\n private loadUserDefaultGridState(): ViewGridState | null {\n if (!this.selectedEntity) return null;\n\n try {\n const settingKey = `default-view-setting/${this.selectedEntity.Name}`;\n const savedState = UserInfoEngine.Instance.GetSetting(settingKey);\n\n if (savedState) {\n const gridState = JSON.parse(savedState);\n if (gridState && Array.isArray(gridState.columnSettings)) {\n // Validate columns and sorts against current entity to prevent stale\n // fields from a previously viewed entity leaking into the query\n const validColumns = gridState.columnSettings.filter(\n (col: { Name: string }) => this.selectedEntity!.Fields.some(f => f.Name === col.Name)\n );\n const validSorts = (gridState.sortSettings || []).filter(\n (s: { field: string }) => this.selectedEntity!.Fields.some(f => f.Name === s.field)\n );\n if (validColumns.length > 0) {\n return {\n columnSettings: validColumns,\n sortSettings: validSorts\n };\n }\n }\n }\n } catch (error) {\n console.warn('[DataExplorer] Failed to load user default grid state:', error);\n }\n\n return null;\n }\n\n /**\n * Parse GridState JSON from a UserView entity\n * Returns null if no valid GridState is present\n */\n private parseViewGridState(view: MJUserViewEntityExtended): ViewGridState | null {\n if (!view.GridState) {\n return null;\n }\n\n try {\n const parsed = JSON.parse(view.GridState);\n\n // Validate structure - expect columnSettings array\n if (parsed && Array.isArray(parsed.columnSettings)) {\n // Validate columns and sorts against current entity to prevent stale\n // fields from a previously viewed entity leaking into the query\n const validColumns = this.selectedEntity\n ? parsed.columnSettings.filter(\n (col: { Name: string }) => this.selectedEntity!.Fields.some(f => f.Name === col.Name)\n )\n : parsed.columnSettings;\n const validSorts = this.selectedEntity\n ? (parsed.sortSettings || []).filter(\n (s: { field: string }) => this.selectedEntity!.Fields.some(f => f.Name === s.field)\n )\n : parsed.sortSettings || [];\n\n if (validColumns.length > 0) {\n return {\n columnSettings: validColumns,\n sortSettings: validSorts,\n aggregates: parsed.aggregates || undefined\n };\n }\n return null;\n }\n\n return null;\n } catch (error) {\n // BUG-010: Warn user about parse failure instead of silently returning null\n console.warn('[DataExplorer] Failed to parse GridState:', error);\n this.showNotification('Warning: Could not parse view grid configuration', 'info', 3000);\n return null;\n }\n }\n\n /**\n * Handle grid state changes from entity-viewer (column resize, reorder, etc.)\n * Updates the local currentGridState and marks view as modified\n */\n public onGridStateChanged(event: GridStateChangedEvent): void {\n this.currentGridState = event.gridState;\n\n // Mark view as modified if we have a selected view\n if (this.state.selectedViewId) {\n this.stateService.setViewModified(true);\n }\n }\n\n /**\n * Whether the config panel should default to save-as-new mode (BUG-011)\n */\n public defaultSaveAsNew: boolean = false;\n\n /**\n * Handle save view request from view selector (BUG-011: forward saveAsNew intent)\n */\n public onSaveViewRequested(event: SaveViewRequestedEvent): void {\n this.defaultSaveAsNew = event.saveAsNew || false;\n this.stateService.openViewConfigPanel();\n }\n\n /**\n * Handle manage views request - opens view browser\n */\n public onManageViewsRequested(): void {\n // TODO: Implement navigation to view management\n }\n\n /**\n * Handle open in tab request - opens the view as a ViewResource in a new tab\n */\n public onOpenInTabRequested(viewId: string): void {\n // Get the view name from the component's selectedViewEntity (set when view is selected)\n const viewName = this.selectedViewEntity?.Name || 'View';\n\n // Use NavigationService to open as a proper ViewResource (not entity record)\n this.navigationService.OpenView(viewId, viewName, { forceNewTab: true });\n }\n\n /**\n * Handle configure view request - opens the configuration panel\n */\n public onConfigureViewRequested(): void {\n this.stateService.openViewConfigPanel();\n }\n\n /**\n * Close the view configuration panel\n */\n public onCloseViewConfigPanel(): void {\n this.stateService.closeViewConfigPanel();\n }\n\n // ========================================\n // FILTER DIALOG (at dashboard level for full width)\n // ========================================\n\n /**\n * Handle request to open filter dialog from view config panel\n * The dialog is rendered at dashboard level to allow full viewport width\n */\n public onOpenFilterDialogRequest(event: { filterState: CompositeFilterDescriptor; filterFields: FilterFieldInfo[] }): void {\n this.filterDialogState = event.filterState;\n this.filterDialogFields = event.filterFields;\n this.filterDialogDisabled = !this.viewConfigPanelRef?.canEdit;\n this.isFilterDialogOpen = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Close the filter dialog\n */\n public onCloseFilterDialog(): void {\n this.isFilterDialogOpen = false;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle filter applied from dialog - pass back to view config panel\n */\n public onFilterApplied(filter: CompositeFilterDescriptor): void {\n this.filterDialogState = filter;\n this.isFilterDialogOpen = false;\n // The view config panel will pick up the new filter state via input binding\n this.cdr.detectChanges();\n }\n\n /**\n * Handle save view from config panel\n * BUG-001: Panel only closes on success (not on failure)\n * BUG-002: Shows success/error notifications\n * BUG-008: Consistent filter handling for both create and update paths\n */\n public async onSaveView(event: ViewSaveEvent): Promise<void> {\n if (!this.selectedEntity) return;\n\n this.isSavingView = true;\n this.cdr.detectChanges();\n\n try {\n const md = new Metadata();\n\n // Build GridState in Kendo-compatible format\n const gridState = this.buildGridState(event);\n\n // Build SortState in Kendo-compatible format\n const sortState = this.buildSortState(event);\n\n // BUG-008: Consistent filter state for both paths\n const filterStateJson = event.filterState\n ? JSON.stringify(event.filterState)\n : JSON.stringify({ logic: 'and', filters: [] });\n\n if (event.saveAsNew || !this.selectedViewEntity) {\n // Create new view\n const newView = await md.GetEntityObject<MJUserViewEntityExtended>('MJ: User Views');\n newView.Name = event.name || 'Custom';\n newView.Description = event.description;\n newView.EntityID = this.selectedEntity.ID;\n newView.UserID = md.CurrentUser.ID;\n newView.IsShared = event.isShared;\n newView.IsDefault = false;\n\n // Set GridState and SortState\n if (gridState) {\n newView.GridState = JSON.stringify(gridState);\n }\n if (sortState) {\n newView.SortState = JSON.stringify(sortState);\n }\n\n // Set Smart Filter settings\n newView.SmartFilterEnabled = event.smartFilterEnabled;\n newView.SmartFilterPrompt = event.smartFilterPrompt;\n\n // BUG-008: Always set FilterState consistently\n newView.FilterState = filterStateJson;\n\n const saved = await newView.Save();\n if (saved) {\n this.selectedViewEntity = newView;\n this.stateService.selectView(newView.ID);\n this.stateService.setViewModified(false);\n this.currentGridState = this.parseViewGridState(newView);\n this.cdr.detectChanges();\n await this.viewSelectorRef?.loadViews();\n // BUG-007: Await the refresh\n await this.entityViewerRef?.loadData();\n // BUG-001: Only close panel on success\n this.stateService.closeViewConfigPanel();\n // BUG-002: Show success notification\n this.showNotification(`View \"${newView.Name}\" created successfully`, 'success', 2500);\n } else {\n // BUG-001: Panel stays open on failure\n // BUG-002: Show error notification\n this.showNotification('Failed to create view', 'error', 3500);\n }\n } else {\n // Update existing view\n this.selectedViewEntity.Name = event.name;\n this.selectedViewEntity.Description = event.description;\n this.selectedViewEntity.IsShared = event.isShared;\n\n // Update GridState and SortState\n if (gridState) {\n this.selectedViewEntity.GridState = JSON.stringify(gridState);\n }\n if (sortState) {\n this.selectedViewEntity.SortState = JSON.stringify(sortState);\n }\n\n // Update Smart Filter settings\n this.selectedViewEntity.SmartFilterEnabled = event.smartFilterEnabled;\n this.selectedViewEntity.SmartFilterPrompt = event.smartFilterPrompt;\n\n // BUG-008: Always set FilterState consistently\n this.selectedViewEntity.FilterState = filterStateJson;\n\n const saved = await this.selectedViewEntity.Save();\n if (saved) {\n this.stateService.setViewModified(false);\n this.currentGridState = this.parseViewGridState(this.selectedViewEntity);\n this.cdr.detectChanges();\n await this.viewSelectorRef?.loadViews();\n // BUG-007: Await the refresh\n await this.entityViewerRef?.loadData();\n // BUG-001: Only close panel on success\n this.stateService.closeViewConfigPanel();\n // BUG-002: Show success notification\n this.showNotification(`View \"${event.name}\" updated successfully`, 'success', 2500);\n } else {\n // BUG-001: Panel stays open on failure\n // BUG-002: Show error notification\n this.showNotification('Failed to update view', 'error', 3500);\n }\n }\n\n this.cdr.detectChanges();\n } catch (error) {\n console.error('[DataExplorer] Error saving view:', error);\n // BUG-002: Show error notification with details\n const errorMsg = error instanceof Error ? error.message : 'Unknown error';\n this.showNotification(`Failed to save view: ${errorMsg}`, 'error', 4000);\n } finally {\n this.ngZone.run(() => {\n this.isSavingView = false;\n this.cdr.detectChanges();\n });\n }\n }\n\n /**\n * Handle saving default view settings to user settings\n * Used for dynamic/default views that persist to MJ: User Settings\n */\n public async onSaveDefaultViewSettings(event: ViewSaveEvent): Promise<void> {\n if (!this.selectedEntity) return;\n\n this.isSavingView = true;\n this.cdr.detectChanges();\n\n try {\n // Build GridState from the event\n const gridState = this.buildGridState(event);\n\n if (gridState) {\n // Build sort settings if present - prefer sortItems (multi-sort)\n if (event.sortItems && event.sortItems.length > 0) {\n gridState.sortSettings = event.sortItems.map(item => ({\n field: item.field,\n dir: item.direction\n }));\n } else if (event.sortField) {\n // Fallback to deprecated sortField for backward compatibility\n gridState.sortSettings = [{\n field: event.sortField,\n dir: event.sortDirection\n }];\n }\n\n // Save to user settings using the same key pattern as entity-data-grid\n const settingKey = `default-view-setting/${this.selectedEntity.Name}`;\n await UserInfoEngine.Instance.SetSetting(settingKey, JSON.stringify(gridState));\n\n // Update currentGridState to reflect saved state\n this.currentGridState = {\n columnSettings: gridState.columnSettings as ViewGridState['columnSettings'],\n sortSettings: gridState.sortSettings as ViewGridState['sortSettings'],\n aggregates: gridState.aggregates\n };\n\n // Force change detection to ensure grid picks up the new gridState\n this.cdr.detectChanges();\n\n // Refresh the entity viewer data to apply saved aggregates and fetch their values\n this.entityViewerRef?.refresh();\n\n // Show success notification\n this.showNotification('Default view settings saved', 'success', 2500);\n }\n\n this.stateService.closeViewConfigPanel();\n this.cdr.detectChanges();\n } catch (error) {\n console.error('[DataExplorer] Error saving default view settings:', error);\n // Show error notification\n this.showNotification('Failed to save default view settings', 'error', 3500);\n } finally {\n this.ngZone.run(() => {\n this.isSavingView = false;\n this.cdr.detectChanges();\n });\n }\n }\n\n /**\n * Build GridState in Kendo-compatible format\n * Format: { columnSettings: [...], sortSettings: [...], aggregates: {...} }\n *\n * Priority for column settings:\n * 1. If event.columns provided (from config panel) - use those\n * 2. If currentGridState exists (from grid interactions) - use that\n * 3. Otherwise return null\n */\n private buildGridState(event: ViewSaveEvent): { columnSettings: object[]; sortSettings?: object[]; aggregates?: ViewGridAggregatesConfig } | null {\n let columnSettings: object[];\n\n // First check if the event has columns configured (from config panel)\n if (event.columns.length > 0) {\n columnSettings = event.columns.map((col, idx) => ({\n ID: col.fieldId,\n Name: col.fieldName,\n DisplayName: col.displayName,\n userDisplayName: col.userDisplayName, // Include user-defined column alias\n hidden: false, // Visible columns only\n width: col.width || null,\n orderIndex: idx,\n format: col.format // Include column format settings\n }));\n }\n // Otherwise, use the current grid state if available (from grid interactions)\n else if (this.currentGridState?.columnSettings && this.currentGridState.columnSettings.length > 0) {\n columnSettings = this.currentGridState.columnSettings;\n }\n // BUG-005: Third fallback - use entity DefaultInView fields so we never return null\n else if (this.selectedEntity) {\n columnSettings = this.selectedEntity.Fields\n .filter(f => f.DefaultInView)\n .map((f, idx) => ({\n ID: f.ID,\n Name: f.Name,\n DisplayName: f.DisplayNameOrName,\n hidden: false,\n width: f.DefaultColumnWidth || null,\n orderIndex: idx\n }));\n if (columnSettings.length === 0) {\n return null;\n }\n }\n // No columns to save\n else {\n return null;\n }\n\n // Build sort settings - prefer event.sortItems (multi-sort), fall back to currentGridState\n let sortSettings: object[] | undefined;\n if (event.sortItems && event.sortItems.length > 0) {\n sortSettings = event.sortItems.map(item => ({\n field: item.field,\n dir: item.direction // 'asc' or 'desc'\n }));\n } else if (event.sortField) {\n // Fallback to deprecated sortField for backward compatibility\n sortSettings = [{\n field: event.sortField,\n dir: event.sortDirection\n }];\n } else if (this.currentGridState?.sortSettings && this.currentGridState.sortSettings.length > 0) {\n sortSettings = this.currentGridState.sortSettings;\n }\n\n // Build aggregate settings from event or current state\n let aggregates: ViewGridAggregatesConfig | undefined;\n if (event.aggregatesConfig) {\n aggregates = event.aggregatesConfig;\n } else if (this.currentGridState?.aggregates) {\n aggregates = this.currentGridState.aggregates;\n }\n\n return { columnSettings, sortSettings, aggregates };\n }\n\n /**\n * Build SortState in Kendo-compatible format\n * Format: [{field, direction}] where direction is 'asc' or 'desc'\n * Supports multi-column sorting via sortItems array\n */\n private buildSortState(event: ViewSaveEvent): object[] | null {\n // Prefer sortItems array (multi-sort) over deprecated sortField\n if (event.sortItems && event.sortItems.length > 0) {\n return event.sortItems.map(item => ({\n field: item.field,\n direction: item.direction // 'asc' or 'desc'\n }));\n }\n\n // Fallback to deprecated sortField for backward compatibility\n if (event.sortField) {\n return [{\n field: event.sortField,\n direction: event.sortDirection\n }];\n }\n\n return null;\n }\n\n /**\n * Handle delete view from config panel\n */\n public async onDeleteView(): Promise<void> {\n if (!this.selectedViewEntity) return;\n\n const viewName = this.selectedViewEntity.Name;\n try {\n const deleted = await this.selectedViewEntity.Delete();\n if (deleted) {\n this.selectedViewEntity = null;\n this.stateService.selectView(null);\n this.stateService.closeViewConfigPanel();\n await this.viewSelectorRef?.loadViews();\n this.showNotification(`View \"${viewName}\" deleted`, 'success', 2500);\n } else {\n this.showNotification('Failed to delete view', 'error', 3500);\n }\n } catch (error) {\n console.error('[DataExplorer] Error deleting view:', error);\n const errorMsg = error instanceof Error ? error.message : 'Unknown error';\n this.showNotification(`Failed to delete view: ${errorMsg}`, 'error', 4000);\n }\n }\n\n // ========================================\n // QUICK SAVE, DUPLICATE, REVERT (F-001, F-005, F-007)\n // ========================================\n\n /**\n * Handle quick save request from view selector (F-001)\n * Builds a summary from the current config panel state and opens the Quick Save dialog\n * @param saveAsNew - true when user explicitly clicked \"Save As New\"\n */\n public onQuickSaveRequested(saveAsNew: boolean): void {\n this.defaultSaveAsNew = saveAsNew;\n // Build summary from config panel if available\n this.quickSaveSummary = this.viewConfigPanelRef?.BuildSummary() ?? null;\n this.showQuickSaveDialog = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle quick save event from Quick Save dialog (F-001)\n * If updating a shared view, intercepts to show the shared view warning first.\n * Otherwise constructs a ViewSaveEvent and delegates to onSaveView.\n */\n public async onQuickSave(event: QuickSaveEvent): Promise<void> {\n this.showQuickSaveDialog = false;\n\n // If updating (not save-as-new) a shared view, show the warning dialog\n if (!event.SaveAsNew && this.selectedViewEntity?.IsShared) {\n this.pendingQuickSaveEvent = event;\n this.showSharedViewWarning = true;\n this.cdr.detectChanges();\n return;\n }\n\n await this.executeQuickSave(event);\n }\n\n /**\n * Execute the actual quick save (called directly or after shared view warning confirmation)\n */\n private async executeQuickSave(event: QuickSaveEvent): Promise<void> {\n const viewSaveEvent: ViewSaveEvent = {\n name: event.Name,\n description: event.Description,\n isShared: event.IsShared,\n saveAsNew: event.SaveAsNew,\n columns: [],\n sortField: null,\n sortDirection: 'asc',\n sortItems: [],\n smartFilterEnabled: false,\n smartFilterPrompt: '',\n filterState: this.filterDialogState ?? null,\n aggregatesConfig: null\n };\n\n await this.onSaveView(viewSaveEvent);\n }\n\n /**\n * Handle shared view warning dialog action\n */\n public async onSharedViewAction(action: SharedViewAction): Promise<void> {\n this.showSharedViewWarning = false;\n const event = this.pendingQuickSaveEvent;\n this.pendingQuickSaveEvent = null;\n\n if (!event) return;\n\n if (action === 'update-shared') {\n // Proceed with the update\n await this.executeQuickSave(event);\n } else if (action === 'save-as-copy') {\n // Save as a new personal copy instead\n await this.executeQuickSave({\n ...event,\n SaveAsNew: true,\n IsShared: false\n });\n }\n // 'cancel' - do nothing\n this.cdr.detectChanges();\n }\n\n /**\n * Handle shared view warning cancel\n */\n public onSharedViewWarningCancel(): void {\n this.showSharedViewWarning = false;\n this.pendingQuickSaveEvent = null;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle quick save dialog close\n */\n public onQuickSaveClose(): void {\n this.showQuickSaveDialog = false;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle quick save \"Open Advanced\" - close dialog and open full config panel\n */\n public onQuickSaveOpenAdvanced(): void {\n this.showQuickSaveDialog = false;\n this.stateService.openViewConfigPanel();\n this.cdr.detectChanges();\n }\n\n /**\n * Handle duplicate view request (F-005)\n * Opens the Duplicate View Dialog so user can choose a name for the copy\n */\n public async onDuplicateView(viewId?: string): Promise<void> {\n const targetId = viewId || this.selectedViewEntity?.ID;\n if (!targetId || !this.selectedEntity) return;\n\n // Find the view to get its name for the dialog\n const allViews = [...(this.viewSelectorRef?.myViews ?? []), ...(this.viewSelectorRef?.sharedViews ?? [])];\n const viewItem = allViews.find(v => v.id === targetId);\n this.duplicateTargetViewId = targetId;\n this.duplicateSourceViewName = viewItem?.name || this.selectedViewEntity?.Name || 'View';\n this.duplicateSummary = this.buildDuplicateSummary(viewItem?.entity ?? this.selectedViewEntity);\n this.showDuplicateDialog = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Build a ViewConfigSummary from a view entity for the duplicate dialog\n */\n private buildDuplicateSummary(view: MJUserViewEntityExtended | null): ViewConfigSummary | null {\n if (!view) return null;\n let columnCount = 0;\n let filterCount = 0;\n let sortCount = 0;\n let aggregateCount = 0;\n\n try {\n const gridState = view.GridState ? JSON.parse(view.GridState) : null;\n if (Array.isArray(gridState)) {\n columnCount = gridState.filter((c: Record<string, unknown>) => !c['hidden']).length;\n }\n } catch { /* ignore */ }\n\n try {\n const filterState = view.FilterState ? JSON.parse(view.FilterState) : null;\n if (filterState?.filters?.length) filterCount = filterState.filters.length;\n } catch { /* ignore */ }\n\n try {\n const sortState = view.SortState ? JSON.parse(view.SortState) : null;\n if (Array.isArray(sortState)) sortCount = sortState.length;\n } catch { /* ignore */ }\n\n return {\n ColumnCount: columnCount,\n FilterCount: filterCount,\n SortCount: sortCount,\n SmartFilterActive: view.SmartFilterEnabled || false,\n SmartFilterPrompt: view.SmartFilterPrompt || '',\n AggregateCount: aggregateCount\n };\n }\n\n /**\n * Handle duplicate dialog confirmation - actually creates the copy\n */\n public async onDuplicateConfirmed(event: DuplicateViewEvent): Promise<void> {\n this.showDuplicateDialog = false;\n const targetId = this.duplicateTargetViewId;\n this.duplicateTargetViewId = null;\n\n if (!targetId || !this.selectedEntity) return;\n\n const md = new Metadata();\n const rv = new RunView();\n try {\n const result = await rv.RunView<MJUserViewEntityExtended>({\n EntityName: 'MJ: User Views',\n ExtraFilter: `ID = '${targetId}'`,\n ResultType: 'entity_object'\n });\n\n if (!result.Success || !result.Results || result.Results.length === 0) {\n this.showNotification('Could not find view to duplicate', 'error', 3500);\n return;\n }\n\n const sourceView = result.Results[0];\n\n const newView = await md.GetEntityObject<MJUserViewEntityExtended>('MJ: User Views');\n newView.Name = event.Name;\n newView.Description = sourceView.Description || '';\n newView.EntityID = sourceView.EntityID;\n newView.IsShared = false;\n newView.IsDefault = false;\n newView.GridState = sourceView.GridState;\n newView.FilterState = sourceView.FilterState;\n newView.SortState = sourceView.SortState;\n newView.SmartFilterEnabled = sourceView.SmartFilterEnabled || false;\n newView.SmartFilterPrompt = sourceView.SmartFilterPrompt || '';\n\n const saved = await newView.Save();\n if (saved) {\n this.showNotification(`View duplicated as \"${newView.Name}\"`, 'success', 2500);\n await this.viewSelectorRef?.loadViews();\n } else {\n this.showNotification('Failed to duplicate view', 'error', 3500);\n }\n } catch (error) {\n console.error('[DataExplorer] Error duplicating view:', error);\n const errorMsg = error instanceof Error ? error.message : 'Unknown error';\n this.showNotification(`Failed to duplicate view: ${errorMsg}`, 'error', 4000);\n }\n }\n\n /**\n * Handle duplicate dialog cancel\n */\n public onDuplicateCancel(): void {\n this.showDuplicateDialog = false;\n this.duplicateTargetViewId = null;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle duplicate from config panel (F-005)\n * Duplicates the currently selected view\n */\n public onDuplicateFromPanel(): void {\n if (this.selectedViewEntity?.ID) {\n this.stateService.closeViewConfigPanel();\n this.onDuplicateView(this.selectedViewEntity.ID);\n }\n }\n\n /**\n * Handle revert view request (F-007)\n * Re-parses the saved view's GridState and resets modified flag\n */\n public async onRevertView(): Promise<void> {\n if (!this.selectedViewEntity) return;\n\n try {\n // Re-parse the saved grid state from the view entity\n const gridState = this.parseViewGridState(this.selectedViewEntity);\n if (gridState) {\n this.currentGridState = gridState;\n }\n\n // Reset modified flag\n this.stateService.setViewModified(false);\n\n // Refresh the viewer to apply the reverted state\n await this.entityViewerRef?.loadData();\n\n this.showNotification('View reverted to last saved state', 'info', 2500);\n this.cdr.detectChanges();\n } catch (error) {\n console.error('[DataExplorer] Error reverting view:', error);\n this.showNotification('Failed to revert view', 'error', 3500);\n }\n }\n\n /**\n * Handle inline view name change from ViewHeader (F-002)\n * Updates the view entity name and saves immediately\n */\n public async onViewNameChanged(newName: string): Promise<void> {\n if (!this.selectedViewEntity || !newName.trim()) return;\n\n try {\n this.selectedViewEntity.Name = newName.trim();\n const saved = await this.selectedViewEntity.Save();\n if (saved) {\n this.showNotification(`View renamed to \"${newName.trim()}\"`, 'success', 2500);\n // Refresh the view selector to show the updated name\n this.viewSelectorRef?.loadViews();\n } else {\n this.showNotification('Failed to rename view', 'error', 3500);\n }\n this.cdr.detectChanges();\n } catch (error) {\n console.error('[DataExplorer] Error renaming view:', error);\n this.showNotification('Failed to rename view', 'error', 3500);\n }\n }\n\n // ========================================\n // VIEW MODE & FILTERING (Dashboard Header)\n // ========================================\n\n /**\n * Handle view mode toggle from dashboard header\n */\n public onViewModeChanged(mode: EntityViewMode): void {\n this.stateService.setViewMode(mode);\n // Mark view as modified when view mode changes\n if (this.state.selectedViewId) {\n this.stateService.setViewModified(true);\n }\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 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 * Handle export request - opens the export dialog\n */\n public async onExport(): Promise<void> {\n if (!this.selectedEntity) {\n console.error('Cannot export: No entity selected');\n return;\n }\n\n try {\n this.showNotification('Preparing export...', 'info', 2000);\n\n // Load the export data\n const data = await this.getExportData();\n\n // Get visible columns for export\n const columns = this.getExportColumns();\n\n // Generate file name\n const viewName = this.selectedViewEntity?.Name || 'Data';\n const fileName = `${this.selectedEntity.Name}_${viewName}_${new Date().toISOString().split('T')[0]}`;\n\n // Configure and show the export dialog\n this.exportDialogConfig = {\n data,\n columns,\n defaultFileName: fileName,\n availableFormats: ['excel', 'csv', 'json'],\n defaultFormat: 'excel',\n showSamplingOptions: true,\n defaultSamplingMode: 'all',\n dialogTitle: `Export ${this.selectedEntity.Name}`\n };\n this.showExportDialog = true;\n this.cdr.detectChanges();\n } catch (e) {\n this.showNotification('Error preparing export', 'error', 5000);\n console.error('Export error:', e);\n }\n }\n\n /**\n * Handle export dialog close\n */\n public onExportDialogClosed(result: ExportDialogResult): void {\n this.showExportDialog = false;\n this.exportDialogConfig = null;\n this.cdr.detectChanges();\n\n if (result.exported) {\n this.showNotification('Export complete', 'success', 2000);\n }\n }\n\n /**\n * Get visible columns for export based on current grid/view state\n */\n private getExportColumns(): ExportColumn[] {\n if (!this.selectedEntity) return [];\n\n // Priority 1: Current grid state (reflects actual displayed columns)\n if (this.currentGridState?.columnSettings && this.currentGridState.columnSettings.length > 0) {\n const visibleColumns = this.currentGridState.columnSettings.filter(col => col.hidden !== true);\n return visibleColumns.map(col => {\n const field = this.selectedEntity?.Fields.find(f => f.Name === col.Name);\n return {\n name: col.Name,\n displayName: col.DisplayName || col.Name,\n dataType: this.mapFieldTypeToExportType(field?.Type)\n };\n });\n }\n\n // Priority 2: View's column configuration\n if (this.selectedViewEntity?.Columns) {\n const visibleColumns = this.selectedViewEntity.Columns.filter(col => !col.hidden);\n return visibleColumns.map(col => {\n const field = this.selectedEntity?.Fields.find(f => f.Name === col.Name);\n return {\n name: col.Name,\n displayName: col.DisplayName || col.Name,\n dataType: this.mapFieldTypeToExportType(field?.Type)\n };\n });\n }\n\n // Priority 3: All non-virtual fields\n const visibleFields = this.selectedEntity.Fields.filter(f => !f.IsVirtual);\n return visibleFields.map(f => ({\n name: f.Name,\n displayName: f.DisplayNameOrName,\n dataType: this.mapFieldTypeToExportType(f.Type)\n }));\n }\n\n /**\n * Map MemberJunction field types to export column types\n */\n private mapFieldTypeToExportType(fieldType?: string): ExportColumn['dataType'] {\n if (!fieldType) return 'string';\n\n const type = fieldType.toLowerCase();\n if (type.includes('int') || type.includes('decimal') || type.includes('float') || type.includes('numeric')) {\n return 'number';\n }\n if (type.includes('date') || type.includes('time')) {\n return 'date';\n }\n if (type.includes('bit') || type.includes('bool')) {\n return 'boolean';\n }\n if (type.includes('money') || type.includes('currency')) {\n return 'currency';\n }\n return 'string';\n }\n\n /**\n * Get the data for export - loads all records for the current view/entity\n */\n protected async getExportData(): Promise<ExportData> {\n if (!this.selectedEntity) {\n throw new Error('No entity selected for export');\n }\n\n const md = new Metadata();\n const rv = new RunView();\n\n // Build the run view params based on current state\n const baseParams = {\n EntityName: this.selectedEntity.Name,\n ExtraFilter: this.buildExtraFilter(),\n OrderBy: this.buildOrderBy(),\n IgnoreMaxRows: true,\n ForceAuditLog: true,\n AuditLogDescription: `Export of Data From ${this.selectedViewEntity ? '\"' + this.selectedViewEntity.Name + '\"' : this.selectedEntity.Name} View for User ${md.CurrentUser.Email}`\n };\n\n // Add smart filter if present\n const params = this.debouncedFilterText\n ? { ...baseParams, UserSearchString: this.debouncedFilterText }\n : baseParams;\n\n const result = await rv.RunView(params);\n\n if (result && result.Success) {\n return result.Results as Record<string, unknown>[];\n } else {\n throw new Error('Unable to get export data: ' + (result?.ErrorMessage || 'Unknown error'));\n }\n }\n\n /**\n * Build the ExtraFilter string based on current view and filter state\n */\n private buildExtraFilter(): string {\n const filters: string[] = [];\n\n // Add view filter if a view is selected\n if (this.selectedViewEntity?.WhereClause) {\n filters.push(`(${this.selectedViewEntity.WhereClause})`);\n }\n\n // Add smart filter if present\n if (this.debouncedFilterText) {\n // Smart filter is applied via UserSearchString in RunView, not ExtraFilter\n // So we don't need to add it here\n }\n\n return filters.join(' AND ');\n }\n\n /**\n * Build the OrderBy string based on current view state\n */\n private buildOrderBy(): string {\n // Use view's OrderByClause if available\n if (this.selectedViewEntity?.OrderByClause) {\n return this.selectedViewEntity.OrderByClause;\n }\n\n // Use grid state sort if available\n if (this.currentGridState?.sortSettings && this.currentGridState.sortSettings.length > 0) {\n const sorts = this.currentGridState.sortSettings.map(s =>\n `${s.field} ${s.dir.toUpperCase()}`\n );\n return sorts.join(', ');\n }\n\n // Default sort by primary key\n return this.selectedEntity!.FirstPrimaryKey.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 = new RunView();\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 // Apply view mode if specified\n if (deepLink.viewMode) {\n this.stateService.setViewMode(deepLink.viewMode);\n }\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\n // ========================================\n\n /**\n * Parse URL query string and return a deep link object.\n * Returns null if no relevant params found.\n *\n * Query params:\n * - entity: Selected entity name\n * - record: Selected record ID (URL segment format via CompositeKey)\n * - filter: Current filter text\n * - view: View mode (grid or cards)\n */\n private parseUrlState(): DataExplorerDeepLink | null {\n const url = this.router.url;\n const queryIndex = url.indexOf('?');\n if (queryIndex === -1) {\n return null;\n }\n\n const queryString = url.substring(queryIndex + 1);\n const params = new URLSearchParams(queryString);\n const entity = params.get('entity');\n const record = params.get('record');\n const filter = params.get('filter');\n const view = params.get('view') as 'grid' | 'cards' | null;\n\n // If no params, return null\n if (!entity && !record && !filter && !view) {\n return null;\n }\n\n return {\n entity: entity || undefined,\n record: record || undefined,\n filter: filter || undefined,\n viewMode: view || undefined\n };\n }\n\n /**\n * Apply URL state to the component.\n * Used both during init and for popstate handling.\n */\n private applyUrlState(urlState: DataExplorerDeepLink): void {\n // Apply view mode if specified\n if (urlState.viewMode) {\n this.stateService.setViewMode(urlState.viewMode);\n }\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 // Apply filter if specified (to smart filter state, not user search)\n if (urlState.filter) {\n this.stateService.setSmartFilterPrompt(urlState.filter);\n } else if (entityChanged) {\n // Only clear filter if entity changed (selectEntity already handles this)\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 as unknown as string);\n this.stateService.closeDetailPanel();\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Update the URL query string to reflect current navigation state.\n * This enables deep linking - users can bookmark or share URLs to specific views.\n * Called immediately on state changes (not debounced).\n * Uses NavigationService for proper URL management that respects app-scoped routes.\n */\n private updateUrl(): void {\n const queryParams: Record<string, string | null> = {};\n\n // Add entity if selected\n if (this.state.selectedEntityName) {\n queryParams['entity'] = this.state.selectedEntityName;\n } else {\n queryParams['entity'] = null;\n }\n\n // Add record if selected (only if entity is also selected)\n if (this.state.selectedRecordId && this.state.selectedEntityName) {\n queryParams['record'] = this.state.selectedRecordId;\n } else {\n queryParams['record'] = null;\n }\n\n // Add filter if present (only if entity is also selected)\n if (this.state.smartFilterPrompt && this.state.selectedEntityName) {\n queryParams['filter'] = this.state.smartFilterPrompt;\n } else {\n queryParams['filter'] = null;\n }\n\n // Add view mode if not default (grid is default)\n if (this.state.viewMode && this.state.viewMode !== 'grid') {\n queryParams['view'] = this.state.viewMode;\n } else {\n queryParams['view'] = null;\n }\n\n // Use NavigationService to update query params properly\n this.navigationService.UpdateActiveTabQueryParams(queryParams);\n }\n\n /**\n * Handle external navigation (back/forward buttons).\n * Parses the URL and applies the state without triggering a new navigation.\n */\n private onExternalNavigation(url: string): void {\n // Check if this URL is for our component (contains our base path)\n const currentPath = this.router.url.split('?')[0];\n const newPath = url.split('?')[0];\n\n // Only handle if we're still on the same base path (same dashboard instance)\n if (currentPath !== newPath) {\n return; // Different route entirely, shell will handle it\n }\n\n // Parse the new URL state\n const urlState = this.parseUrlFromString(url);\n\n // Apply the state without triggering URL updates\n this.skipUrlUpdates = true;\n if (urlState) {\n this.applyUrlState(urlState);\n } else {\n // No params means go to home view\n this.selectedEntity = null;\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.selectEntity(null as unknown as string);\n this.stateService.closeDetailPanel();\n }\n this.skipUrlUpdates = false;\n\n // Update the tracked URL\n this.lastNavigatedUrl = url;\n\n this.cdr.detectChanges();\n }\n\n /**\n * Parse URL state from a URL string (used for external navigation).\n */\n private parseUrlFromString(url: string): DataExplorerDeepLink | null {\n const queryIndex = url.indexOf('?');\n if (queryIndex === -1) {\n return null;\n }\n\n const queryString = url.substring(queryIndex + 1);\n const params = new URLSearchParams(queryString);\n const entity = params.get('entity');\n const record = params.get('record');\n const filterParam = params.get('filter');\n const view = params.get('view') as 'grid' | 'cards' | null;\n\n // If no params, return null\n if (!entity && !record && !filterParam && !view) {\n return null;\n }\n\n return {\n entity: entity || undefined,\n record: record || undefined,\n filter: filterParam || undefined,\n viewMode: view || undefined\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 entityIdToApp = new Map<string, ApplicationInfo>();\n const groupMap = new Map<string, AppEntityGroup>();\n\n // Build entity -> first application mapping\n for (const app of applications) {\n for (const appEntity of app.ApplicationEntities) {\n if (!entityIdToApp.has(appEntity.EntityID)) {\n entityIdToApp.set(appEntity.EntityID, app);\n }\n }\n }\n\n // Assign each visible entity to its group\n const ungroupedEntities: EntityInfo[] = [];\n for (const entity of this.entities) {\n const app = entityIdToApp.get(entity.ID);\n if (app) {\n this.addEntityToGroup(groupMap, app, entity);\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: '#9e9e9e',\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 // SELECTION TRACKING\n // ========================================\n\n /**\n * Handle selection changes from entity-viewer grid.\n * Tracks selected records to enable the Add to List button in the header toolbar.\n */\n public onSelectionChanged(event: { records: Record<string, unknown>[]; recordIds: string[] }): void {\n this.selectedRecords = event.records || [];\n this.selectedRecordIds = event.recordIds || [];\n this.cdr.detectChanges();\n }\n\n /**\n * Check if there are selected records (for enabling Add to List button)\n */\n public get hasSelectedRecords(): boolean {\n return this.selectedRecords.length > 0;\n }\n\n // ========================================\n // LIST MANAGEMENT\n // ========================================\n\n /**\n * Handle Add to List button click from header toolbar.\n * Opens the list management dialog for selected records.\n */\n public onAddToListClick(): void {\n if (!this.selectedEntity || this.selectedRecords.length === 0) {\n console.warn('Add to List: No entity selected or no records selected');\n return;\n }\n\n // Build the event object and delegate to existing handler\n const event = {\n entityInfo: this.selectedEntity,\n records: this.selectedRecords,\n recordIds: this.selectedRecordIds\n };\n\n this.onAddToListRequested(event);\n }\n\n /**\n * Handle Add to List request from entity-viewer grid toolbar.\n * Opens the list management dialog for multiple selected records.\n */\n public onAddToListRequested(event: { entityInfo: EntityInfo; records: Record<string, unknown>[]; recordIds: string[] }): void {\n // Validate input\n if (!event.entityInfo) {\n console.error('Add to List: entityInfo is missing from event');\n return;\n }\n if (!event.records || event.records.length === 0) {\n console.error('Add to List: No records in event. Event:', event);\n return;\n }\n\n console.log(`Add to List: Processing ${event.records.length} record(s) for entity \"${event.entityInfo.Name}\"`);\n\n // Get display names for the records\n const recordDisplayNames = event.records.map(record => {\n try {\n if (event.entityInfo.NameField) {\n const nameValue = record[event.entityInfo.NameField.Name];\n if (nameValue) return String(nameValue);\n }\n return buildPkString(record, event.entityInfo) || 'Unknown';\n } catch (err) {\n console.error('Add to List: Error getting record display name:', err);\n return 'Unknown';\n }\n });\n\n // Get raw primary key values (not concatenated strings) for list membership\n const pkFieldName = event.entityInfo.PrimaryKeys[0]?.Name;\n const recordIds = event.records.map(record => {\n try {\n if (!pkFieldName || record[pkFieldName] === null || record[pkFieldName] === undefined) {\n console.error('Add to List: Record has no primary key:', record);\n return '';\n }\n return String(record[pkFieldName]);\n } catch (err) {\n console.error('Add to List: Error getting record ID:', err);\n return '';\n }\n }).filter(id => id !== '');\n\n if (recordIds.length === 0) {\n console.error('Add to List: No valid record IDs found');\n return;\n }\n\n const recordCount = event.records.length;\n const dialogTitle = recordCount === 1\n ? `Manage Lists for \"${recordDisplayNames[0]}\"`\n : `Add ${recordCount} Records to List`;\n\n console.log(`Add to List: Opening dialog for ${recordIds.length} record(s)`);\n\n this.listManagementConfig = {\n mode: 'manage',\n entityId: event.entityInfo.ID,\n entityName: event.entityInfo.Name,\n recordIds: recordIds,\n recordDisplayNames: recordDisplayNames,\n allowCreate: true,\n allowRemove: recordCount === 1, // Only allow remove for single record\n showMembership: recordCount === 1, // Only show membership for single record\n dialogTitle: dialogTitle\n };\n\n this.showListManagementDialog = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Open the list management dialog for the currently selected record\n */\n public openListManagementDialog(): void {\n if (!this.selectedEntity || !this.selectedRecord) {\n return;\n }\n\n // Use the raw primary key value (not concatenated string) for list membership\n // This matches how records are stored in List Details and enables proper subquery filtering\n const pkFieldName = this.selectedEntity.PrimaryKeys[0]?.Name;\n const recordId = pkFieldName ? String(this.selectedRecord[pkFieldName] ?? '') : '';\n const recordName = this.getRecordDisplayName(this.selectedRecord);\n\n this.listManagementConfig = {\n mode: 'manage',\n entityId: this.selectedEntity.ID,\n entityName: this.selectedEntity.Name,\n recordIds: [recordId],\n recordDisplayNames: [recordName],\n allowCreate: true,\n allowRemove: true,\n showMembership: true,\n dialogTitle: `Manage Lists for \"${recordName}\"`\n };\n\n this.showListManagementDialog = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle completion of the list management dialog\n */\n public onListManagementComplete(result: ListManagementResult): void {\n this.showListManagementDialog = false;\n this.listManagementConfig = null;\n\n if (result.action === 'apply') {\n const addedCount = result.added.length;\n const removedCount = result.removed.length;\n\n if (addedCount > 0 || removedCount > 0) {\n let message = '';\n if (addedCount > 0) {\n message += `Added to ${addedCount} list(s)`;\n }\n if (removedCount > 0) {\n if (message) message += ', ';\n message += `Removed from ${removedCount} list(s)`;\n }\n this.showNotification(message, 'success', 2500);\n }\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Handle cancellation of the list management dialog\n */\n public onListManagementCancel(): void {\n this.showListManagementDialog = false;\n this.listManagementConfig = null;\n this.cdr.detectChanges();\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 -->\n <mj-view-selector\n [entity]=\"selectedEntity\"\n [selectedViewId]=\"state.selectedViewId\"\n [viewModified]=\"state.viewModified\"\n (viewSelected)=\"onViewSelected($event)\"\n (saveViewRequested)=\"onSaveViewRequested($event)\"\n (manageViewsRequested)=\"onManageViewsRequested()\"\n (openInTabRequested)=\"onOpenInTabRequested($event)\"\n (configureViewRequested)=\"onConfigureViewRequested()\"\n (createNewRecordRequested)=\"onCreateNewRecord()\"\n (exportRequested)=\"onExport()\"\n (duplicateViewRequested)=\"onDuplicateView($event)\"\n (quickSaveRequested)=\"onQuickSaveRequested($event)\"\n (revertRequested)=\"onRevertView()\">\n </mj-view-selector>\n\n <!-- Add to List Button -->\n <button\n class=\"header-action-btn\"\n [class.disabled]=\"!hasSelectedRecords\"\n [disabled]=\"!hasSelectedRecords\"\n (click)=\"onAddToListClick()\"\n [title]=\"hasSelectedRecords ? 'Add ' + selectedRecords.length + ' selected record(s) to a list' : 'Select records to add to a list'\">\n <i class=\"fa-solid fa-list-check\"></i>\n @if (hasSelectedRecords) {\n <span class=\"selection-badge\">{{ selectedRecords.length }}</span>\n }\n </button>\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 Mode Toggle -->\n <div class=\"view-mode-toggle\">\n <button\n class=\"toggle-btn\"\n [class.active]=\"state.viewMode === 'grid'\"\n (click)=\"onViewModeChanged('grid')\"\n title=\"Grid View\">\n <i class=\"fa-solid fa-list\"></i>\n </button>\n <button\n class=\"toggle-btn\"\n [class.active]=\"state.viewMode === 'cards'\"\n (click)=\"onViewModeChanged('cards')\"\n title=\"Cards View\">\n <i class=\"fa-solid fa-grip\"></i>\n </button>\n @if (entityHasDateFields) {\n <button\n class=\"toggle-btn\"\n [class.active]=\"state.viewMode === 'timeline'\"\n (click)=\"onViewModeChanged('timeline')\"\n title=\"Timeline View\">\n <i class=\"fa-solid fa-timeline\"></i>\n </button>\n }\n </div>\n\n <!-- Timeline Controls (only shown when timeline view is active) -->\n @if (state.viewMode === 'timeline' && entityHasDateFields) {\n <!-- Date Field Selector -->\n <div class=\"date-field-selector-container\">\n <!-- Backdrop for closing dropdown -->\n @if (isDateFieldDropdownOpen) {\n <div class=\"date-field-backdrop\" (click)=\"closeDateFieldDropdown()\"></div>\n }\n\n <div class=\"date-field-selector-wrapper\">\n <button\n class=\"date-field-selector-button\"\n [class.open]=\"isDateFieldDropdownOpen\"\n [disabled]=\"availableDateFields.length <= 1\"\n (click)=\"toggleDateFieldDropdown()\">\n <i class=\"fa-solid fa-calendar-days date-field-icon\"></i>\n <span class=\"date-field-name\">{{ effectiveTimelineDateFieldDisplayName }}</span>\n @if (availableDateFields.length > 1) {\n <i class=\"fa-solid fa-chevron-down date-field-arrow\" [class.rotated]=\"isDateFieldDropdownOpen\"></i>\n }\n </button>\n\n @if (isDateFieldDropdownOpen && availableDateFields.length > 1) {\n <div class=\"date-field-dropdown-panel\">\n @for (field of availableDateFields; track field.name) {\n <div\n class=\"date-field-dropdown-item\"\n [class.selected]=\"field.name === effectiveTimelineDateField\"\n (click)=\"setTimelineDateField(field.name)\">\n <i class=\"fa-regular fa-calendar item-icon\"></i>\n <span class=\"item-name\">{{ field.displayName }}</span>\n @if (field.name === effectiveTimelineDateField) {\n <i class=\"fa-solid fa-check selected-check\"></i>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Orientation Toggle -->\n <div class=\"timeline-orientation-toggle\">\n <button\n class=\"toggle-btn\"\n (click)=\"toggleTimelineOrientation()\"\n [title]=\"state.timelineOrientation === 'vertical' ? 'Switch to Horizontal' : 'Switch to Vertical'\">\n <i [class]=\"state.timelineOrientation === 'vertical' ? 'fa-solid fa-ellipsis-vertical' : 'fa-solid fa-ellipsis'\"></i>\n </button>\n </div>\n\n <!-- Sort Order Toggle -->\n <div class=\"timeline-sort-toggle\">\n <button\n class=\"toggle-btn\"\n (click)=\"toggleTimelineSortOrder()\"\n [title]=\"state.timelineSortOrder === 'desc' ? 'Showing Newest First (click for Oldest First)' : 'Showing Oldest First (click for Newest First)'\">\n <i [class]=\"state.timelineSortOrder === 'desc' ? 'fa-solid fa-arrow-down-wide-short' : 'fa-solid fa-arrow-up-wide-short'\"></i>\n </button>\n </div>\n }\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: #f59e0b;\"></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 <mj-entity-viewer\n #entityViewer\n [entity]=\"selectedEntity\"\n [viewEntity]=\"selectedViewEntity\"\n [viewMode]=\"state.viewMode\"\n [filterText]=\"debouncedFilterText\"\n [selectedRecordId]=\"state.selectedRecordId\"\n [config]=\"viewerConfig\"\n [gridState]=\"currentGridState\"\n [timelineConfig]=\"currentTimelineConfig\"\n [gridSelectionMode]=\"'checkbox'\"\n [showGridToolbar]=\"false\"\n [showAddToListButton]=\"false\"\n (viewModeChange)=\"onViewModeChanged($event)\"\n (filterTextChange)=\"onFilterTextChanged($event)\"\n (recordSelected)=\"onViewerRecordSelected($event)\"\n (recordOpened)=\"onViewerRecordOpened($event)\"\n (dataLoaded)=\"onDataLoaded($event)\"\n (filteredCountChanged)=\"onFilteredCountChanged($event)\"\n (gridStateChanged)=\"onGridStateChanged($event)\"\n (selectionChanged)=\"onSelectionChanged($event)\"\n (addToListRequested)=\"onAddToListRequested($event)\">\n </mj-entity-viewer>\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 <!-- Detail Panel Actions Bar -->\n <div class=\"detail-panel-actions\">\n <button\n class=\"detail-action-btn\"\n (click)=\"openListManagementDialog()\"\n title=\"Add to List\">\n <i class=\"fa-solid fa-list-check\"></i>\n <span>Add to List</span>\n </button>\n </div>\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 Configuration Panel -->\n <mj-view-config-panel\n [entity]=\"selectedEntity\"\n [viewEntity]=\"selectedViewEntity\"\n [isOpen]=\"state.viewConfigPanelOpen\"\n [currentGridState]=\"currentGridState\"\n [externalFilterState]=\"filterDialogState\"\n [isSaving]=\"isSavingView\"\n [DefaultSaveAsNew]=\"defaultSaveAsNew\"\n (close)=\"onCloseViewConfigPanel()\"\n (save)=\"onSaveView($event)\"\n (saveDefaults)=\"onSaveDefaultViewSettings($event)\"\n (delete)=\"onDeleteView()\"\n (duplicate)=\"onDuplicateFromPanel()\"\n (openFilterDialogRequest)=\"onOpenFilterDialogRequest($event)\">\n </mj-view-config-panel>\n\n <!-- Filter Dialog (rendered at dashboard level for full viewport width) -->\n <mj-filter-dialog\n [isOpen]=\"isFilterDialogOpen\"\n [fields]=\"filterDialogFields\"\n [filter]=\"filterDialogState\"\n [disabled]=\"filterDialogDisabled\"\n (close)=\"onCloseFilterDialog()\"\n (apply)=\"onFilterApplied($event)\">\n </mj-filter-dialog>\n\n <!-- Export Dialog -->\n <mj-export-dialog\n [visible]=\"showExportDialog\"\n [config]=\"exportDialogConfig\"\n (closed)=\"onExportDialogClosed($event)\">\n </mj-export-dialog>\n\n <!-- List Management Dialog -->\n @if (showListManagementDialog && listManagementConfig) {\n <mj-list-management-dialog\n [config]=\"listManagementConfig\"\n [visible]=\"showListManagementDialog\"\n (complete)=\"onListManagementComplete($event)\"\n (cancel)=\"onListManagementCancel()\">\n </mj-list-management-dialog>\n }\n\n <!-- Quick Save Dialog (F-001) -->\n <mj-quick-save-dialog\n [IsOpen]=\"showQuickSaveDialog\"\n [ViewEntity]=\"selectedViewEntity\"\n [EntityName]=\"selectedEntity?.DisplayNameOrName ?? ''\"\n [Summary]=\"quickSaveSummary\"\n [IsSaving]=\"isSavingView\"\n [DefaultSaveAsNew]=\"defaultSaveAsNew\"\n (Save)=\"onQuickSave($event)\"\n (Close)=\"onQuickSaveClose()\"\n (OpenAdvanced)=\"onQuickSaveOpenAdvanced()\">\n </mj-quick-save-dialog>\n\n <!-- Duplicate View Dialog (F-005) -->\n <mj-duplicate-view-dialog\n [IsOpen]=\"showDuplicateDialog\"\n [SourceViewName]=\"duplicateSourceViewName\"\n [Summary]=\"duplicateSummary\"\n (Duplicate)=\"onDuplicateConfirmed($event)\"\n (Cancel)=\"onDuplicateCancel()\">\n </mj-duplicate-view-dialog>\n\n <!-- Shared View Warning Dialog (view-creation-flow Scenario 5) -->\n <mj-shared-view-warning-dialog\n [IsOpen]=\"showSharedViewWarning\"\n [ViewName]=\"selectedViewEntity?.Name ?? ''\"\n (Action)=\"onSharedViewAction($event)\"\n (Cancel)=\"onSharedViewWarningCancel()\">\n </mj-shared-view-warning-dialog>\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,EAA4B,YAAY,EAAc,SAAS,EAAU,MAAM,eAAe,CAAC;AAC9J,OAAO,EAAU,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,aAAa,EAAqB,MAAM,2BAA2B,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAG,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAc,OAAO,EAAE,iBAAiB,EAAmB,MAAM,sBAAsB,CAAC;AACzG,mEAAmE;AACnE,OAAO,EAA2C,cAAc,EAA4B,MAAM,+BAA+B,CAAC;AAClI,OAAO,EAQL,qBAAqB,EAIrB,wBAAwB,EAMxB,iBAAiB,EACjB,aAAa,EACd,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAA6C,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AACtI,OAAO,EAA8C,iBAAiB,EAAE,MAAM,mCAAm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E,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;qBAC7E,CAAC;oBACF,UAAU,CAAC,QAAQ,EAAE;wBACnB,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;qBAChF,CAAC;iBACH,CAAC;aACH;;AAGU,8BAA8B;IAD1C,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC;GAChC,8BAA8B,CA4+F1C;;iFA5+FY,8BAA8B;cAlB1C,SAAS;6BACI,KAAK,YACP,4BAA4B,cAG1B;oBACV,OAAO,CAAC,aAAa,EAAE;wBACrB,UAAU,CAAC,QAAQ,EAAE;4BACnB,KAAK,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;4BACrD,OAAO,CAAC,gBAAgB,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;yBAC7E,CAAC;wBACF,UAAU,CAAC,QAAQ,EAAE;4BACnB,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;yBAChF,CAAC;qBACH,CAAC;iBACH;;kBAQA,SAAS;mBAAC,aAAa;;kBAGvB,SAAS;mBAAC,qBAAqB;;kBAG/B,SAAS;mBAAC,qBAAqB;;kBAG/B,SAAS;mBAAC,wBAAwB;;kBAMlC,KAAK;;kBAML,KAAK;;kBAML,KAAK;;kBAML,KAAK;;kBAilBL,YAAY;mBAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC;;kFAvnBjC,8BAA8B","sourcesContent":["import { Component, OnInit, OnDestroy, ChangeDetectorRef, Input, OnChanges, SimpleChanges, HostListener, ElementRef, ViewChild, NgZone } from '@angular/core';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { trigger, transition, style, animate } from '@angular/animations';\nimport { Subject } from 'rxjs';\nimport { takeUntil, debounceTime, distinctUntilChanged, filter } from 'rxjs/operators';\nimport { BaseDashboard, NavigationService } from '@memberjunction/ng-shared';\nimport { RecentAccessService } from '@memberjunction/ng-shared-generic';\nimport { RegisterClass , UUIDsEqual } from '@memberjunction/global';\nimport { Metadata, EntityInfo, RunView, EntityFieldTSType, ApplicationInfo } from '@memberjunction/core';\n// CompositeKey is used via buildCompositeKey from ng-entity-viewer\nimport { MJApplicationEntityEntity, ResourceData, UserInfoEngine, ViewGridAggregatesConfig } from '@memberjunction/core-entities';\nimport {\n RecordSelectedEvent,\n RecordOpenedEvent,\n DataLoadedEvent,\n FilteredCountChangedEvent,\n EntityViewerConfig,\n EntityViewMode,\n NavigateToRelatedEvent,\n EntityViewerComponent,\n ViewGridState,\n GridStateChangedEvent,\n ViewSaveEvent,\n ViewConfigPanelComponent,\n ViewConfigSummary,\n QuickSaveEvent,\n QuickSaveAdvancedEvent,\n DuplicateViewEvent,\n SharedViewAction,\n buildCompositeKey,\n buildPkString\n} from '@memberjunction/ng-entity-viewer';\nimport { ViewSelectedEvent, SaveViewRequestedEvent, ViewSelectorComponent } from './components/view-selector/view-selector.component';\nimport { CompositeFilterDescriptor, FilterFieldInfo, createEmptyFilter } from '@memberjunction/ng-filter-builder';\nimport { MJUserViewEntityExtended } 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, MJEvent, MJEventType, MJGlobal } from '@memberjunction/global';\nimport { ListManagementDialogConfig, ListManagementResult } from '@memberjunction/ng-list-management';\nimport {\n ExportService,\n ExportDialogConfig,\n ExportDialogResult\n} from '@memberjunction/ng-export-service';\nimport {\n ExportColumn,\n ExportData\n} from '@memberjunction/export-engine';\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 private destroy$ = new Subject<void>();\n private metadata = new Metadata();\n\n /** Reference to the filter input for keyboard shortcuts */\n @ViewChild('filterInput') filterInputRef: ElementRef<HTMLInputElement> | undefined;\n\n /** Reference to the view selector for refreshing after save */\n @ViewChild(ViewSelectorComponent) viewSelectorRef: ViewSelectorComponent | undefined;\n\n /** Reference to the entity viewer for refreshing after view save */\n @ViewChild(EntityViewerComponent) entityViewerRef: EntityViewerComponent | undefined;\n\n /** Reference to the view config panel for passing filter state */\n @ViewChild(ViewConfigPanelComponent) viewConfigPanelRef: ViewConfigPanelComponent | 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 // 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 // Date field dropdown state\n public isDateFieldDropdownOpen: boolean = false;\n\n // Flag to skip URL updates during initialization (when applying deep link)\n private skipUrlUpdates: boolean = true;\n\n // Track the last URL we navigated to, to avoid reacting to our own navigation\n private lastNavigatedUrl: string = '';\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 // Export functionality\n public showExportDialog: boolean = false;\n public exportDialogConfig: ExportDialogConfig | null = null;\n\n // List management\n public showListManagementDialog: boolean = false;\n public listManagementConfig: ListManagementDialogConfig | null = null;\n\n // Selection tracking for grid - needed to enable Add to List button in header\n public selectedRecordIds: string[] = [];\n public selectedRecords: Record<string, unknown>[] = [];\n\n // Quick Save Dialog state (F-001)\n public showQuickSaveDialog: boolean = false;\n public quickSaveSummary: ViewConfigSummary | null = null;\n\n // Pending new-view context: carries name/description/sharing from quick save dialog\n // to the config panel when user clicks \"Customize columns, filters & sorting...\"\n public pendingNewViewName: string = '';\n public pendingNewViewDescription: string = '';\n public pendingNewViewIsShared: boolean = false;\n\n // Duplicate View Dialog state (F-005)\n public showDuplicateDialog: boolean = false;\n public duplicateSourceViewName: string = '';\n public duplicateSummary: ViewConfigSummary | null = null;\n private duplicateTargetViewId: string | null = null;\n\n // Shared View Warning Dialog state (Scenario 5)\n public showSharedViewWarning: boolean = false;\n private pendingQuickSaveEvent: QuickSaveEvent | 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 * Check if the currently selected entity has date fields available for timeline view.\n * Used to conditionally show the timeline toggle button in the header.\n */\n get entityHasDateFields(): boolean {\n if (!this.selectedEntity) return false;\n return this.selectedEntity.Fields.some(\n f => f.TSType === EntityFieldTSType.Date\n );\n }\n\n /**\n * Get available date fields for the currently selected entity.\n * Used for the date field selector in timeline view.\n */\n get availableDateFields(): { name: string; displayName: string }[] {\n if (!this.selectedEntity) return [];\n return this.selectedEntity.Fields\n .filter(f => f.TSType === EntityFieldTSType.Date)\n .sort((a, b) => {\n // Prioritize DefaultInView fields, then by Sequence\n if (a.DefaultInView && !b.DefaultInView) return -1;\n if (!a.DefaultInView && b.DefaultInView) return 1;\n return a.Sequence - b.Sequence;\n })\n .map(f => ({\n name: f.Name,\n displayName: f.DisplayNameOrName\n }));\n }\n\n /**\n * Get the effective timeline date field name.\n * Returns stored value if valid, otherwise first available date field.\n */\n get effectiveTimelineDateField(): string | null {\n const available = this.availableDateFields;\n if (available.length === 0) return null;\n\n // Check if stored value is still valid\n if (this.state.timelineDateFieldName && available.some(f => f.name === this.state.timelineDateFieldName)) {\n return this.state.timelineDateFieldName;\n }\n\n // Default to first available\n return available[0].name;\n }\n\n /**\n * Get the display name of the effective timeline date field.\n */\n get effectiveTimelineDateFieldDisplayName(): string {\n const fieldName = this.effectiveTimelineDateField;\n if (!fieldName) return '';\n const field = this.availableDateFields.find(f => f.name === fieldName);\n return field?.displayName || fieldName;\n }\n\n /**\n * Set the timeline date field.\n */\n setTimelineDateField(fieldName: string): void {\n this.state.timelineDateFieldName = fieldName;\n this.stateService.updateState({ timelineDateFieldName: fieldName });\n this.isDateFieldDropdownOpen = false;\n this.cdr.detectChanges();\n }\n\n /**\n * Toggle the date field dropdown open/closed.\n */\n toggleDateFieldDropdown(): void {\n this.isDateFieldDropdownOpen = !this.isDateFieldDropdownOpen;\n }\n\n /**\n * Close the date field dropdown.\n */\n closeDateFieldDropdown(): void {\n this.isDateFieldDropdownOpen = false;\n }\n\n /**\n * Toggle timeline orientation between vertical and horizontal.\n */\n toggleTimelineOrientation(): void {\n const newOrientation = this.state.timelineOrientation === 'vertical' ? 'horizontal' : 'vertical';\n this.state.timelineOrientation = newOrientation;\n this.stateService.updateState({ timelineOrientation: newOrientation });\n this.cdr.detectChanges();\n }\n\n /**\n * Toggle timeline sort order between newest first (desc) and oldest first (asc).\n */\n toggleTimelineSortOrder(): void {\n const newSortOrder = this.state.timelineSortOrder === 'desc' ? 'asc' : 'desc';\n this.state.timelineSortOrder = newSortOrder;\n this.stateService.updateState({ timelineSortOrder: newSortOrder });\n this.cdr.detectChanges();\n }\n\n /**\n * Get the current timeline configuration for the entity-viewer.\n */\n get currentTimelineConfig(): { dateFieldName: string; orientation: 'vertical' | 'horizontal'; sortOrder: 'asc' | 'desc' } | null {\n const dateField = this.effectiveTimelineDateField;\n if (!dateField) return null;\n return {\n dateFieldName: dateField,\n orientation: this.state.timelineOrientation,\n sortOrder: this.state.timelineSortOrder\n };\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: false, // We have our own toggle in the dashboard header\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 /**\n * Current grid state (built from view entity or local state changes)\n * This is passed to mj-entity-viewer to control column display\n */\n public currentGridState: ViewGridState | null = null;\n\n // Filter dialog state (rendered at dashboard level for full viewport width)\n public isFilterDialogOpen: boolean = false;\n public filterDialogFields: FilterFieldInfo[] = [];\n public filterDialogState: CompositeFilterDescriptor = createEmptyFilter();\n public filterDialogDisabled: boolean = false;\n\n // View save state\n public isSavingView: boolean = false;\n\n constructor(\n public stateService: ExplorerStateService,\n private cdr: ChangeDetectorRef,\n private router: Router,\n private recentAccessService: RecentAccessService,\n private navigationService: NavigationService,\n private exportService: ExportService,\n private ngZone: NgZone\n ) {\n super();\n this.state = this.stateService.CurrentState;\n }\n\n async ngOnInit(): Promise<void> {\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 // Parse URL state FIRST - URL wins over persisted state\n // This must happen before loading entities to prevent race conditions\n const urlState = this.parseUrlState();\n\n // Set context for state service (enables context-specific settings)\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 // URL has state - apply it (overrides persisted state)\n this.applyUrlState(urlState);\n } else if (this.deepLink) {\n // No URL state but @Input deepLink provided - use that\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\n if (entityChanged) {\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n }\n\n this.onStateChanged();\n\n // Update URL to reflect current state (for deep linking)\n if (!this.skipUrlUpdates) {\n this.updateUrl();\n }\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 the shell's workspace sync, which fires NavigationEnd, which triggers\n // applyUrlState, which clears the filter text. The debouncedFilterText flows directly\n // 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 // Subscribe to router NavigationEnd events for back/forward button support\n this.router.events\n .pipe(\n filter((event): event is NavigationEnd => event instanceof NavigationEnd),\n takeUntil(this.destroy$)\n )\n .subscribe(event => {\n // Only react to navigation events that weren't triggered by us\n // Normalize URLs by decoding to handle + vs %20 encoding differences\n // Note: decodeURIComponent doesn't decode +, so we also replace + with space\n const currentUrl = event.urlAfterRedirects || event.url;\n const normalizedCurrentUrl = decodeURIComponent(currentUrl).replace(/\\+/g, ' ');\n const normalizedLastUrl = decodeURIComponent(this.lastNavigatedUrl).replace(/\\+/g, ' ');\n const isExternal = normalizedCurrentUrl !== normalizedLastUrl;\n if (isExternal) {\n this.onExternalNavigation(currentUrl);\n }\n });\n\n // Enable URL updates now that initialization is complete\n this.skipUrlUpdates = false;\n\n // Update URL to reflect current state (whether from URL, deepLink, or persisted)\n this.updateUrl();\n\n // Notify that loading is complete (for resource wrapper integration)\n this.NotifyLoadComplete();\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)\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.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.onQuickSaveRequested(true);\n return;\n }\n\n // Ctrl+Shift+V / Cmd+Shift+V: Open view selector\n if ((event.key === 'V' || (event.key === 'v' && event.shiftKey))) {\n event.preventDefault();\n this.viewSelectorRef?.toggleDropdown();\n return;\n }\n\n // Ctrl+, / Cmd+,: Toggle config panel\n if (event.key === ',') {\n event.preventDefault();\n if (this.state.viewConfigPanelOpen) {\n this.onCloseViewConfigPanel();\n } else {\n this.onConfigureViewRequested();\n }\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 this.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 = new RunView();\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 // Ensure any pending grid state changes are saved before switching entities\n // This ensures column resizes/reorders are saved to the current entity's view before switching\n this.entityViewerRef?.EnsurePendingChangesSaved();\n\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 this.selectedViewEntity = null;\n this.selectedEntity = entity;\n // Load user's saved default grid state for this entity (if any)\n // This ensures formatting and column settings persist across sessions\n this.currentGridState = this.loadUserDefaultGridState();\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 // Load user's saved default grid state for this entity (if any)\n this.currentGridState = this.loadUserDefaultGridState();\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 MANAGEMENT\n // ========================================\n\n /**\n * Handle view selection from view selector dropdown\n */\n public onViewSelected(event: ViewSelectedEvent): void {\n // Ensure any pending grid state changes are saved before switching views\n // This ensures column resizes/reorders are saved to the current view before switching\n this.entityViewerRef?.EnsurePendingChangesSaved();\n\n this.selectedViewEntity = event.view;\n this.stateService.selectView(event.viewId);\n\n // When a view is selected, apply its configuration\n if (event.view) {\n // Parse and apply the view's grid state\n this.currentGridState = this.parseViewGridState(event.view);\n\n // Apply the view's filter - for Smart Filter views, use SmartFilterPrompt\n // For regular filter views, the WhereClause is applied in the entity-viewer\n if (event.view.SmartFilterEnabled && event.view.SmartFilterPrompt) {\n this.stateService.setSmartFilterPrompt(event.view.SmartFilterPrompt);\n } else {\n // Clear the smart filter when switching to a view with regular filters\n this.stateService.setSmartFilterPrompt('');\n }\n // Always clear user search text when switching views - smart filter is separate\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n } else {\n // Switching to default view - load user's saved defaults from UserInfoEngine\n this.currentGridState = this.loadUserDefaultGridState();\n this.stateService.setSmartFilterPrompt('');\n this.liveFilterText = '';\n this.debouncedFilterText = '';\n }\n\n // detectChanges pushes the new bindings to entity-viewer; its viewEntity setter\n // already calls deferReload() so no explicit refresh() is needed.\n this.cdr.detectChanges();\n }\n\n /**\n * Load user's saved default grid state from UserInfoEngine\n * Returns null if no saved state exists\n */\n private loadUserDefaultGridState(): ViewGridState | null {\n if (!this.selectedEntity) return null;\n\n try {\n const settingKey = `default-view-setting/${this.selectedEntity.Name}`;\n const savedState = UserInfoEngine.Instance.GetSetting(settingKey);\n\n if (savedState) {\n const gridState = JSON.parse(savedState);\n if (gridState && Array.isArray(gridState.columnSettings)) {\n // Validate columns and sorts against current entity to prevent stale\n // fields from a previously viewed entity leaking into the query\n const validColumns = gridState.columnSettings.filter(\n (col: { Name: string }) => this.selectedEntity!.Fields.some(f => f.Name === col.Name)\n );\n const validSorts = (gridState.sortSettings || []).filter(\n (s: { field: string }) => this.selectedEntity!.Fields.some(f => f.Name === s.field)\n );\n if (validColumns.length > 0) {\n return {\n columnSettings: validColumns,\n sortSettings: validSorts\n };\n }\n }\n }\n } catch (error) {\n console.warn('[DataExplorer] Failed to load user default grid state:', error);\n }\n\n return null;\n }\n\n /**\n * Parse GridState JSON from a UserView entity\n * Returns null if no valid GridState is present\n */\n private parseViewGridState(view: MJUserViewEntityExtended): ViewGridState | null {\n if (!view.GridState) {\n return null;\n }\n\n try {\n const parsed = JSON.parse(view.GridState);\n\n // Validate structure - expect columnSettings array\n if (parsed && Array.isArray(parsed.columnSettings)) {\n // Validate columns and sorts against current entity to prevent stale\n // fields from a previously viewed entity leaking into the query\n const validColumns = this.selectedEntity\n ? parsed.columnSettings.filter(\n (col: { Name: string }) => this.selectedEntity!.Fields.some(f => f.Name === col.Name)\n )\n : parsed.columnSettings;\n const validSorts = this.selectedEntity\n ? (parsed.sortSettings || []).filter(\n (s: { field: string }) => this.selectedEntity!.Fields.some(f => f.Name === s.field)\n )\n : parsed.sortSettings || [];\n\n if (validColumns.length > 0) {\n return {\n columnSettings: validColumns,\n sortSettings: validSorts,\n aggregates: parsed.aggregates || undefined\n };\n }\n return null;\n }\n\n return null;\n } catch (error) {\n // BUG-010: Warn user about parse failure instead of silently returning null\n console.warn('[DataExplorer] Failed to parse GridState:', error);\n this.showNotification('Warning: Could not parse view grid configuration', 'info', 3000);\n return null;\n }\n }\n\n /**\n * Handle grid state changes from entity-viewer (column resize, reorder, etc.)\n * Updates the local currentGridState and marks view as modified\n */\n public onGridStateChanged(event: GridStateChangedEvent): void {\n this.currentGridState = event.gridState;\n\n // Mark view as modified if we have a selected view\n if (this.state.selectedViewId) {\n this.stateService.setViewModified(true);\n }\n }\n\n /**\n * Whether the config panel should default to save-as-new mode (BUG-011)\n */\n public defaultSaveAsNew: boolean = false;\n\n /**\n * Handle save view request from view selector (BUG-011: forward saveAsNew intent)\n */\n public onSaveViewRequested(event: SaveViewRequestedEvent): void {\n this.defaultSaveAsNew = event.saveAsNew || false;\n this.stateService.openViewConfigPanel();\n }\n\n /**\n * Handle manage views request - opens view browser\n */\n public onManageViewsRequested(): void {\n // TODO: Implement navigation to view management\n }\n\n /**\n * Handle open in tab request - opens the view as a ViewResource in a new tab\n */\n public onOpenInTabRequested(viewId: string): void {\n // Get the view name from the component's selectedViewEntity (set when view is selected)\n const viewName = this.selectedViewEntity?.Name || 'View';\n\n // Use NavigationService to open as a proper ViewResource (not entity record)\n this.navigationService.OpenView(viewId, viewName, { forceNewTab: true });\n }\n\n /**\n * Handle configure view request - opens the configuration panel\n */\n public onConfigureViewRequested(): void {\n this.stateService.openViewConfigPanel();\n }\n\n /**\n * Close the view configuration panel\n */\n public onCloseViewConfigPanel(): void {\n this.stateService.closeViewConfigPanel();\n this.clearPendingNewViewState();\n }\n\n private clearPendingNewViewState(): void {\n this.pendingNewViewName = '';\n this.pendingNewViewDescription = '';\n this.pendingNewViewIsShared = false;\n this.defaultSaveAsNew = false;\n }\n\n // ========================================\n // FILTER DIALOG (at dashboard level for full width)\n // ========================================\n\n /**\n * Handle request to open filter dialog from view config panel\n * The dialog is rendered at dashboard level to allow full viewport width\n */\n public onOpenFilterDialogRequest(event: { filterState: CompositeFilterDescriptor; filterFields: FilterFieldInfo[] }): void {\n this.filterDialogState = event.filterState;\n this.filterDialogFields = event.filterFields;\n this.filterDialogDisabled = !this.viewConfigPanelRef?.canEdit;\n this.isFilterDialogOpen = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Close the filter dialog\n */\n public onCloseFilterDialog(): void {\n this.isFilterDialogOpen = false;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle filter applied from dialog - pass back to view config panel\n */\n public onFilterApplied(filter: CompositeFilterDescriptor): void {\n this.filterDialogState = filter;\n this.isFilterDialogOpen = false;\n // The view config panel will pick up the new filter state via input binding\n this.cdr.detectChanges();\n }\n\n /**\n * Handle save view from config panel\n * BUG-001: Panel only closes on success (not on failure)\n * BUG-002: Shows success/error notifications\n * BUG-008: Consistent filter handling for both create and update paths\n */\n public async onSaveView(event: ViewSaveEvent): Promise<void> {\n if (!this.selectedEntity) return;\n\n this.isSavingView = true;\n this.cdr.detectChanges();\n\n try {\n const md = new Metadata();\n\n // Build GridState in Kendo-compatible format\n const gridState = this.buildGridState(event);\n\n // Build SortState in Kendo-compatible format\n const sortState = this.buildSortState(event);\n\n // BUG-008: Consistent filter state for both paths\n const filterStateJson = event.filterState\n ? JSON.stringify(event.filterState)\n : JSON.stringify({ logic: 'and', filters: [] });\n\n if (event.saveAsNew || !this.selectedViewEntity) {\n // Create new view\n const newView = await md.GetEntityObject<MJUserViewEntityExtended>('MJ: User Views');\n newView.Name = event.name || 'Custom';\n newView.Description = event.description;\n newView.EntityID = this.selectedEntity.ID;\n newView.UserID = md.CurrentUser.ID;\n newView.IsShared = event.isShared;\n newView.IsDefault = false;\n\n // Set GridState and SortState\n if (gridState) {\n newView.GridState = JSON.stringify(gridState);\n }\n if (sortState) {\n newView.SortState = JSON.stringify(sortState);\n }\n\n // Set Smart Filter settings\n newView.SmartFilterEnabled = event.smartFilterEnabled;\n newView.SmartFilterPrompt = event.smartFilterPrompt;\n\n // BUG-008: Always set FilterState consistently\n newView.FilterState = filterStateJson;\n\n const saved = await newView.Save();\n if (saved) {\n this.selectedViewEntity = newView;\n this.stateService.selectView(newView.ID);\n this.stateService.setViewModified(false);\n this.currentGridState = this.parseViewGridState(newView);\n this.cdr.detectChanges();\n await this.viewSelectorRef?.loadViews();\n // BUG-007: Await the refresh\n await this.entityViewerRef?.loadData();\n // BUG-001: Only close panel on success\n this.stateService.closeViewConfigPanel();\n // BUG-002: Show success notification\n this.showNotification(`View \"${newView.Name}\" created successfully`, 'success', 2500);\n this.clearPendingNewViewState();\n } else {\n // BUG-001: Panel stays open on failure\n // BUG-002: Show error notification\n this.showNotification('Failed to create view', 'error', 3500);\n }\n } else {\n // Update existing view\n this.selectedViewEntity.Name = event.name;\n this.selectedViewEntity.Description = event.description;\n this.selectedViewEntity.IsShared = event.isShared;\n\n // Update GridState and SortState\n if (gridState) {\n this.selectedViewEntity.GridState = JSON.stringify(gridState);\n }\n if (sortState) {\n this.selectedViewEntity.SortState = JSON.stringify(sortState);\n }\n\n // Update Smart Filter settings\n this.selectedViewEntity.SmartFilterEnabled = event.smartFilterEnabled;\n this.selectedViewEntity.SmartFilterPrompt = event.smartFilterPrompt;\n\n // BUG-008: Always set FilterState consistently\n this.selectedViewEntity.FilterState = filterStateJson;\n\n const saved = await this.selectedViewEntity.Save();\n if (saved) {\n this.stateService.setViewModified(false);\n this.currentGridState = this.parseViewGridState(this.selectedViewEntity);\n this.cdr.detectChanges();\n await this.viewSelectorRef?.loadViews();\n // BUG-007: Await the refresh\n await this.entityViewerRef?.loadData();\n // BUG-001: Only close panel on success\n this.stateService.closeViewConfigPanel();\n // BUG-002: Show success notification\n this.showNotification(`View \"${event.name}\" updated successfully`, 'success', 2500);\n } else {\n // BUG-001: Panel stays open on failure\n // BUG-002: Show error notification\n this.showNotification('Failed to update view', 'error', 3500);\n }\n }\n\n this.cdr.detectChanges();\n } catch (error) {\n console.error('[DataExplorer] Error saving view:', error);\n // BUG-002: Show error notification with details\n const errorMsg = error instanceof Error ? error.message : 'Unknown error';\n this.showNotification(`Failed to save view: ${errorMsg}`, 'error', 4000);\n } finally {\n this.ngZone.run(() => {\n this.isSavingView = false;\n this.cdr.detectChanges();\n });\n }\n }\n\n /**\n * Handle saving default view settings to user settings\n * Used for dynamic/default views that persist to MJ: User Settings\n */\n public async onSaveDefaultViewSettings(event: ViewSaveEvent): Promise<void> {\n if (!this.selectedEntity) return;\n\n this.isSavingView = true;\n this.cdr.detectChanges();\n\n try {\n // Build GridState from the event\n const gridState = this.buildGridState(event);\n\n if (gridState) {\n // Build sort settings if present - prefer sortItems (multi-sort)\n if (event.sortItems && event.sortItems.length > 0) {\n gridState.sortSettings = event.sortItems.map(item => ({\n field: item.field,\n dir: item.direction\n }));\n } else if (event.sortField) {\n // Fallback to deprecated sortField for backward compatibility\n gridState.sortSettings = [{\n field: event.sortField,\n dir: event.sortDirection\n }];\n }\n\n // Save to user settings using the same key pattern as entity-data-grid\n const settingKey = `default-view-setting/${this.selectedEntity.Name}`;\n await UserInfoEngine.Instance.SetSetting(settingKey, JSON.stringify(gridState));\n\n // Update currentGridState to reflect saved state\n this.currentGridState = {\n columnSettings: gridState.columnSettings as ViewGridState['columnSettings'],\n sortSettings: gridState.sortSettings as ViewGridState['sortSettings'],\n aggregates: gridState.aggregates\n };\n\n // Force change detection to ensure grid picks up the new gridState\n this.cdr.detectChanges();\n\n // Refresh the entity viewer data to apply saved aggregates and fetch their values\n this.entityViewerRef?.refresh();\n\n // Show success notification\n this.showNotification('Default view settings saved', 'success', 2500);\n }\n\n this.stateService.closeViewConfigPanel();\n this.cdr.detectChanges();\n } catch (error) {\n console.error('[DataExplorer] Error saving default view settings:', error);\n // Show error notification\n this.showNotification('Failed to save default view settings', 'error', 3500);\n } finally {\n this.ngZone.run(() => {\n this.isSavingView = false;\n this.cdr.detectChanges();\n });\n }\n }\n\n /**\n * Build GridState in Kendo-compatible format\n * Format: { columnSettings: [...], sortSettings: [...], aggregates: {...} }\n *\n * Priority for column settings:\n * 1. If event.columns provided (from config panel) - use those\n * 2. If currentGridState exists (from grid interactions) - use that\n * 3. Otherwise return null\n */\n private buildGridState(event: ViewSaveEvent): { columnSettings: object[]; sortSettings?: object[]; aggregates?: ViewGridAggregatesConfig } | null {\n let columnSettings: object[];\n\n // First check if the event has columns configured (from config panel)\n if (event.columns.length > 0) {\n columnSettings = event.columns.map((col, idx) => ({\n ID: col.fieldId,\n Name: col.fieldName,\n DisplayName: col.displayName,\n userDisplayName: col.userDisplayName, // Include user-defined column alias\n hidden: false, // Visible columns only\n width: col.width || null,\n orderIndex: idx,\n format: col.format // Include column format settings\n }));\n }\n // Otherwise, use the current grid state if available (from grid interactions)\n else if (this.currentGridState?.columnSettings && this.currentGridState.columnSettings.length > 0) {\n columnSettings = this.currentGridState.columnSettings;\n }\n // BUG-005: Third fallback - use entity DefaultInView fields so we never return null\n else if (this.selectedEntity) {\n columnSettings = this.selectedEntity.Fields\n .filter(f => f.DefaultInView)\n .map((f, idx) => ({\n ID: f.ID,\n Name: f.Name,\n DisplayName: f.DisplayNameOrName,\n hidden: false,\n width: f.DefaultColumnWidth || null,\n orderIndex: idx\n }));\n if (columnSettings.length === 0) {\n return null;\n }\n }\n // No columns to save\n else {\n return null;\n }\n\n // Build sort settings - prefer event.sortItems (multi-sort), fall back to currentGridState\n let sortSettings: object[] | undefined;\n if (event.sortItems && event.sortItems.length > 0) {\n sortSettings = event.sortItems.map(item => ({\n field: item.field,\n dir: item.direction // 'asc' or 'desc'\n }));\n } else if (event.sortField) {\n // Fallback to deprecated sortField for backward compatibility\n sortSettings = [{\n field: event.sortField,\n dir: event.sortDirection\n }];\n } else if (this.currentGridState?.sortSettings && this.currentGridState.sortSettings.length > 0) {\n sortSettings = this.currentGridState.sortSettings;\n }\n\n // Build aggregate settings from event or current state\n let aggregates: ViewGridAggregatesConfig | undefined;\n if (event.aggregatesConfig) {\n aggregates = event.aggregatesConfig;\n } else if (this.currentGridState?.aggregates) {\n aggregates = this.currentGridState.aggregates;\n }\n\n return { columnSettings, sortSettings, aggregates };\n }\n\n /**\n * Build SortState in Kendo-compatible format\n * Format: [{field, direction}] where direction is 'asc' or 'desc'\n * Supports multi-column sorting via sortItems array\n */\n private buildSortState(event: ViewSaveEvent): object[] | null {\n // Prefer sortItems array (multi-sort) over deprecated sortField\n if (event.sortItems && event.sortItems.length > 0) {\n return event.sortItems.map(item => ({\n field: item.field,\n direction: item.direction // 'asc' or 'desc'\n }));\n }\n\n // Fallback to deprecated sortField for backward compatibility\n if (event.sortField) {\n return [{\n field: event.sortField,\n direction: event.sortDirection\n }];\n }\n\n return null;\n }\n\n /**\n * Handle delete view from config panel\n */\n public async onDeleteView(): Promise<void> {\n if (!this.selectedViewEntity) return;\n\n const viewName = this.selectedViewEntity.Name;\n try {\n const deleted = await this.selectedViewEntity.Delete();\n if (deleted) {\n this.selectedViewEntity = null;\n this.stateService.selectView(null);\n this.stateService.closeViewConfigPanel();\n await this.viewSelectorRef?.loadViews();\n this.showNotification(`View \"${viewName}\" deleted`, 'success', 2500);\n } else {\n this.showNotification('Failed to delete view', 'error', 3500);\n }\n } catch (error) {\n console.error('[DataExplorer] Error deleting view:', error);\n const errorMsg = error instanceof Error ? error.message : 'Unknown error';\n this.showNotification(`Failed to delete view: ${errorMsg}`, 'error', 4000);\n }\n }\n\n // ========================================\n // QUICK SAVE, DUPLICATE, REVERT (F-001, F-005, F-007)\n // ========================================\n\n /**\n * Handle quick save request from view selector (F-001)\n * Builds a summary from the current config panel state and opens the Quick Save dialog\n * @param saveAsNew - true when user explicitly clicked \"Save As New\"\n */\n public onQuickSaveRequested(saveAsNew: boolean): void {\n this.defaultSaveAsNew = saveAsNew;\n // Build summary from config panel if available\n this.quickSaveSummary = this.viewConfigPanelRef?.BuildSummary() ?? null;\n this.showQuickSaveDialog = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle quick save event from Quick Save dialog (F-001)\n * If updating a shared view, intercepts to show the shared view warning first.\n * Otherwise constructs a ViewSaveEvent and delegates to onSaveView.\n */\n public async onQuickSave(event: QuickSaveEvent): Promise<void> {\n this.showQuickSaveDialog = false;\n\n // If updating (not save-as-new) a shared view, show the warning dialog\n if (!event.SaveAsNew && this.selectedViewEntity?.IsShared) {\n this.pendingQuickSaveEvent = event;\n this.showSharedViewWarning = true;\n this.cdr.detectChanges();\n return;\n }\n\n await this.executeQuickSave(event);\n }\n\n /**\n * Execute the actual quick save (called directly or after shared view warning confirmation)\n */\n private async executeQuickSave(event: QuickSaveEvent): Promise<void> {\n const viewSaveEvent: ViewSaveEvent = {\n name: event.Name,\n description: event.Description,\n isShared: event.IsShared,\n saveAsNew: event.SaveAsNew,\n columns: [],\n sortField: null,\n sortDirection: 'asc',\n sortItems: [],\n smartFilterEnabled: false,\n smartFilterPrompt: '',\n filterState: this.filterDialogState ?? null,\n aggregatesConfig: null\n };\n\n await this.onSaveView(viewSaveEvent);\n }\n\n /**\n * Handle shared view warning dialog action\n */\n public async onSharedViewAction(action: SharedViewAction): Promise<void> {\n this.showSharedViewWarning = false;\n const event = this.pendingQuickSaveEvent;\n this.pendingQuickSaveEvent = null;\n\n if (!event) return;\n\n if (action === 'update-shared') {\n // Proceed with the update\n await this.executeQuickSave(event);\n } else if (action === 'save-as-copy') {\n // Save as a new personal copy instead\n await this.executeQuickSave({\n ...event,\n SaveAsNew: true,\n IsShared: false\n });\n }\n // 'cancel' - do nothing\n this.cdr.detectChanges();\n }\n\n /**\n * Handle shared view warning cancel\n */\n public onSharedViewWarningCancel(): void {\n this.showSharedViewWarning = false;\n this.pendingQuickSaveEvent = null;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle quick save dialog close\n */\n public onQuickSaveClose(): void {\n this.showQuickSaveDialog = false;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle quick save \"Open Advanced\" - close dialog and open full config panel\n */\n public onQuickSaveOpenAdvanced(event: QuickSaveAdvancedEvent): void {\n // Carry form data from quick save dialog to the config panel\n this.pendingNewViewName = event.Name;\n this.pendingNewViewDescription = event.Description;\n this.pendingNewViewIsShared = event.IsShared;\n this.defaultSaveAsNew = true;\n this.showQuickSaveDialog = false;\n this.stateService.openViewConfigPanel();\n this.cdr.detectChanges();\n }\n\n /**\n * Handle duplicate view request (F-005)\n * Opens the Duplicate View Dialog so user can choose a name for the copy\n */\n public async onDuplicateView(viewId?: string): Promise<void> {\n const targetId = viewId || this.selectedViewEntity?.ID;\n if (!targetId || !this.selectedEntity) return;\n\n // Find the view to get its name for the dialog\n const allViews = [...(this.viewSelectorRef?.myViews ?? []), ...(this.viewSelectorRef?.sharedViews ?? [])];\n const viewItem = allViews.find(v => v.id === targetId);\n this.duplicateTargetViewId = targetId;\n this.duplicateSourceViewName = viewItem?.name || this.selectedViewEntity?.Name || 'View';\n this.duplicateSummary = this.buildDuplicateSummary(viewItem?.entity ?? this.selectedViewEntity);\n this.showDuplicateDialog = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Build a ViewConfigSummary from a view entity for the duplicate dialog\n */\n private buildDuplicateSummary(view: MJUserViewEntityExtended | null): ViewConfigSummary | null {\n if (!view) return null;\n let columnCount = 0;\n let filterCount = 0;\n let sortCount = 0;\n let aggregateCount = 0;\n\n try {\n const gridState = view.GridState ? JSON.parse(view.GridState) : null;\n if (Array.isArray(gridState)) {\n columnCount = gridState.filter((c: Record<string, unknown>) => !c['hidden']).length;\n }\n } catch { /* ignore */ }\n\n try {\n const filterState = view.FilterState ? JSON.parse(view.FilterState) : null;\n if (filterState?.filters?.length) filterCount = filterState.filters.length;\n } catch { /* ignore */ }\n\n try {\n const sortState = view.SortState ? JSON.parse(view.SortState) : null;\n if (Array.isArray(sortState)) sortCount = sortState.length;\n } catch { /* ignore */ }\n\n return {\n ColumnCount: columnCount,\n FilterCount: filterCount,\n SortCount: sortCount,\n SmartFilterActive: view.SmartFilterEnabled || false,\n SmartFilterPrompt: view.SmartFilterPrompt || '',\n AggregateCount: aggregateCount\n };\n }\n\n /**\n * Handle duplicate dialog confirmation - actually creates the copy\n */\n public async onDuplicateConfirmed(event: DuplicateViewEvent): Promise<void> {\n this.showDuplicateDialog = false;\n const targetId = this.duplicateTargetViewId;\n this.duplicateTargetViewId = null;\n\n if (!targetId || !this.selectedEntity) return;\n\n const md = new Metadata();\n const rv = new RunView();\n try {\n const result = await rv.RunView<MJUserViewEntityExtended>({\n EntityName: 'MJ: User Views',\n ExtraFilter: `ID = '${targetId}'`,\n ResultType: 'entity_object'\n });\n\n if (!result.Success || !result.Results || result.Results.length === 0) {\n this.showNotification('Could not find view to duplicate', 'error', 3500);\n return;\n }\n\n const sourceView = result.Results[0];\n\n const newView = await md.GetEntityObject<MJUserViewEntityExtended>('MJ: User Views');\n newView.Name = event.Name;\n newView.Description = sourceView.Description || '';\n newView.EntityID = sourceView.EntityID;\n newView.IsShared = false;\n newView.IsDefault = false;\n newView.GridState = sourceView.GridState;\n newView.FilterState = sourceView.FilterState;\n newView.SortState = sourceView.SortState;\n newView.SmartFilterEnabled = sourceView.SmartFilterEnabled || false;\n newView.SmartFilterPrompt = sourceView.SmartFilterPrompt || '';\n\n const saved = await newView.Save();\n if (saved) {\n this.showNotification(`View duplicated as \"${newView.Name}\"`, 'success', 2500);\n await this.viewSelectorRef?.loadViews();\n } else {\n this.showNotification('Failed to duplicate view', 'error', 3500);\n }\n } catch (error) {\n console.error('[DataExplorer] Error duplicating view:', error);\n const errorMsg = error instanceof Error ? error.message : 'Unknown error';\n this.showNotification(`Failed to duplicate view: ${errorMsg}`, 'error', 4000);\n }\n }\n\n /**\n * Handle duplicate dialog cancel\n */\n public onDuplicateCancel(): void {\n this.showDuplicateDialog = false;\n this.duplicateTargetViewId = null;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle duplicate from config panel (F-005)\n * Duplicates the currently selected view\n */\n public onDuplicateFromPanel(): void {\n if (this.selectedViewEntity?.ID) {\n this.stateService.closeViewConfigPanel();\n this.onDuplicateView(this.selectedViewEntity.ID);\n }\n }\n\n /**\n * Handle revert view request (F-007)\n * Re-parses the saved view's GridState and resets modified flag\n */\n public async onRevertView(): Promise<void> {\n if (!this.selectedViewEntity) return;\n\n try {\n // Re-parse the saved grid state from the view entity\n const gridState = this.parseViewGridState(this.selectedViewEntity);\n if (gridState) {\n this.currentGridState = gridState;\n }\n\n // Reset modified flag\n this.stateService.setViewModified(false);\n\n // Refresh the viewer to apply the reverted state\n await this.entityViewerRef?.loadData();\n\n this.showNotification('View reverted to last saved state', 'info', 2500);\n this.cdr.detectChanges();\n } catch (error) {\n console.error('[DataExplorer] Error reverting view:', error);\n this.showNotification('Failed to revert view', 'error', 3500);\n }\n }\n\n /**\n * Handle inline view name change from ViewHeader (F-002)\n * Updates the view entity name and saves immediately\n */\n public async onViewNameChanged(newName: string): Promise<void> {\n if (!this.selectedViewEntity || !newName.trim()) return;\n\n try {\n this.selectedViewEntity.Name = newName.trim();\n const saved = await this.selectedViewEntity.Save();\n if (saved) {\n this.showNotification(`View renamed to \"${newName.trim()}\"`, 'success', 2500);\n // Refresh the view selector to show the updated name\n this.viewSelectorRef?.loadViews();\n } else {\n this.showNotification('Failed to rename view', 'error', 3500);\n }\n this.cdr.detectChanges();\n } catch (error) {\n console.error('[DataExplorer] Error renaming view:', error);\n this.showNotification('Failed to rename view', 'error', 3500);\n }\n }\n\n // ========================================\n // VIEW MODE & FILTERING (Dashboard Header)\n // ========================================\n\n /**\n * Handle view mode toggle from dashboard header\n */\n public onViewModeChanged(mode: EntityViewMode): void {\n this.stateService.setViewMode(mode);\n // Mark view as modified when view mode changes\n if (this.state.selectedViewId) {\n this.stateService.setViewModified(true);\n }\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 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 * Handle export request - opens the export dialog\n */\n public async onExport(): Promise<void> {\n if (!this.selectedEntity) {\n console.error('Cannot export: No entity selected');\n return;\n }\n\n try {\n this.showNotification('Preparing export...', 'info', 2000);\n\n // Load the export data\n const data = await this.getExportData();\n\n // Get visible columns for export\n const columns = this.getExportColumns();\n\n // Generate file name\n const viewName = this.selectedViewEntity?.Name || 'Data';\n const fileName = `${this.selectedEntity.Name}_${viewName}_${new Date().toISOString().split('T')[0]}`;\n\n // Configure and show the export dialog\n this.exportDialogConfig = {\n data,\n columns,\n defaultFileName: fileName,\n availableFormats: ['excel', 'csv', 'json'],\n defaultFormat: 'excel',\n showSamplingOptions: true,\n defaultSamplingMode: 'all',\n dialogTitle: `Export ${this.selectedEntity.Name}`\n };\n this.showExportDialog = true;\n this.cdr.detectChanges();\n } catch (e) {\n this.showNotification('Error preparing export', 'error', 5000);\n console.error('Export error:', e);\n }\n }\n\n /**\n * Handle export dialog close\n */\n public onExportDialogClosed(result: ExportDialogResult): void {\n this.showExportDialog = false;\n this.exportDialogConfig = null;\n this.cdr.detectChanges();\n\n if (result.exported) {\n this.showNotification('Export complete', 'success', 2000);\n }\n }\n\n /**\n * Get visible columns for export based on current grid/view state\n */\n private getExportColumns(): ExportColumn[] {\n if (!this.selectedEntity) return [];\n\n // Priority 1: Current grid state (reflects actual displayed columns)\n if (this.currentGridState?.columnSettings && this.currentGridState.columnSettings.length > 0) {\n const visibleColumns = this.currentGridState.columnSettings.filter(col => col.hidden !== true);\n return visibleColumns.map(col => {\n const field = this.selectedEntity?.Fields.find(f => f.Name === col.Name);\n return {\n name: col.Name,\n displayName: col.DisplayName || col.Name,\n dataType: this.mapFieldTypeToExportType(field?.Type)\n };\n });\n }\n\n // Priority 2: View's column configuration\n if (this.selectedViewEntity?.Columns) {\n const visibleColumns = this.selectedViewEntity.Columns.filter(col => !col.hidden);\n return visibleColumns.map(col => {\n const field = this.selectedEntity?.Fields.find(f => f.Name === col.Name);\n return {\n name: col.Name,\n displayName: col.DisplayName || col.Name,\n dataType: this.mapFieldTypeToExportType(field?.Type)\n };\n });\n }\n\n // Priority 3: All non-virtual fields\n const visibleFields = this.selectedEntity.Fields.filter(f => !f.IsVirtual);\n return visibleFields.map(f => ({\n name: f.Name,\n displayName: f.DisplayNameOrName,\n dataType: this.mapFieldTypeToExportType(f.Type)\n }));\n }\n\n /**\n * Map MemberJunction field types to export column types\n */\n private mapFieldTypeToExportType(fieldType?: string): ExportColumn['dataType'] {\n if (!fieldType) return 'string';\n\n const type = fieldType.toLowerCase();\n if (type.includes('int') || type.includes('decimal') || type.includes('float') || type.includes('numeric')) {\n return 'number';\n }\n if (type.includes('date') || type.includes('time')) {\n return 'date';\n }\n if (type.includes('bit') || type.includes('bool')) {\n return 'boolean';\n }\n if (type.includes('money') || type.includes('currency')) {\n return 'currency';\n }\n return 'string';\n }\n\n /**\n * Get the data for export - loads all records for the current view/entity\n */\n protected async getExportData(): Promise<ExportData> {\n if (!this.selectedEntity) {\n throw new Error('No entity selected for export');\n }\n\n const md = new Metadata();\n const rv = new RunView();\n\n // Build the run view params based on current state\n const baseParams = {\n EntityName: this.selectedEntity.Name,\n ExtraFilter: this.buildExtraFilter(),\n OrderBy: this.buildOrderBy(),\n IgnoreMaxRows: true,\n ForceAuditLog: true,\n AuditLogDescription: `Export of Data From ${this.selectedViewEntity ? '\"' + this.selectedViewEntity.Name + '\"' : this.selectedEntity.Name} View for User ${md.CurrentUser.Email}`\n };\n\n // Add smart filter if present\n const params = this.debouncedFilterText\n ? { ...baseParams, UserSearchString: this.debouncedFilterText }\n : baseParams;\n\n const result = await rv.RunView(params);\n\n if (result && result.Success) {\n return result.Results as Record<string, unknown>[];\n } else {\n throw new Error('Unable to get export data: ' + (result?.ErrorMessage || 'Unknown error'));\n }\n }\n\n /**\n * Build the ExtraFilter string based on current view and filter state\n */\n private buildExtraFilter(): string {\n const filters: string[] = [];\n\n // Add view filter if a view is selected\n if (this.selectedViewEntity?.WhereClause) {\n filters.push(`(${this.selectedViewEntity.WhereClause})`);\n }\n\n // Add smart filter if present\n if (this.debouncedFilterText) {\n // Smart filter is applied via UserSearchString in RunView, not ExtraFilter\n // So we don't need to add it here\n }\n\n return filters.join(' AND ');\n }\n\n /**\n * Build the OrderBy string based on current view state\n */\n private buildOrderBy(): string {\n // Use view's OrderByClause if available\n if (this.selectedViewEntity?.OrderByClause) {\n return this.selectedViewEntity.OrderByClause;\n }\n\n // Use grid state sort if available\n if (this.currentGridState?.sortSettings && this.currentGridState.sortSettings.length > 0) {\n const sorts = this.currentGridState.sortSettings.map(s =>\n `${s.field} ${s.dir.toUpperCase()}`\n );\n return sorts.join(', ');\n }\n\n // Default sort by primary key\n return this.selectedEntity!.FirstPrimaryKey.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 = new RunView();\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 // Apply view mode if specified\n if (deepLink.viewMode) {\n this.stateService.setViewMode(deepLink.viewMode);\n }\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\n // ========================================\n\n /**\n * Parse URL query string and return a deep link object.\n * Returns null if no relevant params found.\n *\n * Query params:\n * - entity: Selected entity name\n * - record: Selected record ID (URL segment format via CompositeKey)\n * - filter: Current filter text\n * - view: View mode (grid or cards)\n */\n private parseUrlState(): DataExplorerDeepLink | null {\n const url = this.router.url;\n const queryIndex = url.indexOf('?');\n if (queryIndex === -1) {\n return null;\n }\n\n const queryString = url.substring(queryIndex + 1);\n const params = new URLSearchParams(queryString);\n const entity = params.get('entity');\n const record = params.get('record');\n const filter = params.get('filter');\n const view = params.get('view') as 'grid' | 'cards' | null;\n\n // If no params, return null\n if (!entity && !record && !filter && !view) {\n return null;\n }\n\n return {\n entity: entity || undefined,\n record: record || undefined,\n filter: filter || undefined,\n viewMode: view || undefined\n };\n }\n\n /**\n * Apply URL state to the component.\n * Used both during init and for popstate handling.\n */\n private applyUrlState(urlState: DataExplorerDeepLink): void {\n // Apply view mode if specified\n if (urlState.viewMode) {\n this.stateService.setViewMode(urlState.viewMode);\n }\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 // Apply filter if specified (to smart filter state, not user search)\n if (urlState.filter) {\n this.stateService.setSmartFilterPrompt(urlState.filter);\n } else if (entityChanged) {\n // Only clear filter if entity changed (selectEntity already handles this)\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 as unknown as string);\n this.stateService.closeDetailPanel();\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Update the URL query string to reflect current navigation state.\n * This enables deep linking - users can bookmark or share URLs to specific views.\n * Called immediately on state changes (not debounced).\n * Uses NavigationService for proper URL management that respects app-scoped routes.\n */\n private updateUrl(): void {\n const queryParams: Record<string, string | null> = {};\n\n // Add entity if selected\n if (this.state.selectedEntityName) {\n queryParams['entity'] = this.state.selectedEntityName;\n } else {\n queryParams['entity'] = null;\n }\n\n // Add record if selected (only if entity is also selected)\n if (this.state.selectedRecordId && this.state.selectedEntityName) {\n queryParams['record'] = this.state.selectedRecordId;\n } else {\n queryParams['record'] = null;\n }\n\n // Add filter if present (only if entity is also selected)\n if (this.state.smartFilterPrompt && this.state.selectedEntityName) {\n queryParams['filter'] = this.state.smartFilterPrompt;\n } else {\n queryParams['filter'] = null;\n }\n\n // Add view mode if not default (grid is default)\n if (this.state.viewMode && this.state.viewMode !== 'grid') {\n queryParams['view'] = this.state.viewMode;\n } else {\n queryParams['view'] = null;\n }\n\n // Use NavigationService to update query params properly\n this.navigationService.UpdateActiveTabQueryParams(queryParams);\n }\n\n /**\n * Handle external navigation (back/forward buttons).\n * Parses the URL and applies the state without triggering a new navigation.\n */\n private onExternalNavigation(url: string): void {\n // Check if this URL is for our component (contains our base path)\n const currentPath = this.router.url.split('?')[0];\n const newPath = url.split('?')[0];\n\n // Only handle if we're still on the same base path (same dashboard instance)\n if (currentPath !== newPath) {\n return; // Different route entirely, shell will handle it\n }\n\n // Parse the new URL state\n const urlState = this.parseUrlFromString(url);\n\n // Apply the state without triggering URL updates\n this.skipUrlUpdates = true;\n if (urlState) {\n this.applyUrlState(urlState);\n } else {\n // No params means go to home view\n this.selectedEntity = null;\n this.selectedRecord = null;\n this.detailPanelEntity = null;\n this.stateService.selectEntity(null as unknown as string);\n this.stateService.closeDetailPanel();\n }\n this.skipUrlUpdates = false;\n\n // Update the tracked URL\n this.lastNavigatedUrl = url;\n\n this.cdr.detectChanges();\n }\n\n /**\n * Parse URL state from a URL string (used for external navigation).\n */\n private parseUrlFromString(url: string): DataExplorerDeepLink | null {\n const queryIndex = url.indexOf('?');\n if (queryIndex === -1) {\n return null;\n }\n\n const queryString = url.substring(queryIndex + 1);\n const params = new URLSearchParams(queryString);\n const entity = params.get('entity');\n const record = params.get('record');\n const filterParam = params.get('filter');\n const view = params.get('view') as 'grid' | 'cards' | null;\n\n // If no params, return null\n if (!entity && !record && !filterParam && !view) {\n return null;\n }\n\n return {\n entity: entity || undefined,\n record: record || undefined,\n filter: filterParam || undefined,\n viewMode: view || undefined\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 entityIdToApp = new Map<string, ApplicationInfo>();\n const groupMap = new Map<string, AppEntityGroup>();\n\n // Build entity -> first application mapping\n for (const app of applications) {\n for (const appEntity of app.ApplicationEntities) {\n if (!entityIdToApp.has(appEntity.EntityID)) {\n entityIdToApp.set(appEntity.EntityID, app);\n }\n }\n }\n\n // Assign each visible entity to its group\n const ungroupedEntities: EntityInfo[] = [];\n for (const entity of this.entities) {\n const app = entityIdToApp.get(entity.ID);\n if (app) {\n this.addEntityToGroup(groupMap, app, entity);\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: '#9e9e9e',\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 // SELECTION TRACKING\n // ========================================\n\n /**\n * Handle selection changes from entity-viewer grid.\n * Tracks selected records to enable the Add to List button in the header toolbar.\n */\n public onSelectionChanged(event: { records: Record<string, unknown>[]; recordIds: string[] }): void {\n this.selectedRecords = event.records || [];\n this.selectedRecordIds = event.recordIds || [];\n this.cdr.detectChanges();\n }\n\n /**\n * Check if there are selected records (for enabling Add to List button)\n */\n public get hasSelectedRecords(): boolean {\n return this.selectedRecords.length > 0;\n }\n\n // ========================================\n // LIST MANAGEMENT\n // ========================================\n\n /**\n * Handle Add to List button click from header toolbar.\n * Opens the list management dialog for selected records.\n */\n public onAddToListClick(): void {\n if (!this.selectedEntity || this.selectedRecords.length === 0) {\n console.warn('Add to List: No entity selected or no records selected');\n return;\n }\n\n // Build the event object and delegate to existing handler\n const event = {\n entityInfo: this.selectedEntity,\n records: this.selectedRecords,\n recordIds: this.selectedRecordIds\n };\n\n this.onAddToListRequested(event);\n }\n\n /**\n * Handle Add to List request from entity-viewer grid toolbar.\n * Opens the list management dialog for multiple selected records.\n */\n public onAddToListRequested(event: { entityInfo: EntityInfo; records: Record<string, unknown>[]; recordIds: string[] }): void {\n // Validate input\n if (!event.entityInfo) {\n console.error('Add to List: entityInfo is missing from event');\n return;\n }\n if (!event.records || event.records.length === 0) {\n console.error('Add to List: No records in event. Event:', event);\n return;\n }\n\n console.log(`Add to List: Processing ${event.records.length} record(s) for entity \"${event.entityInfo.Name}\"`);\n\n // Get display names for the records\n const recordDisplayNames = event.records.map(record => {\n try {\n if (event.entityInfo.NameField) {\n const nameValue = record[event.entityInfo.NameField.Name];\n if (nameValue) return String(nameValue);\n }\n return buildPkString(record, event.entityInfo) || 'Unknown';\n } catch (err) {\n console.error('Add to List: Error getting record display name:', err);\n return 'Unknown';\n }\n });\n\n // Get raw primary key values (not concatenated strings) for list membership\n const pkFieldName = event.entityInfo.PrimaryKeys[0]?.Name;\n const recordIds = event.records.map(record => {\n try {\n if (!pkFieldName || record[pkFieldName] === null || record[pkFieldName] === undefined) {\n console.error('Add to List: Record has no primary key:', record);\n return '';\n }\n return String(record[pkFieldName]);\n } catch (err) {\n console.error('Add to List: Error getting record ID:', err);\n return '';\n }\n }).filter(id => id !== '');\n\n if (recordIds.length === 0) {\n console.error('Add to List: No valid record IDs found');\n return;\n }\n\n const recordCount = event.records.length;\n const dialogTitle = recordCount === 1\n ? `Manage Lists for \"${recordDisplayNames[0]}\"`\n : `Add ${recordCount} Records to List`;\n\n console.log(`Add to List: Opening dialog for ${recordIds.length} record(s)`);\n\n this.listManagementConfig = {\n mode: 'manage',\n entityId: event.entityInfo.ID,\n entityName: event.entityInfo.Name,\n recordIds: recordIds,\n recordDisplayNames: recordDisplayNames,\n allowCreate: true,\n allowRemove: recordCount === 1, // Only allow remove for single record\n showMembership: recordCount === 1, // Only show membership for single record\n dialogTitle: dialogTitle\n };\n\n this.showListManagementDialog = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Open the list management dialog for the currently selected record\n */\n public openListManagementDialog(): void {\n if (!this.selectedEntity || !this.selectedRecord) {\n return;\n }\n\n // Use the raw primary key value (not concatenated string) for list membership\n // This matches how records are stored in List Details and enables proper subquery filtering\n const pkFieldName = this.selectedEntity.PrimaryKeys[0]?.Name;\n const recordId = pkFieldName ? String(this.selectedRecord[pkFieldName] ?? '') : '';\n const recordName = this.getRecordDisplayName(this.selectedRecord);\n\n this.listManagementConfig = {\n mode: 'manage',\n entityId: this.selectedEntity.ID,\n entityName: this.selectedEntity.Name,\n recordIds: [recordId],\n recordDisplayNames: [recordName],\n allowCreate: true,\n allowRemove: true,\n showMembership: true,\n dialogTitle: `Manage Lists for \"${recordName}\"`\n };\n\n this.showListManagementDialog = true;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle completion of the list management dialog\n */\n public onListManagementComplete(result: ListManagementResult): void {\n this.showListManagementDialog = false;\n this.listManagementConfig = null;\n\n if (result.action === 'apply') {\n const addedCount = result.added.length;\n const removedCount = result.removed.length;\n\n if (addedCount > 0 || removedCount > 0) {\n let message = '';\n if (addedCount > 0) {\n message += `Added to ${addedCount} list(s)`;\n }\n if (removedCount > 0) {\n if (message) message += ', ';\n message += `Removed from ${removedCount} list(s)`;\n }\n this.showNotification(message, 'success', 2500);\n }\n }\n\n this.cdr.detectChanges();\n }\n\n /**\n * Handle cancellation of the list management dialog\n */\n public onListManagementCancel(): void {\n this.showListManagementDialog = false;\n this.listManagementConfig = null;\n this.cdr.detectChanges();\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 -->\n <mj-view-selector\n [entity]=\"selectedEntity\"\n [selectedViewId]=\"state.selectedViewId\"\n [viewModified]=\"state.viewModified\"\n (viewSelected)=\"onViewSelected($event)\"\n (saveViewRequested)=\"onSaveViewRequested($event)\"\n (manageViewsRequested)=\"onManageViewsRequested()\"\n (openInTabRequested)=\"onOpenInTabRequested($event)\"\n (configureViewRequested)=\"onConfigureViewRequested()\"\n (createNewRecordRequested)=\"onCreateNewRecord()\"\n (exportRequested)=\"onExport()\"\n (duplicateViewRequested)=\"onDuplicateView($event)\"\n (quickSaveRequested)=\"onQuickSaveRequested($event)\"\n (revertRequested)=\"onRevertView()\">\n </mj-view-selector>\n\n <!-- Add to List Button -->\n <button\n class=\"header-action-btn\"\n [class.disabled]=\"!hasSelectedRecords\"\n [disabled]=\"!hasSelectedRecords\"\n (click)=\"onAddToListClick()\"\n [title]=\"hasSelectedRecords ? 'Add ' + selectedRecords.length + ' selected record(s) to a list' : 'Select records to add to a list'\">\n <i class=\"fa-solid fa-list-check\"></i>\n @if (hasSelectedRecords) {\n <span class=\"selection-badge\">{{ selectedRecords.length }}</span>\n }\n </button>\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 Mode Toggle -->\n <div class=\"view-mode-toggle\">\n <button\n class=\"toggle-btn\"\n [class.active]=\"state.viewMode === 'grid'\"\n (click)=\"onViewModeChanged('grid')\"\n title=\"Grid View\">\n <i class=\"fa-solid fa-list\"></i>\n </button>\n <button\n class=\"toggle-btn\"\n [class.active]=\"state.viewMode === 'cards'\"\n (click)=\"onViewModeChanged('cards')\"\n title=\"Cards View\">\n <i class=\"fa-solid fa-grip\"></i>\n </button>\n @if (entityHasDateFields) {\n <button\n class=\"toggle-btn\"\n [class.active]=\"state.viewMode === 'timeline'\"\n (click)=\"onViewModeChanged('timeline')\"\n title=\"Timeline View\">\n <i class=\"fa-solid fa-timeline\"></i>\n </button>\n }\n </div>\n\n <!-- Timeline Controls (only shown when timeline view is active) -->\n @if (state.viewMode === 'timeline' && entityHasDateFields) {\n <!-- Date Field Selector -->\n <div class=\"date-field-selector-container\">\n <!-- Backdrop for closing dropdown -->\n @if (isDateFieldDropdownOpen) {\n <div class=\"date-field-backdrop\" (click)=\"closeDateFieldDropdown()\"></div>\n }\n\n <div class=\"date-field-selector-wrapper\">\n <button\n class=\"date-field-selector-button\"\n [class.open]=\"isDateFieldDropdownOpen\"\n [disabled]=\"availableDateFields.length <= 1\"\n (click)=\"toggleDateFieldDropdown()\">\n <i class=\"fa-solid fa-calendar-days date-field-icon\"></i>\n <span class=\"date-field-name\">{{ effectiveTimelineDateFieldDisplayName }}</span>\n @if (availableDateFields.length > 1) {\n <i class=\"fa-solid fa-chevron-down date-field-arrow\" [class.rotated]=\"isDateFieldDropdownOpen\"></i>\n }\n </button>\n\n @if (isDateFieldDropdownOpen && availableDateFields.length > 1) {\n <div class=\"date-field-dropdown-panel\">\n @for (field of availableDateFields; track field.name) {\n <div\n class=\"date-field-dropdown-item\"\n [class.selected]=\"field.name === effectiveTimelineDateField\"\n (click)=\"setTimelineDateField(field.name)\">\n <i class=\"fa-regular fa-calendar item-icon\"></i>\n <span class=\"item-name\">{{ field.displayName }}</span>\n @if (field.name === effectiveTimelineDateField) {\n <i class=\"fa-solid fa-check selected-check\"></i>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n\n <!-- Orientation Toggle -->\n <div class=\"timeline-orientation-toggle\">\n <button\n class=\"toggle-btn\"\n (click)=\"toggleTimelineOrientation()\"\n [title]=\"state.timelineOrientation === 'vertical' ? 'Switch to Horizontal' : 'Switch to Vertical'\">\n <i [class]=\"state.timelineOrientation === 'vertical' ? 'fa-solid fa-ellipsis-vertical' : 'fa-solid fa-ellipsis'\"></i>\n </button>\n </div>\n\n <!-- Sort Order Toggle -->\n <div class=\"timeline-sort-toggle\">\n <button\n class=\"toggle-btn\"\n (click)=\"toggleTimelineSortOrder()\"\n [title]=\"state.timelineSortOrder === 'desc' ? 'Showing Newest First (click for Oldest First)' : 'Showing Oldest First (click for Newest First)'\">\n <i [class]=\"state.timelineSortOrder === 'desc' ? 'fa-solid fa-arrow-down-wide-short' : 'fa-solid fa-arrow-up-wide-short'\"></i>\n </button>\n </div>\n }\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: #f59e0b;\"></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 <mj-entity-viewer\n #entityViewer\n [entity]=\"selectedEntity\"\n [viewEntity]=\"selectedViewEntity\"\n [viewMode]=\"state.viewMode\"\n [filterText]=\"debouncedFilterText\"\n [selectedRecordId]=\"state.selectedRecordId\"\n [config]=\"viewerConfig\"\n [gridState]=\"currentGridState\"\n [timelineConfig]=\"currentTimelineConfig\"\n [gridSelectionMode]=\"'checkbox'\"\n [showGridToolbar]=\"false\"\n [showAddToListButton]=\"false\"\n (viewModeChange)=\"onViewModeChanged($event)\"\n (filterTextChange)=\"onFilterTextChanged($event)\"\n (recordSelected)=\"onViewerRecordSelected($event)\"\n (recordOpened)=\"onViewerRecordOpened($event)\"\n (dataLoaded)=\"onDataLoaded($event)\"\n (filteredCountChanged)=\"onFilteredCountChanged($event)\"\n (gridStateChanged)=\"onGridStateChanged($event)\"\n (selectionChanged)=\"onSelectionChanged($event)\"\n (addToListRequested)=\"onAddToListRequested($event)\">\n </mj-entity-viewer>\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 <!-- Detail Panel Actions Bar -->\n <div class=\"detail-panel-actions\">\n <button\n class=\"detail-action-btn\"\n (click)=\"openListManagementDialog()\"\n title=\"Add to List\">\n <i class=\"fa-solid fa-list-check\"></i>\n <span>Add to List</span>\n </button>\n </div>\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 Configuration Panel -->\n <mj-view-config-panel\n [entity]=\"selectedEntity\"\n [viewEntity]=\"selectedViewEntity\"\n [isOpen]=\"state.viewConfigPanelOpen\"\n [currentGridState]=\"currentGridState\"\n [externalFilterState]=\"filterDialogState\"\n [isSaving]=\"isSavingView\"\n [DefaultSaveAsNew]=\"defaultSaveAsNew\"\n [PendingNewViewName]=\"pendingNewViewName\"\n [PendingNewViewDescription]=\"pendingNewViewDescription\"\n [PendingNewViewIsShared]=\"pendingNewViewIsShared\"\n (close)=\"onCloseViewConfigPanel()\"\n (save)=\"onSaveView($event)\"\n (saveDefaults)=\"onSaveDefaultViewSettings($event)\"\n (delete)=\"onDeleteView()\"\n (duplicate)=\"onDuplicateFromPanel()\"\n (openFilterDialogRequest)=\"onOpenFilterDialogRequest($event)\">\n </mj-view-config-panel>\n\n <!-- Filter Dialog (rendered at dashboard level for full viewport width) -->\n <mj-filter-dialog\n [isOpen]=\"isFilterDialogOpen\"\n [fields]=\"filterDialogFields\"\n [filter]=\"filterDialogState\"\n [disabled]=\"filterDialogDisabled\"\n (close)=\"onCloseFilterDialog()\"\n (apply)=\"onFilterApplied($event)\">\n </mj-filter-dialog>\n\n <!-- Export Dialog -->\n <mj-export-dialog\n [visible]=\"showExportDialog\"\n [config]=\"exportDialogConfig\"\n (closed)=\"onExportDialogClosed($event)\">\n </mj-export-dialog>\n\n <!-- List Management Dialog -->\n @if (showListManagementDialog && listManagementConfig) {\n <mj-list-management-dialog\n [config]=\"listManagementConfig\"\n [visible]=\"showListManagementDialog\"\n (complete)=\"onListManagementComplete($event)\"\n (cancel)=\"onListManagementCancel()\">\n </mj-list-management-dialog>\n }\n\n <!-- Quick Save Dialog (F-001) -->\n <mj-quick-save-dialog\n [IsOpen]=\"showQuickSaveDialog\"\n [ViewEntity]=\"selectedViewEntity\"\n [EntityName]=\"selectedEntity?.DisplayNameOrName ?? ''\"\n [Summary]=\"quickSaveSummary\"\n [IsSaving]=\"isSavingView\"\n [DefaultSaveAsNew]=\"defaultSaveAsNew\"\n (Save)=\"onQuickSave($event)\"\n (Close)=\"onQuickSaveClose()\"\n (OpenAdvanced)=\"onQuickSaveOpenAdvanced($event)\">\n </mj-quick-save-dialog>\n\n <!-- Duplicate View Dialog (F-005) -->\n <mj-duplicate-view-dialog\n [IsOpen]=\"showDuplicateDialog\"\n [SourceViewName]=\"duplicateSourceViewName\"\n [Summary]=\"duplicateSummary\"\n (Duplicate)=\"onDuplicateConfirmed($event)\"\n (Cancel)=\"onDuplicateCancel()\">\n </mj-duplicate-view-dialog>\n\n <!-- Shared View Warning Dialog (view-creation-flow Scenario 5) -->\n <mj-shared-view-warning-dialog\n [IsOpen]=\"showSharedViewWarning\"\n [ViewName]=\"selectedViewEntity?.Name ?? ''\"\n (Action)=\"onSharedViewAction($event)\"\n (Cancel)=\"onSharedViewWarningCancel()\">\n </mj-shared-view-warning-dialog>\n</div>\n"]}
|