cloud-ide-layout 1.0.132 → 1.0.134
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/fesm2022/{cloud-ide-layout-cloud-ide-layout-Zvm-Jz6-.mjs → cloud-ide-layout-cloud-ide-layout-CkYksc6R.mjs} +10 -10
- package/fesm2022/{cloud-ide-layout-cloud-ide-layout-Zvm-Jz6-.mjs.map → cloud-ide-layout-cloud-ide-layout-CkYksc6R.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-BU5dJMXu.mjs → cloud-ide-layout-dashboard-manager.component-BDqOLP6_.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-BU5dJMXu.mjs.map → cloud-ide-layout-dashboard-manager.component-BDqOLP6_.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-CdkPeWOp.mjs → cloud-ide-layout-drawer-theme.component-BEu-E1nX.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-CdkPeWOp.mjs.map → cloud-ide-layout-drawer-theme.component-BEu-E1nX.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-floating-entity-selection.component-D9j_3wjc.mjs → cloud-ide-layout-floating-entity-selection.component-C6ZUJZN9.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-floating-entity-selection.component-D9j_3wjc.mjs.map → cloud-ide-layout-floating-entity-selection.component-C6ZUJZN9.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-Cy68SU-s.mjs → cloud-ide-layout-home-wrapper.component-Cvyafnc-.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-Cy68SU-s.mjs.map → cloud-ide-layout-home-wrapper.component-Cvyafnc-.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-C0iA43A0.mjs → cloud-ide-layout-sidedrawer-notes.component-CtZeOFiG.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-C0iA43A0.mjs.map → cloud-ide-layout-sidedrawer-notes.component-CtZeOFiG.mjs.map} +1 -1
- package/fesm2022/cloud-ide-layout.mjs +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-ide-layout-cloud-ide-layout-Zvm-Jz6-.mjs","sources":["../../../projects/cloud-ide-layout/src/lib/cloud-ide-layout.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/header/header.service.ts","../../../projects/cloud-ide-layout/src/lib/services/file-manager/file-manager.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidebar/sidebar.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/footer/footer.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/console/console.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidedrawer/sidedrawer.service.ts","../../../projects/cloud-ide-layout/src/lib/services/app-state/app-state.service.ts","../../../projects/cloud-ide-layout/src/lib/services/app-state/app-state-helper.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/shared/shared.service.ts","../../../projects/cloud-ide-layout/src/lib/components/floating-entity-selection/floating-entity-selection.service.ts","../../../projects/cloud-ide-layout/src/lib/services/notification-settings/notification-settings.service.ts","../../../projects/cloud-ide-layout/src/lib/components/notification-settings/notification-settings.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/header/header-wrapper/header-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/header/header-wrapper/header-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/services/user-status/user-status.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidebar/sidebar-wrapper/sidebar-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidebar/sidebar-wrapper/sidebar-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/utils/custom-route-reuse-strategy.ts","../../../projects/cloud-ide-layout/src/lib/services/tab-state.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/request/request.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidedrawer/sidedrawer-wrapper/sidedrawer-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidedrawer/sidedrawer-wrapper/sidedrawer-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/components/shortcuts-panel/shortcuts-panel.component.ts","../../../projects/cloud-ide-layout/src/lib/components/settings-container/settings-container.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/footer/footer-wrapper/footer-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/footer/footer-wrapper/footer-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/layout/console/console-wrapper/console-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/console/console-wrapper/console-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/layout/request/request-wrapper/request-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/request/request-wrapper/request-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/layout/request/tab-content/tab-content.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/layout/layout-wrapper/layout-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/layout/layout-wrapper/layout-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/cloud-ide-layout.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/shared/component-context.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/shared/shared-wrapper/shared-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/shared/shared-wrapper/shared-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/layout/shared/rights.service.ts","../../../projects/cloud-ide-layout/src/lib/cloud-ide-layout.routes.ts","../../../projects/cloud-ide-layout/src/lib/services/theme/theme.service.ts","../../../projects/cloud-ide-layout/src/lib/services/cache-manager/cache-manager.service.ts","../../../projects/cloud-ide-layout/src/lib/components/floating-entity-rights-sharing/floating-entity-rights-sharing.service.ts","../../../projects/cloud-ide-layout/src/lib/components/floating-entity-rights-sharing/floating-entity-rights-sharing.component.ts","../../../projects/cloud-ide-layout/src/public-api.ts","../../../projects/cloud-ide-layout/src/cloud-ide-layout.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CloudIdeLayoutService {\r\n\r\n constructor() { }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytHeaderService {\r\n public headerVisible: boolean = false;\r\n\r\n constructor() { }\r\n\r\n // Hide Header\r\n hideHeader() {\r\n this.headerVisible = false;\r\n document.querySelector(`#cide-lyt-header-wrapper`)?.classList.add('cide-lyt-header-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-header-exist');\r\n }\r\n\r\n // Show Header\r\n showHeader() {\r\n this.headerVisible = true;\r\n document.querySelector(`#cide-lyt-header-wrapper`)?.classList.remove('cide-lyt-header-wrapper-hide');\r\n document.querySelector(`body`)?.classList.add('cide-lyt-header-exist');\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { cidePath, coreRoutesUrl, hostManagerRoutesUrl, MFileManager, fileManagerControllerResponse } from 'cloud-ide-lms-model';\r\nimport { Observable } from 'rxjs';\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytFileManagerService {\r\n private http = inject(HttpClient);\r\n\r\n getFileDetails(body: MFileManager): Observable<fileManagerControllerResponse> {\r\n return this.http.post(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, coreRoutesUrl?.module, coreRoutesUrl?.fileManager]), body) as Observable<fileManagerControllerResponse>;\r\n }\r\n\r\n uploadFile(file: File, additionalData?: any): Observable<any> {\r\n // Convert file to base64\r\n return new Observable(observer => {\r\n const reader = new FileReader();\r\n reader.onload = () => {\r\n const base64String = reader.result as string;\r\n const base64Data = base64String.split(',')[1]; // Remove data:image/jpeg;base64, prefix\r\n \r\n const payload = {\r\n cyfm_name: file.name,\r\n cyfm_alt_text: additionalData?.altText || file.name,\r\n cyfm_path: '', // Will be set by backend\r\n cyfm_size_in_byte: file.size,\r\n cyfm_type: file.type,\r\n cyfm_creation_dt: new Date().toISOString(),\r\n cyfm_id_user: additionalData?.userId || '',\r\n cyfm_permissions: additionalData?.permissions || [],\r\n cyfm_tags: additionalData?.tags || [],\r\n cyfm_version: 1,\r\n cyfm_file_status_sygmt: additionalData?.fileStatus || 'active',\r\n cyfm_isactive: true,\r\n fileData: base64Data, // Base64 file data\r\n ...additionalData\r\n };\r\n\r\n this.http.post(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, coreRoutesUrl?.module, 'upload']), payload)\r\n .subscribe({\r\n next: (response) => observer.next(response),\r\n error: (error) => observer.error(error)\r\n });\r\n };\r\n reader.onerror = () => observer.error('Failed to read file');\r\n reader.readAsDataURL(file);\r\n });\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { cidePath, coreRoutesUrl, hostManagerRoutesUrl, menuControllerResponse, MMenu } from 'cloud-ide-lms-model';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytSidebarService {\r\n public sidebarMenueVisible: boolean = false;\r\n private http = inject(HttpClient);\r\n\r\n // method to get sidebar menues\r\n getSidebarMenues(body: MMenu): Observable<menuControllerResponse> {\r\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, coreRoutesUrl?.module, coreRoutesUrl?.getSidebarMenues]), body);\r\n }\r\n\r\n // Hide Sidebar\r\n hideSidebar() {\r\n this.sidebarMenueVisible = false;\r\n document.querySelector(`#cide-lyt-sidebar-page`)?.classList.add('cide-lyt-sidebar-page-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-sidebar-exist');\r\n }\r\n\r\n // Show Sidebar\r\n showSidebar() {\r\n this.sidebarMenueVisible = true;\r\n document.querySelector(`#cide-lyt-sidebar-page`)?.classList.remove('cide-lyt-sidebar-page-hide');\r\n document.querySelector(`body`)?.classList.add('cide-lyt-sidebar-exist');\r\n }\r\n}\r\n\r\n//#ff5700\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytFooterService {\r\n public footerVisible: boolean = false;\r\n\r\n constructor() { }\r\n\r\n // Hide Footer\r\n hideFooter() {\r\n this.footerVisible = false;\r\n document.querySelector(`#cide-lyt-footer-console-wrapper`)?.classList.add('cide-lyt-footer-console-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-footer-exist');\r\n }\r\n\r\n // Show Footer\r\n showFooter() {\r\n this.footerVisible = true;\r\n document.querySelector(`#cide-lyt-footer-console-wrapper`)?.classList.remove('cide-lyt-footer-console-wrapper-hide');\r\n document.querySelector(`body`)?.classList.add('cide-lyt-footer-exist');\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytConsoleService {\r\n public headerVisible: boolean = false;\r\n\r\n constructor() { }\r\n\r\n // Hide Console\r\n hideConsole() {\r\n this.headerVisible = false;\r\n document.querySelector(`#cide-lyt-console-wrapper`)?.classList.add('cide-lyt-console-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-console-exist');\r\n }\r\n\r\n // Show Console\r\n showConsole() {\r\n this.headerVisible = true;\r\n document.querySelector(`#cide-lyt-console-wrapper`)?.classList.remove('cide-lyt-console-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-console-exist');\r\n }\r\n}\r\n","import { Injectable, signal } from '@angular/core';\r\nimport { ISytmLayout } from 'cloud-ide-lms-model';\r\n\r\n// It's good practice to define an interface for the data you're working with.\r\nexport interface SidedrawerItem {\r\n status: boolean;\r\n configFor: string;\r\n title: string;\r\n icon: string;\r\n description: string;\r\n isActive: boolean;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytSidedrawerService {\r\n public sidedrawerVisible: boolean = false;\r\n \r\n // Modern Angular signals for reactive state management\r\n private drawerItemsSignal = signal<SidedrawerItem[]>([]);\r\n public drawerItems = this.drawerItemsSignal.asReadonly();\r\n \r\n private notesVisibleSignal = signal<boolean>(false);\r\n public notesVisible = this.notesVisibleSignal.asReadonly();\r\n \r\n private activeComponentSignal = signal<string | null>(null);\r\n public activeComponent = this.activeComponentSignal.asReadonly();\r\n \r\n private _pageId: string | null = null;\r\n private _themeId: string | null = null;\r\n\r\n setContext(pageId: string, themeId: string) {\r\n this._pageId = pageId;\r\n this._themeId = themeId;\r\n }\r\n\r\n get pageId(): string | null {\r\n return this._pageId;\r\n }\r\n\r\n get themeId(): string | null {\r\n return this._themeId;\r\n }\r\n\r\n // Hide Sidedrawer\r\n hideSidedrawer() {\r\n this.sidedrawerVisible = false;\r\n document.querySelector(`#cide-lyt-sidedrawer-wrapper`)?.classList.add('cide-lyt-sidedrawer-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-sidedrawer-exist');\r\n }\r\n\r\n // Show Sidedrawer \r\n showSidedrawer() {\r\n this.sidedrawerVisible = true;\r\n document.querySelector(`#cide-lyt-sidedrawer-wrapper`)?.classList.remove('cide-lyt-sidedrawer-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-sidedrawer-exist');\r\n }\r\n\r\n // Method to update drawer items from layout data\r\n updateDrawerItems(layout: ISytmLayout | undefined) {\r\n if (layout?.sytm_layout_drawer && layout.sytm_layout_drawer.length > 0) {\r\n const items: SidedrawerItem[] = layout.sytm_layout_drawer\r\n .filter((item) => item.syth_status && item?.core_system_config?.syco_isactive) // Only show active items\r\n .map(item => ({\r\n status: item.syth_status,\r\n configFor: item.syth_config_syco_for,\r\n title: item.core_system_config?.syco_title as string,\r\n icon: item.core_system_config?.syco_configuration.syco_icon,\r\n description: item.core_system_config?.syco_desc || \"\",\r\n isActive: item.core_system_config?.syco_isactive || false\r\n }));\r\n this.drawerItemsSignal.set(items);\r\n } else {\r\n this.drawerItemsSignal.set([]); // Clear items if no drawer data\r\n }\r\n }\r\n\r\n // Set the active component to display in the side drawer\r\n setActiveComponent(configFor: string | null) {\r\n this.activeComponentSignal.set(configFor);\r\n }\r\n}\r\n","import { Injectable, signal, computed, effect, inject } from '@angular/core';\nimport { AuthUserMst, menuResponseData, CoreSystemEntity, hostManagerRoutesUrl, cidePath, coreRoutesUrl, commonRoutesUrl } from 'cloud-ide-lms-model';\nimport { CideEleFileManagerService } from 'cloud-ide-element';\n\nexport interface AppState {\n currentUser: AuthUserMst | null;\n activeModule: menuResponseData | null;\n activeEntity: CoreSystemEntity | null;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AppStateService {\n // Inject services\n private fileManagerService = inject(CideEleFileManagerService);\n\n // Private signal for current user\n private currentUserSignal = signal<AuthUserMst | null>(null);\n\n // Private signal for active module\n private activeModuleSignal = signal<menuResponseData | null>(null);\n\n // Private signal for active entity\n private activeEntitySignal = signal<CoreSystemEntity | null>(null);\n \n // Track if entity change handler is initialized (to prevent triggering on initial load)\n private entityChangeHandlerInitialized = false;\n \n // Callback registration for entity change handlers (to avoid circular dependencies)\n private entityChangeCallbacks: Array<(entity: CoreSystemEntity | null) => void> = [];\n\n // Public computed signal for current user, for other services to get the user value\n public readonly currentUser = computed(() => this.currentUserSignal());\n\n // Public computed signal for active module\n public readonly activeModule = computed(() => this.activeModuleSignal());\n\n // Public computed signal for active entity\n public readonly activeEntity = computed(() => this.activeEntitySignal());\n\n // Computed signals for derived state\n public readonly isAuthenticated = computed(() => !!this.currentUserSignal());\n public readonly userInfo = computed(() => {\n const user = this.currentUserSignal();\n if (!user) return null;\n \n return {\n id: user._id,\n name: user.user_fullname || `${user.user_firstname} ${user.user_lastname}`,\n email: user.user_emailid,\n role: \"\" // user.user_id_role\n };\n });\n\n // Computed signal for active module info\n public readonly activeModuleInfo = computed(() => {\n const module = this.activeModuleSignal();\n if (!module) return null;\n \n return {\n id: module._id,\n title: module.syme_title,\n icon: module.syme_icon,\n path: module.syme_path,\n type: module.syme_type\n };\n });\n\n constructor() {\n // Initialize file manager base URL on app startup\n this.fileManagerService.setBaseUrl(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, coreRoutesUrl?.module, coreRoutesUrl?.fileManager]));\n this.fileManagerService.setObjectIdEndpoint(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, commonRoutesUrl?.module, commonRoutesUrl?.generateObjectId]));\n\n // Load initial state from localStorage\n this.loadFromLocalStorage();\n \n // Save to localStorage whenever state changes\n effect(() => {\n const currentUser = this.currentUserSignal();\n const activeModule = this.activeModuleSignal();\n const activeEntity = this.activeEntitySignal();\n this.saveToLocalStorage({\n user: currentUser,\n activeModule: activeModule,\n activeEntity: activeEntity\n });\n });\n\n // Automatically update file manager user ID whenever user changes\n effect(() => {\n const currentUser = this.currentUserSignal();\n console.log('🔍 [AppStateService] User changed, updating file manager user ID:', currentUser);\n if (currentUser?._id) {\n this.fileManagerService.setUserId(currentUser._id);\n } else {\n this.fileManagerService.setUserId('');\n }\n });\n\n // GLOBAL ENTITY CHANGE HANDLER: When entity changes, close all tabs and navigate to home\n // This ensures all components are destroyed and data is refreshed for the new entity\n // No need to inject this service in any component - it works globally\n let previousEntityId: string | null = null;\n effect(() => {\n const currentEntity = this.activeEntitySignal();\n const currentEntityId = currentEntity?._id || null;\n \n // Mark handler as initialized after first run (to skip initial load from localStorage)\n if (!this.entityChangeHandlerInitialized) {\n previousEntityId = currentEntityId;\n this.entityChangeHandlerInitialized = true;\n console.log('🏢 [AppStateService] Entity change handler initialized with initial entity:', currentEntityId);\n return; // Skip on initial load\n }\n \n // Only trigger if entity actually changed (not on initial load)\n if (previousEntityId !== null && currentEntityId !== previousEntityId && currentEntityId !== null) {\n console.log('🏢 [AppStateService] Entity changed - notifying registered handlers', {\n previousEntityId,\n newEntityId: currentEntityId,\n newEntityName: currentEntity?.syen_name\n });\n \n // Notify all registered entity change callbacks (e.g., close tabs, refresh components)\n this.entityChangeCallbacks.forEach(callback => {\n try {\n callback(currentEntity);\n } catch (error) {\n console.error('Error in entity change callback:', error);\n }\n });\n } else if (previousEntityId !== null && currentEntityId === null) {\n // Entity was cleared - also notify callbacks\n console.log('🏢 [AppStateService] Entity cleared - notifying registered handlers');\n this.entityChangeCallbacks.forEach(callback => {\n try {\n callback(null);\n } catch (error) {\n console.error('Error in entity change callback:', error);\n }\n });\n }\n \n // Update previous entity ID for next comparison\n previousEntityId = currentEntityId;\n });\n\n // Listen for localStorage changes from other tabs/windows\n this.setupStorageListener();\n }\n\n /**\n * Set the current user\n */\n setUser(user: AuthUserMst | null): void {\n this.currentUserSignal.set(user);\n // Note: File manager user ID is automatically updated via effect() in constructor\n }\n\n /**\n * Update user data (partial update)\n */\n updateUser(updates: Partial<AuthUserMst>): void {\n const currentUser = this.currentUserSignal();\n if (currentUser) {\n this.currentUserSignal.set({ ...currentUser, ...updates });\n }\n }\n\n /**\n * Clear user data\n */\n clearUser(): void {\n this.currentUserSignal.set(null);\n }\n\n /**\n * Get current user value (non-reactive)\n */\n getUserValue(): AuthUserMst | null {\n return this.currentUserSignal();\n }\n\n /**\n * Set the active module\n */\n setActiveModule(module: menuResponseData | null): void {\n this.activeModuleSignal.set(module);\n }\n\n /**\n * Get active module value (non-reactive)\n */\n getActiveModuleValue(): menuResponseData | null {\n return this.activeModuleSignal();\n }\n\n /**\n * Set the active entity\n */\n setActiveEntity(entity: CoreSystemEntity | null): void {\n this.activeEntitySignal.set(entity);\n }\n\n /**\n * Get active entity value (non-reactive)\n */\n getActiveEntityValue(): CoreSystemEntity | null {\n return this.activeEntitySignal();\n }\n\n /**\n * Register a callback to be called when entity changes\n * This allows other services to react to entity changes without creating circular dependencies\n * @param callback Function to call when entity changes, receives the new entity (or null if cleared)\n */\n registerEntityChangeHandler(callback: (entity: CoreSystemEntity | null) => void): void {\n this.entityChangeCallbacks.push(callback);\n console.log('📝 [AppStateService] Registered entity change handler, total handlers:', this.entityChangeCallbacks.length);\n }\n\n /**\n * Unregister an entity change callback\n * @param callback The callback function to remove\n */\n unregisterEntityChangeHandler(callback: (entity: CoreSystemEntity | null) => void): void {\n const index = this.entityChangeCallbacks.indexOf(callback);\n if (index > -1) {\n this.entityChangeCallbacks.splice(index, 1);\n console.log('📝 [AppStateService] Unregistered entity change handler, remaining handlers:', this.entityChangeCallbacks.length);\n }\n }\n\n /**\n * Manually refresh state from localStorage\n * Call this method when you need to sync with external localStorage changes\n */\n refreshFromLocalStorage(): void {\n this.loadFromLocalStorage();\n // Note: File manager user ID is automatically updated via effect() when user signal changes\n }\n\n /**\n * Check if localStorage is available (browser environment)\n */\n private isLocalStorageAvailable(): boolean {\n try {\n return typeof window !== 'undefined' && typeof localStorage !== 'undefined';\n } catch {\n return false;\n }\n }\n\n /**\n * Save state to localStorage\n */\n private saveToLocalStorage(data: {\n user?: AuthUserMst | null;\n activeModule?: menuResponseData | null;\n activeEntity?: CoreSystemEntity | null;\n }): void {\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n\n try {\n if (data.user !== undefined) {\n if (data.user) {\n localStorage.setItem('cide_auth_user', JSON.stringify(data.user));\n } else {\n localStorage.removeItem('cide_auth_user');\n }\n }\n\n if (data.activeModule !== undefined) {\n if (data.activeModule) {\n localStorage.setItem('cide_active_module', JSON.stringify(data.activeModule));\n } else {\n localStorage.removeItem('cide_active_module');\n }\n }\n\n if (data.activeEntity !== undefined) {\n if (data.activeEntity) {\n localStorage.setItem('cide_active_entity', JSON.stringify(data.activeEntity));\n } else {\n localStorage.removeItem('cide_active_entity');\n }\n }\n } catch (error) {\n console.error('Error saving to localStorage:', error);\n }\n }\n\n /**\n * Load state from localStorage\n */\n private loadFromLocalStorage(): void {\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n\n try {\n const userData = localStorage.getItem('cide_auth_user');\n if (userData) {\n const user = JSON.parse(userData) as AuthUserMst;\n this.currentUserSignal.set(user);\n }\n\n const moduleData = localStorage.getItem('cide_active_module');\n if (moduleData) {\n const module = JSON.parse(moduleData) as menuResponseData;\n this.activeModuleSignal.set(module);\n }\n\n const entityData = localStorage.getItem('cide_active_entity');\n if (entityData) {\n const entity = JSON.parse(entityData) as CoreSystemEntity;\n this.activeEntitySignal.set(entity);\n }\n } catch (error) {\n console.error('Error loading from localStorage:', error);\n // Clear corrupted data\n if (this.isLocalStorageAvailable()) {\n localStorage.removeItem('cide_auth_user');\n localStorage.removeItem('cide_active_module');\n localStorage.removeItem('cide_active_entity');\n }\n }\n }\n\n /**\n * Setup storage event listener to handle external localStorage changes\n */\n private setupStorageListener(): void {\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n\n // Listen for storage events (triggered when localStorage is modified from other tabs/windows)\n window.addEventListener('storage', (event) => {\n if (!event.key) return;\n\n try {\n // Handle user data changes\n if (event.key === 'cide_auth_user') {\n if (event.newValue) {\n const user = JSON.parse(event.newValue) as AuthUserMst;\n this.currentUserSignal.set(user);\n } else {\n this.currentUserSignal.set(null);\n }\n }\n\n // Handle active module changes\n if (event.key === 'cide_active_module') {\n if (event.newValue) {\n const module = JSON.parse(event.newValue) as menuResponseData;\n this.activeModuleSignal.set(module);\n } else {\n this.activeModuleSignal.set(null);\n }\n }\n\n // Handle active entity changes\n if (event.key === 'cide_active_entity') {\n if (event.newValue) {\n const entity = JSON.parse(event.newValue) as CoreSystemEntity;\n this.activeEntitySignal.set(entity);\n } else {\n this.activeEntitySignal.set(null);\n }\n }\n } catch (error) {\n console.error('Error parsing localStorage update:', error);\n }\n });\n }\n} ","import { Injectable, inject } from '@angular/core';\r\nimport { AppStateService } from './app-state.service';\r\nimport { AuthUserMst, CoreSystemEntity, menuResponseData } from 'cloud-ide-lms-model';\r\nimport { CideLytSidebarService } from '../../layout/sidebar/sidebar.service';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AppStateHelperService {\r\n private appStateService = inject(AppStateService);\r\n private sidebarService = inject(CideLytSidebarService);\r\n\r\n // Computed signals for derived state\r\n public readonly currentUser = this.appStateService.currentUser;\r\n public readonly isAuthenticated = this.appStateService.isAuthenticated;\r\n public readonly userInfo = this.appStateService.userInfo;\r\n public readonly activeModule = this.appStateService.activeModule;\r\n public readonly activeModuleInfo = this.appStateService.activeModuleInfo;\r\n public readonly activeEntity = this.appStateService.activeEntity;\r\n\r\n /**\r\n * Get current user value (non-reactive)\r\n */\r\n getCurrentUser(): AuthUserMst | null {\r\n return this.appStateService.getUserValue();\r\n }\r\n\r\n /**\r\n * Set user data\r\n */\r\n setUser(user: AuthUserMst | null): void {\r\n this.appStateService.setUser(user);\r\n }\r\n\r\n /**\r\n * Update user data (partial update)\r\n */\r\n updateUser(updates: Partial<AuthUserMst>): void {\r\n this.appStateService.updateUser(updates);\r\n }\r\n\r\n /**\r\n * Clear user data\r\n */\r\n clearUser(): void {\r\n this.appStateService.clearUser();\r\n }\r\n\r\n /**\r\n * Check if user is authenticated\r\n */\r\n isUserAuthenticated(): boolean {\r\n return this.appStateService.isAuthenticated();\r\n }\r\n\r\n /**\r\n * Get user info object\r\n */\r\n getUserInfo() {\r\n return this.appStateService.userInfo();\r\n }\r\n\r\n /**\r\n * Get user ID\r\n */\r\n getUserId(): string | null {\r\n const user = this.getCurrentUser();\r\n return user?._id || null;\r\n }\r\n\r\n /**\r\n * Get user name\r\n */\r\n getUserName(): string | null {\r\n const userInfo = this.getUserInfo();\r\n return userInfo?.name || null;\r\n }\r\n\r\n /**\r\n * Get user email\r\n */\r\n getUserEmail(): string | null {\r\n const userInfo = this.getUserInfo();\r\n return userInfo?.email || null;\r\n }\r\n\r\n\r\n\r\n /**\r\n * Get user username\r\n */\r\n getUserUsername(): string | null {\r\n const user = this.getCurrentUser();\r\n return user?.user_username || null;\r\n }\r\n\r\n /**\r\n * Get user full name\r\n */\r\n getUserFullName(): string | null {\r\n const user = this.getCurrentUser();\r\n return user?.user_fullname || null;\r\n }\r\n\r\n /**\r\n * Get user first name\r\n */\r\n getUserFirstName(): string | null {\r\n const user = this.getCurrentUser();\r\n return user?.user_firstname || null;\r\n }\r\n\r\n /**\r\n * Get user last name\r\n */\r\n getUserLastName(): string | null {\r\n const user = this.getCurrentUser();\r\n return user?.user_lastname || null;\r\n }\r\n\r\n /**\r\n * Get user mobile number\r\n */\r\n getUserMobile(): number | null {\r\n const user = this.getCurrentUser();\r\n return user?.user_mobileno || null;\r\n }\r\n\r\n /**\r\n * Set the active module\r\n */\r\n setActiveModule(module: menuResponseData | null): void {\r\n this.appStateService.setActiveModule(module);\r\n }\r\n\r\n /**\r\n * Get active module value (non-reactive)\r\n */\r\n getActiveModule(): menuResponseData | null {\r\n return this.appStateService.getActiveModuleValue();\r\n }\r\n\r\n /**\r\n * Get active module info\r\n */\r\n getActiveModuleInfo() {\r\n return this.appStateService.activeModuleInfo();\r\n }\r\n\r\n /**\r\n * Get active module ID\r\n */\r\n getActiveModuleId(): string | null {\r\n const module = this.getActiveModule();\r\n return module?._id || null;\r\n }\r\n\r\n /**\r\n * Get active module title\r\n */\r\n getActiveModuleTitle(): string | null {\r\n const moduleInfo = this.getActiveModuleInfo();\r\n return moduleInfo?.title || null;\r\n }\r\n\r\n /**\r\n * Get active module icon\r\n */\r\n getActiveModuleIcon(): string | null {\r\n const moduleInfo = this.getActiveModuleInfo();\r\n return moduleInfo?.icon || null;\r\n }\r\n\r\n /**\r\n * Set a module as active by its ID\r\n * This replaces the previous isModuleActive method to use setActiveModule instead of getActiveModuleId\r\n */\r\n setActiveModuleById(moduleId: string): Observable<boolean> {\r\n return this.sidebarService.getSidebarMenues({ syme_type: \"module\", sort: 'asc', syme_title: \"\" }).pipe(\r\n map(response => {\r\n const modules = response?.data || [];\r\n const targetModule = modules.find(module => module._id === moduleId);\r\n \r\n if (targetModule) {\r\n this.setActiveModule(targetModule);\r\n return true;\r\n } else {\r\n console.warn(`Module with ID \"${moduleId}\" not found`);\r\n return false;\r\n }\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Check if a module is active (keeping the original functionality for backward compatibility)\r\n */\r\n isModuleActive(moduleId: string): boolean {\r\n const activeModuleId = this.getActiveModuleId();\r\n return activeModuleId === moduleId;\r\n }\r\n\r\n /**\r\n * Set the active entity\r\n */\r\n setActiveEntity(entity: CoreSystemEntity | null): void {\r\n this.appStateService.setActiveEntity(entity);\r\n }\r\n\r\n /**\r\n * Get active entity value (non-reactive)\r\n */\r\n getActiveEntity(): CoreSystemEntity | null {\r\n return this.appStateService.getActiveEntityValue();\r\n }\r\n\r\n /**\r\n * Get active entity ID\r\n */\r\n getActiveEntityId(): string {\r\n const entity = this.getActiveEntity();\r\n return entity?._id || '';\r\n }\r\n\r\n /**\r\n * Get active entity name\r\n */\r\n getActiveEntityName(): string | null {\r\n const entity = this.getActiveEntity();\r\n return entity?.syen_name || null;\r\n }\r\n\r\n /**\r\n * Get active entity code\r\n */\r\n getActiveEntityCode(): string | null {\r\n const entity = this.getActiveEntity();\r\n return entity?.syen_entity_code || null;\r\n }\r\n\r\n /**\r\n * Manually refresh state from localStorage\r\n */\r\n refreshFromLocalStorage(): void {\r\n this.appStateService.refreshFromLocalStorage();\r\n }\r\n} ","import { Injectable, inject, signal, computed } from '@angular/core';\nimport { cidePath, designConfigControllerResponse, designConfigRoutesUrl, hostManagerRoutesUrl, ISytmLayout, MDesignConfig } from 'cloud-ide-lms-model';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable, of, throwError, Subscription } from 'rxjs';\nimport { tap, catchError, shareReplay, filter, take, map } from 'rxjs/operators';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { Title } from '@angular/platform-browser';\nimport { CideElementsService } from 'cloud-ide-element';\nimport { CideLytSidebarService } from '../sidebar/sidebar.service';\nimport { CideLytSharedWrapperSetupParam } from './shared-wrapper/shared-wrapper.component';\nimport { CideLytHeaderService } from '../header/header.service';\nimport { CideLytFooterService } from '../footer/footer.service';\nimport { CideLytConsoleService } from '../console/console.service';\nimport { CideLytSidedrawerService } from '../sidedrawer/sidedrawer.service';\nimport { AppStateHelperService } from '../../services/app-state/app-state-helper.service';\n\n// Enhanced cache interface with TTL support\ninterface CachedPageData {\n request: Partial<CideLytSharedWrapperSetupParam>;\n response: designConfigControllerResponse;\n timestamp: number;\n ttl: number; // Time to live in milliseconds\n}\n\n// Loading state tracking\ntype LoadingState = { [key: string]: Observable<designConfigControllerResponse> };\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CideLytSharedService {\n // Enhanced reactive cache with signals\n private pageDataCacheSignal = signal<{ [key: string]: CachedPageData }>({});\n private loadingStateSignal = signal<{ [key: string]: boolean }>({});\n \n // Public readonly access to cache\n public readonly pageDataCache = this.pageDataCacheSignal.asReadonly();\n public readonly loadingStates = this.loadingStateSignal.asReadonly();\n \n // Computed signal for cache status\n public readonly cacheInfo = computed(() => {\n const cache = this.pageDataCacheSignal();\n return {\n totalCached: Object.keys(cache).length,\n validCached: Object.values(cache).filter(item => this.isCacheValid(item)).length,\n expiredCached: Object.values(cache).filter(item => !this.isCacheValid(item)).length\n };\n });\n \n // In-flight requests to prevent duplicate API calls\n private inflightRequests: LoadingState = {};\n \n // Default cache TTL (5 minutes)\n private readonly DEFAULT_CACHE_TTL = 5 * 60 * 1000;\n \n // Modern Angular v20 dependency injection pattern\n private elementService = inject(CideElementsService);\n private http = inject(HttpClient);\n public titleService = inject(Title);\n private sidebarService = inject(CideLytSidebarService);\n private headerService = inject(CideLytHeaderService);\n private footerService = inject(CideLytFooterService);\n private consoleService = inject(CideLytConsoleService);\n private sidedrawerService = inject(CideLytSidedrawerService);\n private router = inject(Router);\n \n // Import AppStateHelperService for sidebar sync\n private appState = inject(AppStateHelperService);\n \n // Route change subscription for cleanup\n private routeSubscription?: Subscription;\n private pageDataSubscription?: Subscription;\n \n // Tab management callback - to avoid circular dependency\n private tabManagementCallback?: (\n currentRoutePath: string,\n queryParams: Record<string, unknown>,\n layout: ISytmLayout,\n pageData: designConfigControllerResponse,\n pageCode: string\n ) => void;\n \n // Request visibility callback\n private requestVisibilityCallback?: (show: boolean) => void;\n\n constructor() {\n // Clean up expired cache entries every minute\n // setInterval(() => this.cleanExpiredCache(), 60000);\n \n // Listen to route changes - moved from request service\n this.routeSubscription = this.router.events.pipe(\n filter(event => event instanceof NavigationEnd)\n ).subscribe(() => {\n // Cancel any ongoing page data fetching\n this.pageDataSubscription?.unsubscribe();\n this.handleRouteChange();\n });\n }\n\n /**\n * Register tab management callback from request service\n * This allows shared service to call request service without circular dependency\n */\n registerTabManagement(callback: (\n currentRoutePath: string,\n queryParams: Record<string, unknown>,\n layout: ISytmLayout,\n pageData: designConfigControllerResponse,\n pageCode: string\n ) => void) {\n this.tabManagementCallback = callback;\n console.log('✅ Tab management callback registered');\n }\n\n /**\n * Fetch breadcrumb navigation items for a page code from backend\n * Expected response shape: data.path: Array<{ id|_id|code, title|name|sypg_title, icon?, url|path|sypg_path }>\n */\n getBreadcrumbNavigation(pageCode: string): Observable<Array<{ id: string; label: string; icon?: string; path?: string }>> {\n return this.http.post<any>(\n cidePath.join([hostManagerRoutesUrl.cideSuiteHost, designConfigRoutesUrl?.module, 'getBreadcrumbNavigation']),\n { sypg_page_code: pageCode }\n ).pipe(\n map(res => (res?.data?.path || []).map((p: any) => ({\n id: p._id || p.id || p.code,\n label: p.sypg_title || p.title || p.name,\n icon: p.icon || undefined,\n path: p.sypg_path || p.url || undefined\n })))\n );\n }\n\n /**\n * Register request visibility callback from request service\n * This allows shared service to control request wrapper visibility\n */\n registerRequestVisibility(callback: (show: boolean) => void) {\n this.requestVisibilityCallback = callback;\n console.log('✅ Request visibility callback registered');\n }\n\n /**\n * Enhanced loadPageData with caching and deduplication\n * @param body - Request payload\n * @param forceRefresh - Force API call even if cached data exists\n * @param customTTL - Custom cache TTL in milliseconds\n */\n loadPageData(\n body: MDesignConfig, \n forceRefresh: boolean = false, \n customTTL: number = this.DEFAULT_CACHE_TTL\n ): Observable<designConfigControllerResponse> {\n const pageCode = body.sypg_page_code?.toString() || '';\n const sytm_entity_id_syen = body.sytm_entity_id_syen?.toString() || this.appState.getActiveEntityId();\n console.log(sytm_entity_id_syen, \"sytm_entity_id_syen\");\n if(!body.sytm_entity_id_syen){\n body.sytm_entity_id_syen = sytm_entity_id_syen;\n }\n \n if (!pageCode) {\n return throwError(() => new Error('Page code is required'));\n }\n\n // Check if we have valid cached data and not forcing refresh\n if (!forceRefresh && this.hasValidCache(pageCode)) {\n console.log(`🔄 CACHE HIT: Using cached data for page code: ${pageCode}`);\n const cachedData = this.pageDataCacheSignal()[pageCode];\n return of(cachedData.response);\n }\n\n // Check if there's already an in-flight request for this page code\n if (this.inflightRequests[pageCode]) {\n console.log(`🔄 INFLIGHT REQUEST: Returning existing request for page code: ${pageCode}`);\n return this.inflightRequests[pageCode];\n }\n\n // Set loading state\n this.setLoadingState(pageCode, true);\n\n console.log(`🌐 API CALL: Loading fresh data for page code: ${pageCode}`);\n \n // Create new API request\n const request$ = this.http.post(\n cidePath.join([hostManagerRoutesUrl.cideSuiteHost, designConfigRoutesUrl?.module, designConfigRoutesUrl?.getPageData]), \n body\n ) as Observable<designConfigControllerResponse>;\n\n // Cache the observable to prevent duplicate requests\n this.inflightRequests[pageCode] = request$.pipe(\n tap(response => {\n console.log(`✅ API SUCCESS: Caching data for page code: ${pageCode}`);\n this.cachePageData(pageCode, body, response, customTTL);\n this.setLoadingState(pageCode, false);\n }),\n catchError(error => {\n console.error(`❌ API ERROR: Failed to load data for page code: ${pageCode}`, error);\n this.setLoadingState(pageCode, false);\n return throwError(() => error);\n }),\n shareReplay(1) // Share the result with multiple subscribers\n );\n\n // Clean up inflight request after completion\n this.inflightRequests[pageCode].subscribe({\n complete: () => {\n delete this.inflightRequests[pageCode];\n },\n error: () => {\n delete this.inflightRequests[pageCode];\n }\n });\n\n return this.inflightRequests[pageCode];\n }\n\n /**\n * Consolidated method to load and process page data\n * This replaces the separate calls in request service and shared wrapper\n */\n loadAndProcessPageData(\n body: MDesignConfig, \n options: {\n forceRefresh?: boolean;\n customTTL?: number;\n setTitle?: boolean;\n setSidebarContext?: boolean;\n updateLayout?: boolean;\n } = {}\n ): Observable<designConfigControllerResponse> {\n const {\n forceRefresh = false,\n customTTL = this.DEFAULT_CACHE_TTL,\n setTitle = true,\n setSidebarContext = true,\n updateLayout = true\n } = options;\n\n return this.loadPageData(body, forceRefresh, customTTL).pipe(\n tap(response => {\n if (response) {\n console.log('🔍 SHARED SERVICE: loadAndProcessPageData', response);\n // Process the response\n if (updateLayout) {\n this.setPageData(response, body);\n }\n \n // Set page title\n if (setTitle && response.data?.page?.sypg_title) {\n this.titleService.setTitle(response.data.page.sypg_title);\n }\n \n // Set sidebar context\n if (setSidebarContext) {\n // This will be handled by the component that needs the context\n // as it's specific to the sidedrawer service\n }\n }\n })\n );\n }\n\n /**\n * Get cached page data without making API call\n */\n getCachedPageData(pageCode: string): designConfigControllerResponse | null {\n const cached = this.pageDataCacheSignal()[pageCode];\n return this.isCacheValid(cached) ? cached.response : null;\n }\n\n /**\n * Get page rights only (without loading full page config)\n * This is a lightweight endpoint that only fetches rights\n * @param pageCode - Page code to get rights for\n * @returns Observable with rights data\n */\n getPageRights(pageCode: string): Observable<{\n success: boolean;\n code: number;\n data?: {\n rights: { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } };\n pageCode: string;\n };\n message: string;\n }> {\n const url = cidePath.join([\n hostManagerRoutesUrl.cideSuiteHost,\n designConfigRoutesUrl?.module,\n (designConfigRoutesUrl as any)?.getPageRights || 'page-rights',\n pageCode\n ]);\n \n return this.http.get(url) as Observable<{\n success: boolean;\n code: number;\n data?: {\n rights: { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } };\n pageCode: string;\n };\n message: string;\n }>;\n }\n\n /**\n * Check if loading for a specific page code\n */\n isLoading(pageCode: string): boolean {\n return this.loadingStates()[pageCode] || false;\n }\n\n /**\n * Invalidate cache for specific page code\n */\n invalidateCache(pageCode: string): void {\n const cache = { ...this.pageDataCacheSignal() };\n delete cache[pageCode];\n this.pageDataCacheSignal.set(cache);\n console.log(`🗑️ CACHE INVALIDATED: Removed cache for page code: ${pageCode}`);\n }\n\n /**\n * Clear all cached data\n */\n clearAllCache(): void {\n this.pageDataCacheSignal.set({});\n this.loadingStateSignal.set({});\n console.log('🗑️ CACHE CLEARED: All cached data removed');\n }\n\n /**\n * Preload page data for better performance\n */\n preloadPageData(pageCodes: string[]): void {\n pageCodes.forEach(pageCode => {\n if (!this.hasValidCache(pageCode) && !this.isLoading(pageCode)) {\n this.loadPageData({ sypg_page_code: pageCode }).subscribe({\n next: () => console.log(`🚀 PRELOADED: Page data for ${pageCode}`),\n error: (err) => console.warn(`⚠️ PRELOAD FAILED: Could not preload ${pageCode}`, err)\n });\n }\n });\n }\n\n // Private helper methods\n private hasValidCache(pageCode: string): boolean {\n const cached = this.pageDataCacheSignal()[pageCode];\n return cached && this.isCacheValid(cached);\n }\n\n private isCacheValid(cached: CachedPageData | undefined): boolean {\n if (!cached) return false;\n return Date.now() - cached.timestamp < cached.ttl;\n }\n\n private cachePageData(\n pageCode: string, \n request: MDesignConfig, \n response: designConfigControllerResponse, \n ttl: number\n ): void {\n const cache = { ...this.pageDataCacheSignal() };\n cache[pageCode] = {\n request,\n response,\n timestamp: Date.now(),\n ttl\n };\n this.pageDataCacheSignal.set(cache);\n }\n\n private setLoadingState(pageCode: string, loading: boolean): void {\n const loadingStates = { ...this.loadingStateSignal() };\n if (loading) {\n loadingStates[pageCode] = true;\n } else {\n delete loadingStates[pageCode];\n }\n this.loadingStateSignal.set(loadingStates);\n }\n\n private cleanExpiredCache(): void {\n const cache = { ...this.pageDataCacheSignal() };\n let cleaned = false;\n \n Object.keys(cache).forEach(pageCode => {\n if (!this.isCacheValid(cache[pageCode])) {\n delete cache[pageCode];\n cleaned = true;\n }\n });\n \n if (cleaned) {\n this.pageDataCacheSignal.set(cache);\n console.log('🧹 CACHE CLEANUP: Removed expired cache entries');\n }\n }\n\n setPageData(page_data_response: designConfigControllerResponse, page_data_payload: Partial<CideLytSharedWrapperSetupParam>): void {\n // to set the controls data to the element service\n console.log('🔍 SHARED SERVICE: setPageData', page_data_response, page_data_payload);\n if (page_data_response?.data?.controls) {\n // Set controls here\n this.elementService.cide_element_data = { ...this.elementService.cide_element_data, ...page_data_response?.data?.controls };\n this.elementService.is_cide_element_data_updated?.next(true);\n }\n\n // while doing this we need to think about not to touch if this page is not pening in the popup or drower insted of main window\n // Set the layout data\n console.log('🔍 Layout data:', page_data_response);\n if (page_data_response?.data?.theme?.sytm_layout) {\n console.log('🔍 SIDEBAR DEBUG - Layout data:', page_data_response?.data?.theme?.sytm_layout, page_data_payload);\n // check is sidebar is hiden or not (default is visible)\n if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_sidebar) {\n const sidebarStatus = page_data_response?.data?.theme?.sytm_layout?.sytm_layout_sidebar?.status;\n console.log('🔍 SIDEBAR DEBUG - Sidebar status found:', sidebarStatus);\n if (!sidebarStatus) {\n console.log('🚫 SIDEBAR DEBUG - Hiding sidebar because status is false');\n this.sidebarService.hideSidebar();\n } else {\n console.log('✅ SIDEBAR DEBUG - Showing sidebar because status is true');\n this.sidebarService.showSidebar();\n }\n } else {\n console.log('⚠️ SIDEBAR DEBUG - No sidebar config found, hiding sidebar');\n this.sidebarService.hideSidebar();\n }\n\n // check header visible or not\n console.log('🔍 HEADER DEBUG - Header config found:', page_data_response?.data?.theme?.sytm_layout?.sytm_layout_header);\n if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_header) {\n if (!page_data_response?.data?.theme?.sytm_layout?.sytm_layout_header?.status) {\n this.headerService.hideHeader();\n } else {\n this.headerService.showHeader();\n }\n } else {\n this.headerService.hideHeader();\n }\n\n // check footer visible or not \n if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_footer) {\n if (!page_data_response?.data?.theme?.sytm_layout?.sytm_layout_footer?.status) {\n this.footerService.hideFooter();\n } else {\n this.footerService.showFooter();\n }\n } else {\n this.footerService.hideFooter();\n }\n\n // check console visible or not\n if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_console) {\n if (!page_data_response?.data?.theme?.sytm_layout?.sytm_layout_console?.status) {\n this.consoleService.hideConsole();\n } else {\n this.consoleService.showConsole();\n }\n } else {\n this.consoleService.hideConsole();\n }\n\n // check for the request status and log it for debugging\n console.log('🔍 REQUEST DEBUG - Request config found:', page_data_response?.data?.theme?.sytm_layout?.sytm_layout_request);\n if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_request) {\n const requestStatus = page_data_response?.data?.theme?.sytm_layout?.sytm_layout_request?.status;\n console.log('🔍 REQUEST DEBUG - Request status:', requestStatus, 'Type:', typeof requestStatus);\n \n // The request status controls whether this page should support tabs\n // This is used by the request service to determine if tabs should be created\n if (requestStatus === true) {\n console.log('✅ REQUEST DEBUG - Request is enabled for tabbing');\n // Show request wrapper when request is enabled\n if (this.requestVisibilityCallback) {\n this.requestVisibilityCallback(true);\n console.log('📋 REQUEST VISIBILITY - Showing request wrapper');\n }\n } else if (requestStatus === false) {\n console.log('🚫 REQUEST DEBUG - Request is disabled for tabbing');\n // Hide request wrapper when request is disabled\n if (this.requestVisibilityCallback) {\n this.requestVisibilityCallback(false);\n console.log('📋 REQUEST VISIBILITY - Hiding request wrapper');\n }\n } else {\n console.log('⚠️ REQUEST DEBUG - Unexpected request status value:', requestStatus);\n // Default to hiding request wrapper for unexpected values\n if (this.requestVisibilityCallback) {\n this.requestVisibilityCallback(false);\n console.log('📋 REQUEST VISIBILITY - Hiding request wrapper (unexpected value)');\n }\n }\n } else {\n console.log('⚠️ REQUEST DEBUG - No request config found, tabs will not be created');\n // Hide request wrapper when no request config found\n if (this.requestVisibilityCallback) {\n this.requestVisibilityCallback(false);\n console.log('📋 REQUEST VISIBILITY - Hiding request wrapper (no config)');\n }\n }\n }\n\n }\n\n /**\n * Handle route changes - moved from request service for better architecture\n * This method loads page data and calls request service to manage tabs\n */\n private handleRouteChange() {\n const parsedUrl = this.router.parseUrl(this.router.url);\n const currentRoutePath = '/' + (parsedUrl.root.children['primary']?.segments.map(s => s.path).join('/') || '');\n const queryParams = parsedUrl.queryParams;\n\n console.log('🔍 Route change:', {\n currentRoutePath,\n queryParams\n });\n\n // Get page code from route data\n let route = this.router.routerState.snapshot.root;\n while (route.firstChild) {\n route = route.firstChild;\n }\n\n const pageCode = route.data && route.data['sypg_page_code'];\n console.log('📄 Processing route with page code:', pageCode);\n\n if (pageCode) {\n const entityId = this.appState.getActiveEntityId();\n console.log(`📡 Loading and processing page data for pageCode: ${pageCode}`);\n this.pageDataSubscription = this.loadAndProcessPageData(\n { sypg_page_code: pageCode, sytm_entity_id_syen: entityId || undefined },\n {\n forceRefresh: false,\n setTitle: true,\n setSidebarContext: true,\n updateLayout: true\n }\n ).pipe(take(1))\n .subscribe({\n next: (page_data_response) => {\n const layout = page_data_response?.data?.theme?.sytm_layout;\n \n // Update sidedrawer with processed layout\n this.sidedrawerService.updateDrawerItems(layout);\n \n // Sync sidebar active menu with loaded page\n this.syncSidebarActiveMenu(page_data_response, pageCode);\n \n if (layout?.sytm_layout_request?.status === true) {\n console.log('✅ Layout processed - calling request service to manage tabs');\n // Call request service to handle tab creation\n this.handleTabRequest(currentRoutePath, queryParams, layout, page_data_response, pageCode);\n } else {\n console.log('❌ Layout request disabled - tab not created');\n }\n },\n error: (err) => {\n console.error(`❌ Error loading page data for sypg_page_code '${pageCode}':`, err);\n this.sidedrawerService.updateDrawerItems(undefined);\n }\n });\n } else {\n console.log('⚠️ No page code found in route data - clearing drawer');\n this.sidedrawerService.updateDrawerItems(undefined);\n }\n }\n\n /**\n * Handle tab request by calling request service\n */\n private handleTabRequest(\n currentRoutePath: string, \n queryParams: Record<string, unknown>, \n layout: ISytmLayout, \n pageData: designConfigControllerResponse, \n pageCode: string\n ) {\n if (this.tabManagementCallback) {\n console.log('🔄 Calling registered tab management callback');\n this.tabManagementCallback(currentRoutePath, queryParams, layout, pageData, pageCode);\n } else {\n console.log('⚠️ No tab management callback registered');\n }\n }\n\n /**\n * Sync the active menu in the sidebar based on the loaded page data.\n * This ensures the correct module is highlighted in the sidebar.\n */\n private syncSidebarActiveMenu(page_data_response: designConfigControllerResponse, pageCode: string): void {\n console.log('🔍 SIDEBAR SYNC: Starting sidebar active menu sync for:', pageCode);\n \n // Try to extract module information from route\n const currentRoute = this.router.url;\n const routeParts = currentRoute.split('/').filter(part => part);\n let routeModuleName = '';\n \n // Look for control-panel or module identifier in route\n if (routeParts.includes('control-panel') && routeParts.length > 1) {\n const moduleIndex = routeParts.indexOf('control-panel') + 1;\n routeModuleName = routeParts[moduleIndex] || '';\n } else if (routeParts.length > 0) {\n routeModuleName = routeParts[0];\n }\n \n console.log('🔍 SIDEBAR SYNC: Route module name:', routeModuleName);\n console.log('🔍 SIDEBAR SYNC: Current route:', currentRoute);\n console.log('🔍 SIDEBAR SYNC: Page code:', pageCode);\n \n // Load sidebar modules and find the matching one\n this.sidebarService.getSidebarMenues({ syme_type: \"module\", sort: 'asc', syme_title: \"\" })\n .subscribe({\n next: (modulesResponse) => {\n const modules = modulesResponse?.data || [];\n console.log('🔍 SIDEBAR SYNC: Available modules:', modules.map(m => ({ id: m._id, title: m.syme_title, path: m.syme_path })));\n \n let matchedModule = null;\n \n // Try to match by route path\n if (routeModuleName) {\n matchedModule = modules.find(m => \n m.syme_path?.includes(routeModuleName) || \n m.syme_title?.toLowerCase().includes(routeModuleName.toLowerCase()) ||\n routeModuleName.includes(m.syme_path || '') ||\n m.syme_path === routeModuleName\n );\n if (matchedModule) {\n console.log('✅ SIDEBAR SYNC: Matched module by route:', matchedModule.syme_title);\n }\n }\n \n // If not found, try to match by page code pattern\n if (!matchedModule && pageCode) {\n matchedModule = modules.find(m => \n pageCode.includes(m.syme_path || '') ||\n (m.syme_path && pageCode.toLowerCase().includes(m.syme_path.toLowerCase())) ||\n m.syme_path === pageCode\n );\n if (matchedModule) {\n console.log('✅ SIDEBAR SYNC: Matched module by page code:', matchedModule.syme_title);\n }\n }\n \n // If still not found, try partial matching for common patterns\n if (!matchedModule) {\n // Try to match common patterns like 'admin', 'dashboard', etc.\n const searchTerms = [routeModuleName, pageCode].filter(Boolean);\n for (const term of searchTerms) {\n matchedModule = modules.find(m => \n m.syme_title?.toLowerCase().includes(term.toLowerCase()) ||\n term.toLowerCase().includes(m.syme_title?.toLowerCase() || '') ||\n m.syme_path?.toLowerCase().includes(term.toLowerCase()) ||\n term.toLowerCase().includes(m.syme_path?.toLowerCase() || '')\n );\n if (matchedModule) {\n console.log('✅ SIDEBAR SYNC: Matched module by pattern:', matchedModule.syme_title, 'for term:', term);\n break;\n }\n }\n }\n \n // Check if we should set the matched module as active\n if (matchedModule) {\n const currentActiveModule = this.appState.getActiveModule();\n \n // Always update the active module if the route suggests a different module\n // The route is the source of truth when navigating\n const isDifferentModule = !currentActiveModule || \n currentActiveModule._id !== matchedModule._id ||\n currentActiveModule.syme_path !== matchedModule.syme_path;\n \n if (isDifferentModule) {\n console.log('🎯 SIDEBAR SYNC: Updating active module to match route:', matchedModule.syme_title, matchedModule._id);\n console.log('🔍 SIDEBAR SYNC: Previous active module:', currentActiveModule?.syme_title || 'none');\n this.appState.setActiveModule(matchedModule);\n } else {\n console.log('✅ SIDEBAR SYNC: Active module already matches route:', currentActiveModule?.syme_title);\n }\n } else {\n console.log('⚠️ SIDEBAR SYNC: No matching module found for page:', pageCode);\n console.log('🔍 SIDEBAR SYNC: Available modules:', modules.map(m => m.syme_title).join(', '));\n console.log('🔍 SIDEBAR SYNC: Searched for route:', routeModuleName, 'and page code:', pageCode);\n }\n },\n error: (err) => {\n console.error('❌ SIDEBAR SYNC: Error loading modules for sync:', err);\n }\n });\n }\n\n}\n","import { Injectable, inject } from '@angular/core';\r\nimport { CideEleFloatingContainerService, FloatingContainerConfig } from 'cloud-ide-element';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytFloatingEntitySelectionService {\r\n private containerService = inject(CideEleFloatingContainerService)\r\n\r\n constructor() {\r\n console.log('CideLytFloatingEntitySelectionService initialized');\r\n // Auto-register entity selection component on service initialization\r\n this.initializeEntitySelection();\r\n }\r\n\r\n private async initializeEntitySelection(): Promise<void> {\r\n // Check if already registered to avoid duplicate registration\r\n if (this.containerService.isComponentRegistered('entity-selection-header')) {\r\n console.log('✅ Entity selection component already registered');\r\n return;\r\n }\r\n\r\n try {\r\n // Use relative import to avoid circular dependency\r\n const module = await import('./floating-entity-selection.component');\r\n if (module.CideLytFloatingEntitySelectionComponent) {\r\n this.containerService.registerComponent('entity-selection-header', module.CideLytFloatingEntitySelectionComponent);\r\n console.log('✅ Entity selection component registered successfully');\r\n }\r\n } catch (error) {\r\n console.error('❌ Failed to register entity selection component:', error);\r\n }\r\n }\r\n\r\n /**\r\n * Show entity selection in floating container\r\n */\r\n async show(): Promise<string> {\r\n console.log('🏢 Showing entity selection...');\r\n console.log('📋 Current registered components:', this.containerService.getRegisteredComponentIds());\r\n\r\n // Ensure component is registered before showing\r\n if (!this.containerService.isComponentRegistered('entity-selection-header')) {\r\n console.log('📝 Entity selection component not registered, registering now...');\r\n await this.initializeEntitySelection();\r\n console.log('📋 Components after registration:', this.containerService.getRegisteredComponentIds());\r\n } else {\r\n console.log('✅ Entity selection component already registered');\r\n }\r\n \r\n try {\r\n const config: FloatingContainerConfig = {\r\n id: 'entity-selection-header',\r\n title: 'Switch Entity',\r\n icon: 'business',\r\n width: '800px',\r\n height: '600px',\r\n minWidth: '600px',\r\n minHeight: '500px',\r\n resizable: true,\r\n draggable: true,\r\n closable: true,\r\n minimizable: true,\r\n maximizable: true,\r\n componentId: 'entity-selection-header'\r\n };\r\n\r\n const containerId = this.containerService.show(config);\r\n\r\n console.log('✅ Entity selection container opened with ID:', containerId);\r\n return containerId;\r\n } catch (error) {\r\n console.error('❌ Error opening entity selection container:', error);\r\n throw error;\r\n }\r\n }\r\n\r\n /**\r\n * Hide entity selection container\r\n */\r\n hide(containerId?: string): void {\r\n if (containerId) {\r\n this.containerService.hide(containerId);\r\n } else {\r\n // Hide the main entity selection container\r\n this.containerService.hide('entity-selection-header');\r\n }\r\n }\r\n\r\n /**\r\n * Check if entity selection is currently visible\r\n */\r\n isVisible(): boolean {\r\n const visibleContainers = this.containerService.visibleContainers();\r\n return visibleContainers.some(container => container.id === 'entity-selection-header');\r\n }\r\n}\r\n","import { Injectable, signal, computed, effect } from '@angular/core';\n\n/**\n * Notification Settings Interface\n */\nexport interface NotificationSettings {\n // Sound settings\n soundEnabled: boolean;\n soundVolume: number; // 0-100\n soundType: 'default' | 'gentle' | 'alert' | 'chime' | 'none';\n \n // Snooze settings\n snoozeEnabled: boolean;\n snoozeDuration: number; // minutes\n \n // Notification hours (quiet hours)\n quietHoursEnabled: boolean;\n quietHoursStart: string; // HH:mm format (e.g., \"22:00\")\n quietHoursEnd: string; // HH:mm format (e.g., \"08:00\")\n \n // Other settings\n desktopNotifications: boolean;\n showPreview: boolean;\n groupNotifications: boolean;\n}\n\n/**\n * Default Notification Settings\n */\nconst DEFAULT_SETTINGS: NotificationSettings = {\n soundEnabled: true,\n soundVolume: 70,\n soundType: 'default',\n snoozeEnabled: false,\n snoozeDuration: 30,\n quietHoursEnabled: false,\n quietHoursStart: '22:00',\n quietHoursEnd: '08:00',\n desktopNotifications: true,\n showPreview: true,\n groupNotifications: true\n};\n\n/**\n * Notification Settings Service\n * Manages user notification preferences with localStorage persistence\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class NotificationSettingsService {\n private readonly settingsSignal = signal<NotificationSettings>({ ...DEFAULT_SETTINGS });\n \n // Public computed signal\n readonly settings = computed(() => this.settingsSignal());\n \n // Individual computed signals for convenience\n readonly soundEnabled = computed(() => this.settings().soundEnabled);\n readonly soundVolume = computed(() => this.settings().soundVolume);\n readonly soundType = computed(() => this.settings().soundType);\n readonly quietHoursEnabled = computed(() => this.settings().quietHoursEnabled);\n readonly isQuietHours = computed(() => this.isCurrentlyQuietHours());\n\n constructor() {\n // Load from localStorage on initialization\n this.loadFromLocalStorage();\n \n // Save to localStorage whenever settings change\n effect(() => {\n const settings = this.settingsSignal();\n this.saveToLocalStorage(settings);\n });\n }\n\n /**\n * Update notification settings\n */\n updateSettings(updates: Partial<NotificationSettings>): void {\n this.settingsSignal.update(current => ({ ...current, ...updates }));\n }\n\n /**\n * Reset to default settings\n */\n reset(): void {\n this.settingsSignal.set({ ...DEFAULT_SETTINGS });\n }\n\n /**\n * Check if currently in quiet hours\n */\n isCurrentlyQuietHours(): boolean {\n const settings = this.settings();\n if (!settings.quietHoursEnabled) {\n return false;\n }\n\n const now = new Date();\n const currentTime = now.getHours() * 60 + now.getMinutes(); // minutes since midnight\n \n const startTime = this.timeToMinutes(settings.quietHoursStart);\n const endTime = this.timeToMinutes(settings.quietHoursEnd);\n \n // Handle quiet hours that span midnight\n if (startTime > endTime) {\n // Quiet hours span midnight (e.g., 22:00 to 08:00)\n return currentTime >= startTime || currentTime < endTime;\n } else {\n // Quiet hours within same day\n return currentTime >= startTime && currentTime < endTime;\n }\n }\n\n /**\n * Convert time string (HH:mm) to minutes since midnight\n */\n private timeToMinutes(time: string): number {\n const [hours, minutes] = time.split(':').map(Number);\n return hours * 60 + minutes;\n }\n\n /**\n * Play notification sound based on settings\n */\n playNotificationSound(): void {\n const settings = this.settings();\n \n if (!settings.soundEnabled || settings.soundType === 'none') {\n return;\n }\n\n if (this.isCurrentlyQuietHours()) {\n return; // Don't play sound during quiet hours\n }\n\n try {\n // Create audio context for sound generation\n // Handle browser autoplay policy - resume if suspended\n const AudioContextClass = window.AudioContext || (window as any).webkitAudioContext;\n let audioContext: AudioContext;\n \n // Try to get existing audio context or create new one\n if (!(this as any)._audioContext) {\n audioContext = new AudioContextClass();\n (this as any)._audioContext = audioContext;\n } else {\n audioContext = (this as any)._audioContext;\n }\n \n // Resume audio context if suspended (required for browser autoplay policy)\n if (audioContext.state === 'suspended') {\n audioContext.resume().then(() => {\n this.playSoundWithContext(audioContext, settings);\n }).catch((error) => {\n console.warn('Failed to resume audio context:', error);\n // Try creating a new context as fallback\n try {\n const newContext = new AudioContextClass();\n this.playSoundWithContext(newContext, settings);\n } catch (fallbackError) {\n console.warn('Failed to create fallback audio context:', fallbackError);\n }\n });\n } else {\n // Context is already running, play sound immediately\n this.playSoundWithContext(audioContext, settings);\n }\n } catch (error) {\n console.warn('Failed to play notification sound:', error);\n }\n }\n\n /**\n * Play sound with the given audio context\n */\n private playSoundWithContext(audioContext: AudioContext, settings: NotificationSettings): void {\n const volume = settings.soundVolume / 100;\n \n // Configure based on sound type\n switch (settings.soundType) {\n case 'gentle':\n this.playTone(audioContext, 800, 600, 0.15, volume, 'sine');\n break;\n case 'alert':\n this.playTone(audioContext, 1000, 800, 0.2, volume, 'square');\n break;\n case 'chime':\n // Play a chord (C-E-G)\n this.playTone(audioContext, 523.25, 523.25, 0.3, volume * 0.7, 'sine', 0); // C5\n this.playTone(audioContext, 659.25, 659.25, 0.3, volume * 0.7, 'sine', 0.05); // E5\n this.playTone(audioContext, 783.99, 783.99, 0.3, volume * 0.7, 'sine', 0.1); // G5\n break;\n case 'default':\n default:\n this.playTone(audioContext, 800, 600, 0.15, volume, 'sine');\n break;\n }\n }\n\n /**\n * Play a single tone\n */\n private playTone(\n audioContext: AudioContext,\n startFreq: number,\n endFreq: number,\n duration: number,\n volume: number,\n type: OscillatorType = 'sine',\n delay: number = 0\n ): void {\n const oscillator = audioContext.createOscillator();\n const gainNode = audioContext.createGain();\n \n oscillator.type = type;\n oscillator.connect(gainNode);\n gainNode.connect(audioContext.destination);\n \n const startTime = audioContext.currentTime + delay;\n \n // Set frequency\n if (startFreq === endFreq) {\n oscillator.frequency.setValueAtTime(startFreq, startTime);\n } else {\n oscillator.frequency.setValueAtTime(startFreq, startTime);\n oscillator.frequency.exponentialRampToValueAtTime(endFreq, startTime + duration);\n }\n \n // Set volume envelope (fade in/out)\n gainNode.gain.setValueAtTime(0, startTime);\n gainNode.gain.linearRampToValueAtTime(volume, startTime + 0.01);\n gainNode.gain.linearRampToValueAtTime(volume, startTime + duration - 0.05);\n gainNode.gain.linearRampToValueAtTime(0, startTime + duration);\n \n // Play sound\n oscillator.start(startTime);\n oscillator.stop(startTime + duration);\n }\n\n /**\n * Load settings from localStorage\n */\n private loadFromLocalStorage(): void {\n try {\n const stored = localStorage.getItem('cide_notification_settings');\n if (stored) {\n const settings = JSON.parse(stored) as NotificationSettings;\n this.settingsSignal.set({ ...DEFAULT_SETTINGS, ...settings });\n }\n } catch (error) {\n console.warn('Failed to load notification settings from localStorage:', error);\n }\n }\n\n /**\n * Save settings to localStorage\n */\n private saveToLocalStorage(settings: NotificationSettings): void {\n try {\n localStorage.setItem('cide_notification_settings', JSON.stringify(settings));\n } catch (error) {\n console.warn('Failed to save notification settings to localStorage:', error);\n }\n }\n}\n\n","import { Component, OnInit, inject, signal, computed } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { \n CideIconComponent, \n CideEleButtonComponent, \n CideInputComponent, \n CideSelectComponent,\n NotificationService\n} from 'cloud-ide-element';\nimport { NotificationSettingsService, type NotificationSettings } from '../../services/notification-settings/notification-settings.service';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DestroyRef } from '@angular/core';\n\n/**\n * Notification Settings Component\n * Allows users to configure notification preferences\n */\n@Component({\n selector: 'cide-lyt-notification-settings',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n CideIconComponent,\n CideEleButtonComponent,\n CideInputComponent,\n CideSelectComponent\n ],\n template: `\n <div class=\"notification-settings-container tw-p-6 tw-space-y-6 tw-bg-white dark:tw-bg-gray-900 tw-text-gray-900 dark:tw-text-gray-100\">\n <!-- Header -->\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-pb-3 tw-border-b tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-w-8 tw-h-8 tw-bg-blue-500 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-text-white\">settings</cide-ele-icon>\n </div>\n <div>\n <h3 class=\"tw-m-0 tw-text-sm tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100\">Notification Settings</h3>\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-600 dark:tw-text-gray-400\">Customize your notification preferences</p>\n </div>\n </div>\n\n <form [formGroup]=\"settingsForm\" class=\"tw-space-y-6\">\n <!-- Sound Settings -->\n <div class=\"tw-space-y-3\">\n <h4 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-uppercase tw-tracking-wide\">Sound Settings</h4>\n \n <!-- Enable Sound -->\n <div class=\"tw-flex tw-items-center tw-justify-between tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon class=\"tw-text-gray-600 dark:tw-text-gray-400\">volume_up</cide-ele-icon>\n <div>\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">Enable Sound</label>\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400\">Play sound when receiving notifications</p>\n </div>\n </div>\n <label class=\"tw-relative tw-inline-flex tw-items-center tw-cursor-pointer\">\n <input \n type=\"checkbox\" \n [checked]=\"settingsForm.get('soundEnabled')?.value\"\n (change)=\"settingsForm.get('soundEnabled')?.setValue($any($event.target).checked)\"\n class=\"tw-sr-only tw-peer\">\n <div class=\"tw-w-11 tw-h-6 tw-bg-gray-200 peer-focus:tw-outline-none peer-focus:tw-ring-4 peer-focus:tw-ring-blue-300 dark:peer-focus:tw-ring-blue-800 dark:peer-focus:tw-ring-offset-gray-800 tw-rounded-full peer dark:tw-bg-gray-700 peer-checked:after:tw-translate-x-full peer-checked:after:tw-border-white after:tw-content-[''] after:tw-absolute after:tw-top-[2px] after:tw-left-[2px] after:tw-bg-white after:tw-border-gray-300 after:tw-border after:tw-rounded-full after:tw-h-5 after:tw-w-5 after:tw-transition-all dark:tw-border-gray-600 peer-checked:tw-bg-blue-600\"></div>\n </label>\n </div>\n\n @if (settingsForm.get('soundEnabled')?.value) {\n <!-- Sound Type -->\n <div class=\"tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <label class=\"tw-block tw-text-xs tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2\">Sound Type</label>\n <cide-ele-select\n formControlName=\"soundType\"\n [options]=\"soundTypeOptions\"\n placeholder=\"Select sound type\">\n </cide-ele-select>\n </div>\n\n <!-- Sound Volume -->\n <div class=\"tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-2\">\n <label class=\"tw-text-xs tw-font-medium tw-text-gray-700 dark:tw-text-gray-300\">Volume</label>\n <span class=\"tw-text-xs tw-text-gray-600 dark:tw-text-gray-400\">{{ settingsForm.get('soundVolume')?.value }}%</span>\n </div>\n <div class=\"volume-slider-container\">\n <input \n type=\"range\" \n formControlName=\"soundVolume\"\n min=\"0\" \n max=\"100\" \n step=\"1\"\n (input)=\"onVolumeChange($event)\"\n class=\"volume-slider tw-w-full\">\n </div>\n <div class=\"tw-flex tw-justify-between tw-text-[10px] tw-text-gray-500 dark:tw-text-gray-400 tw-mt-1\">\n <span>0%</span>\n <span>100%</span>\n </div>\n </div>\n\n <!-- Test Sound Button -->\n <button\n type=\"button\"\n cideEleButton\n variant=\"outline\"\n size=\"sm\"\n (click)=\"testSound()\"\n class=\"tw-w-full\">\n <cide-ele-icon>play_arrow</cide-ele-icon>\n Test Sound\n </button>\n }\n </div>\n\n <!-- Quiet Hours -->\n <div class=\"tw-space-y-3\">\n <h4 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-uppercase tw-tracking-wide\">Quiet Hours</h4>\n \n <!-- Enable Quiet Hours -->\n <div class=\"tw-flex tw-items-center tw-justify-between tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon class=\"tw-text-gray-600 dark:tw-text-gray-400\">schedule</cide-ele-icon>\n <div>\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">Enable Quiet Hours</label>\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400\">Mute notifications during specified hours</p>\n </div>\n </div>\n <label class=\"tw-relative tw-inline-flex tw-items-center tw-cursor-pointer\">\n <input \n type=\"checkbox\" \n [checked]=\"settingsForm.get('quietHoursEnabled')?.value\"\n (change)=\"settingsForm.get('quietHoursEnabled')?.setValue($any($event.target).checked)\"\n class=\"tw-sr-only tw-peer\">\n <div class=\"tw-w-11 tw-h-6 tw-bg-gray-200 peer-focus:tw-outline-none peer-focus:tw-ring-4 peer-focus:tw-ring-blue-300 dark:peer-focus:tw-ring-blue-800 dark:peer-focus:tw-ring-offset-gray-800 tw-rounded-full peer dark:tw-bg-gray-700 peer-checked:after:tw-translate-x-full peer-checked:after:tw-border-white after:tw-content-[''] after:tw-absolute after:tw-top-[2px] after:tw-left-[2px] after:tw-bg-white after:tw-border-gray-300 after:tw-border after:tw-rounded-full after:tw-h-5 after:tw-w-5 after:tw-transition-all dark:tw-border-gray-600 peer-checked:tw-bg-blue-600\"></div>\n </label>\n </div>\n\n @if (settingsForm.get('quietHoursEnabled')?.value) {\n <div class=\"tw-grid tw-grid-cols-2 tw-gap-3 tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div>\n <label class=\"tw-block tw-text-xs tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2\">Start Time</label>\n <cide-ele-input\n type=\"time\"\n formControlName=\"quietHoursStart\"\n placeholder=\"22:00\">\n </cide-ele-input>\n </div>\n <div>\n <label class=\"tw-block tw-text-xs tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2\">End Time</label>\n <cide-ele-input\n type=\"time\"\n formControlName=\"quietHoursEnd\"\n placeholder=\"08:00\">\n </cide-ele-input>\n </div>\n </div>\n }\n </div>\n\n <!-- Snooze Settings -->\n <div class=\"tw-space-y-3\">\n <h4 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-uppercase tw-tracking-wide\">Snooze</h4>\n \n <!-- Enable Snooze -->\n <div class=\"tw-flex tw-items-center tw-justify-between tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon class=\"tw-text-gray-600 dark:tw-text-gray-400\">snooze</cide-ele-icon>\n <div>\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">Enable Snooze</label>\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400\">Temporarily pause notifications</p>\n </div>\n </div>\n <label class=\"tw-relative tw-inline-flex tw-items-center tw-cursor-pointer\">\n <input \n type=\"checkbox\" \n [checked]=\"settingsForm.get('snoozeEnabled')?.value\"\n (change)=\"settingsForm.get('snoozeEnabled')?.setValue($any($event.target).checked)\"\n class=\"tw-sr-only tw-peer\">\n <div class=\"tw-w-11 tw-h-6 tw-bg-gray-200 peer-focus:tw-outline-none peer-focus:tw-ring-4 peer-focus:tw-ring-blue-300 dark:peer-focus:tw-ring-blue-800 dark:peer-focus:tw-ring-offset-gray-800 tw-rounded-full peer dark:tw-bg-gray-700 peer-checked:after:tw-translate-x-full peer-checked:after:tw-border-white after:tw-content-[''] after:tw-absolute after:tw-top-[2px] after:tw-left-[2px] after:tw-bg-white after:tw-border-gray-300 after:tw-border after:tw-rounded-full after:tw-h-5 after:tw-w-5 after:tw-transition-all dark:tw-border-gray-600 peer-checked:tw-bg-blue-600\"></div>\n </label>\n </div>\n\n @if (settingsForm.get('snoozeEnabled')?.value) {\n <div class=\"tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <label class=\"tw-block tw-text-xs tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2\">Snooze Duration (minutes)</label>\n <cide-ele-input\n type=\"number\"\n formControlName=\"snoozeDuration\"\n min=\"5\"\n max=\"1440\"\n placeholder=\"30\">\n </cide-ele-input>\n </div>\n }\n </div>\n\n <!-- Other Settings -->\n <div class=\"tw-space-y-3\">\n <h4 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-uppercase tw-tracking-wide\">Other Settings</h4>\n \n <!-- Desktop Notifications -->\n <div class=\"tw-flex tw-items-center tw-justify-between tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon class=\"tw-text-gray-600 dark:tw-text-gray-400\">desktop_windows</cide-ele-icon>\n <div>\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">Desktop Notifications</label>\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400\">Show browser notifications</p>\n </div>\n </div>\n <label class=\"tw-relative tw-inline-flex tw-items-center tw-cursor-pointer\">\n <input \n type=\"checkbox\" \n [checked]=\"settingsForm.get('desktopNotifications')?.value\"\n (change)=\"settingsForm.get('desktopNotifications')?.setValue($any($event.target).checked)\"\n class=\"tw-sr-only tw-peer\">\n <div class=\"tw-w-11 tw-h-6 tw-bg-gray-200 peer-focus:tw-outline-none peer-focus:tw-ring-4 peer-focus:tw-ring-blue-300 dark:peer-focus:tw-ring-blue-800 dark:peer-focus:tw-ring-offset-gray-800 tw-rounded-full peer dark:tw-bg-gray-700 peer-checked:after:tw-translate-x-full peer-checked:after:tw-border-white after:tw-content-[''] after:tw-absolute after:tw-top-[2px] after:tw-left-[2px] after:tw-bg-white after:tw-border-gray-300 after:tw-border after:tw-rounded-full after:tw-h-5 after:tw-w-5 after:tw-transition-all dark:tw-border-gray-600 peer-checked:tw-bg-blue-600\"></div>\n </label>\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-gap-2 tw-pt-4 tw-border-t tw-border-gray-200 dark:tw-border-gray-700\">\n <button\n type=\"button\"\n cideEleButton\n variant=\"outline\"\n size=\"sm\"\n (click)=\"reset()\"\n class=\"tw-flex-1\">\n Reset\n </button>\n <button\n type=\"button\"\n cideEleButton\n variant=\"primary\"\n size=\"sm\"\n (click)=\"save()\"\n class=\"tw-flex-1\">\n Save Settings\n </button>\n </div>\n </form>\n </div>\n `,\n styles: [`\n :host {\n display: block;\n }\n\n .notification-settings-container {\n color: #111827;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container {\n background-color: #ffffff !important;\n color: #111827 !important;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container * {\n color: inherit;\n }\n\n /* Volume Slider Styling */\n .volume-slider-container {\n position: relative;\n width: 100%;\n }\n\n .volume-slider {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 6px;\n border-radius: 3px;\n background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 100%);\n outline: none;\n cursor: pointer;\n transition: background 0.3s ease;\n }\n\n /* Light mode slider track */\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .volume-slider {\n background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 100%);\n }\n\n /* Dark mode slider track */\n :root[data-theme=\"dark\"] .volume-slider,\n :root.dark-mode .volume-slider {\n background: linear-gradient(to right, #374151 0%, #374151 100%);\n }\n\n /* Webkit slider thumb */\n .volume-slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: #2563eb;\n cursor: pointer;\n border: 2px solid #ffffff;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n transition: all 0.2s ease;\n }\n\n .volume-slider::-webkit-slider-thumb:hover {\n background: #1d4ed8;\n transform: scale(1.1);\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);\n }\n\n .volume-slider::-webkit-slider-thumb:active {\n transform: scale(1.2);\n }\n\n /* Dark mode thumb */\n :root[data-theme=\"dark\"] .volume-slider::-webkit-slider-thumb,\n :root.dark-mode .volume-slider::-webkit-slider-thumb {\n background: #3b82f6;\n border-color: #1e293b;\n }\n\n /* Firefox slider thumb */\n .volume-slider::-moz-range-thumb {\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: #2563eb;\n cursor: pointer;\n border: 2px solid #ffffff;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n transition: all 0.2s ease;\n }\n\n .volume-slider::-moz-range-thumb:hover {\n background: #1d4ed8;\n transform: scale(1.1);\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);\n }\n\n .volume-slider::-moz-range-thumb:active {\n transform: scale(1.2);\n }\n\n /* Dark mode Firefox thumb */\n :root[data-theme=\"dark\"] .volume-slider::-moz-range-thumb,\n :root.dark-mode .volume-slider::-moz-range-thumb {\n background: #3b82f6;\n border-color: #1e293b;\n }\n\n /* Update slider track fill based on value */\n .volume-slider {\n background-size: var(--slider-value, 0%) 100%;\n background-repeat: no-repeat;\n }\n\n /* Light mode text colors */\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container .tw-text-gray-700 {\n color: #374151 !important;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container .tw-text-gray-600 {\n color: #4b5563 !important;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container .tw-text-gray-500 {\n color: #6b7280 !important;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container .tw-text-gray-900 {\n color: #111827 !important;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container .tw-bg-gray-50 {\n background-color: #f9fafb !important;\n }\n `]\n})\nexport class NotificationSettingsComponent implements OnInit {\n private fb = inject(FormBuilder);\n private settingsService = inject(NotificationSettingsService);\n private notificationService = inject(NotificationService);\n private destroyRef = inject(DestroyRef);\n\n settingsForm!: FormGroup;\n\n soundTypeOptions = [\n { value: 'default', label: 'Default' },\n { value: 'gentle', label: 'Gentle' },\n { value: 'alert', label: 'Alert' },\n { value: 'chime', label: 'Chime' },\n { value: 'none', label: 'None' }\n ];\n\n ngOnInit(): void {\n const settings = this.settingsService.settings();\n \n this.settingsForm = this.fb.group({\n soundEnabled: [settings.soundEnabled],\n soundVolume: [settings.soundVolume, [Validators.min(0), Validators.max(100)]],\n soundType: [settings.soundType],\n snoozeEnabled: [settings.snoozeEnabled],\n snoozeDuration: [settings.snoozeDuration, [Validators.min(5), Validators.max(1440)]],\n quietHoursEnabled: [settings.quietHoursEnabled],\n quietHoursStart: [settings.quietHoursStart],\n quietHoursEnd: [settings.quietHoursEnd],\n desktopNotifications: [settings.desktopNotifications],\n showPreview: [settings.showPreview],\n groupNotifications: [settings.groupNotifications]\n });\n\n // Update slider background on volume change\n this.settingsForm.get('soundVolume')?.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((value: number) => {\n this.updateSliderBackground(value);\n });\n\n // Initialize slider background\n setTimeout(() => {\n const initialValue = this.settingsForm.get('soundVolume')?.value || 70;\n this.updateSliderBackground(initialValue);\n }, 0);\n\n // Auto-save on form changes\n this.settingsForm.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.save();\n });\n }\n\n private updateSliderBackground(value: number): void {\n setTimeout(() => {\n const slider = document.querySelector('.volume-slider') as HTMLInputElement;\n if (slider) {\n const percentage = value;\n const isDark = document.documentElement.classList.contains('dark-mode') || \n document.documentElement.getAttribute('data-theme') === 'dark';\n \n if (isDark) {\n slider.style.background = `linear-gradient(to right, #3b82f6 0%, #3b82f6 ${percentage}%, #374151 ${percentage}%, #374151 100%)`;\n } else {\n slider.style.background = `linear-gradient(to right, #2563eb 0%, #2563eb ${percentage}%, #e5e7eb ${percentage}%, #e5e7eb 100%)`;\n }\n }\n }, 0);\n }\n\n onVolumeChange(event: Event): void {\n const value = parseInt((event.target as HTMLInputElement).value, 10);\n this.updateSliderBackground(value);\n }\n\n testSound(): void {\n this.settingsService.playNotificationSound();\n }\n\n save(): void {\n if (this.settingsForm.valid) {\n this.settingsService.updateSettings(this.settingsForm.value);\n this.notificationService.success('Notification settings saved');\n }\n }\n\n reset(): void {\n this.settingsService.reset();\n const settings = this.settingsService.settings();\n this.settingsForm.patchValue(settings, { emitEvent: false });\n this.notificationService.info('Settings reset to defaults');\n }\n}\n\n","import { AfterViewInit, Component, inject, signal, computed, OnInit, OnDestroy, ViewChild, TemplateRef } from '@angular/core';\nimport { CideLytHeaderService } from '../header.service';\nimport { CideLytFileManagerService } from '../../../services/file-manager/file-manager.service';\nimport { CideLytSharedService } from '../../shared/shared.service';\nimport { CommonModule } from '@angular/common';\nimport {\n CideIconComponent, CideInputComponent, CideEleDropdownComponent,\n DropdownItem, DropdownConfig, CideEleFileImageDirective,\n CideThemeService,\n CideEleFloatingContainerService,\n ConfirmationService\n} from 'cloud-ide-element';\nimport { \n WebSocketNotificationService, \n NotificationApiService\n} from 'cloud-ide-element';\nimport type { NotificationPayload } from 'cloud-ide-element';\nimport { Router } from '@angular/router';\nimport {\n IAuthService,\n AUTH_SERVICE_TOKEN,\n FINANCIAL_YEAR_SERVICE_TOKEN,\n ACADEMIC_YEAR_SERVICE_TOKEN,\n IFinancialYearService,\n IAcademicYearService\n} from 'cloud-ide-shared';\nimport { AppStateService } from '../../../services/app-state/app-state.service';\nimport { CideLytFloatingEntitySelectionService } from '../../../components/floating-entity-selection/floating-entity-selection.service';\nimport { NotificationSettingsService } from '../../../services/notification-settings/notification-settings.service';\nimport { NotificationSettingsComponent } from '../../../components/notification-settings/notification-settings.component';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DestroyRef } from '@angular/core';\n\n@Component({\n selector: 'cide-lyt-header-wrapper',\n templateUrl: './header-wrapper.component.html',\n styleUrl: './header-wrapper.component.css',\n imports: [CideInputComponent, CommonModule, CideIconComponent,\n CideEleDropdownComponent, CideEleFileImageDirective]\n})\nexport class CideLytHeaderWrapperComponent implements AfterViewInit, OnInit, OnDestroy {\n @ViewChild('triggerTemplate') triggerTemplate!: TemplateRef<any>;\n @ViewChild('financialYearTriggerTemplate') financialYearTriggerTemplate!: TemplateRef<any>;\n @ViewChild('academicYearTriggerTemplate') academicYearTriggerTemplate!: TemplateRef<any>;\n @ViewChild('notificationTriggerTemplate') notificationTriggerTemplate!: TemplateRef<any>;\n @ViewChild('notificationDropdown') notificationDropdown!: any; // Dropdown component reference\n\n // Inject app state service to get active entity\n public appStateService = inject(AppStateService);\n\n // Inject floating entity selection service\n private floatingEntitySelectionService = inject(CideLytFloatingEntitySelectionService);\n\n // Inject year services using injection tokens\n private financialYearService = inject(FINANCIAL_YEAR_SERVICE_TOKEN) as IFinancialYearService;\n private academicYearService = inject(ACADEMIC_YEAR_SERVICE_TOKEN) as IAcademicYearService;\n private destroyRef = inject(DestroyRef);\n \n // Inject theme service for independent theme management\n private themeService = inject(CideThemeService);\n\n // Signals for year data\n financialYears = signal<any[]>([]);\n academicYears = signal<any[]>([]);\n currentFinancialYear = signal<any>(null);\n currentAcademicYear = signal<any>(null);\n currentFinancialYearName = signal<string>('FY');\n currentAcademicYearName = signal<string>('AY');\n\n // Signals for notifications\n notifications = signal<NotificationPayload[]>([]);\n unreadCount = computed(() => this.wsNotificationService?.unreadNotificationsCount() || 0);\n isNotificationDropdownOpen = signal<boolean>(false);\n notificationItems = signal<DropdownItem[]>([]);\n \n // Track previously seen notification IDs to detect new ones\n private previousNotificationIds = new Set<string>();\n private isInitialLoad = true; // Track if this is the first load\n \n // Animation and undo state\n animatingNotifications = signal<Set<string>>(new Set());\n recentlyRemovedNotifications = signal<Map<string, { notification: NotificationPayload; timeoutId: any }>>(new Map());\n\n // Dark mode signal\n darkMode = signal<boolean>(false);\n\n // Financial Year Dropdown Configuration\n financialYearItems = signal<DropdownItem[]>([]);\n financialYearConfig: DropdownConfig = {\n triggerIcon: '',\n triggerSize: 'sm',\n menuPosition: 'auto',\n menuWidth: 'tw-w-72',\n usePortal: true\n };\n\n // Academic Year Dropdown Configuration\n academicYearItems = signal<DropdownItem[]>([]);\n academicYearConfig: DropdownConfig = {\n triggerIcon: '',\n triggerSize: 'sm',\n menuPosition: 'auto',\n menuWidth: 'tw-w-72',\n usePortal: true\n };\n\n // Notification Dropdown Configuration\n notificationConfig: DropdownConfig = {\n triggerIcon: '',\n triggerSize: 'md',\n menuPosition: 'right',\n menuWidth: 'tw-w-96',\n usePortal: true\n };\n\n // Profile Dropdown Configuration (moved from more options)\n profileItems: DropdownItem[] = [\n {\n id: 'profile',\n label: 'My Profile',\n icon: 'person',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'settings',\n label: 'Settings',\n icon: 'settings',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'theme',\n label: 'Dark Mode',\n icon: 'dark_mode',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'help',\n label: 'Help & Support',\n icon: 'help',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'divider',\n label: '',\n divider: true\n },\n {\n id: 'logout',\n label: 'Logout',\n icon: 'logout',\n iconColor: 'tw-text-red-500',\n textColor: 'tw-text-red-600',\n hoverBgColor: 'hover:tw-bg-red-50'\n }\n ];\n\n profileConfig: DropdownConfig = {\n triggerIcon: '',\n triggerSize: 'sm',\n menuPosition: 'auto',\n menuWidth: 'tw-w-48',\n usePortal: true\n };\n\n // More Options Dropdown Configuration (DEPRECATED - keeping for reference)\n moreOptionsItems: DropdownItem[] = [\n {\n id: 'settings',\n label: 'Settings',\n icon: 'settings',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'help',\n label: 'Help & Support',\n icon: 'help',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'divider',\n label: '',\n divider: true\n },\n {\n id: 'logout',\n label: 'Logout',\n icon: 'logout',\n iconColor: 'tw-text-red-500',\n textColor: 'tw-text-red-600',\n hoverBgColor: 'hover:tw-bg-red-50'\n }\n ];\n\n moreOptionsConfig: DropdownConfig = {\n triggerIcon: 'more_vert',\n triggerSize: 'sm',\n menuPosition: 'auto',\n menuWidth: 'tw-w-48',\n usePortal: true\n };\n\n private headerService = inject(CideLytHeaderService);\n private sharedService = inject(CideLytSharedService);\n private fileManagerService = inject(CideLytFileManagerService);\n private router = inject(Router);\n private confirmationService = inject(ConfirmationService);\n private authService = inject(AUTH_SERVICE_TOKEN) as IAuthService;\n private wsNotificationService = inject(WebSocketNotificationService);\n private notificationApiService = inject(NotificationApiService);\n private floatingContainerService = inject(CideEleFloatingContainerService);\n private notificationSettingsService = inject(NotificationSettingsService);\n\n constructor() {\n // Trigger page-data workflow for header (without rendering breadcrumb)\n const entityId = this.appStateService.activeEntity()?._id || undefined;\n this.sharedService.loadAndProcessPageData({ sypg_page_code: 'cide_lyt_header', sytm_entity_id_syen: entityId }, {\n setTitle: false,\n setSidebarContext: false,\n updateLayout: false\n }).subscribe({\n next: () => { },\n error: () => { }\n });\n }\n\n ngOnInit() {\n // Initialize audio context early to avoid browser autoplay restrictions\n // This must be done on user interaction, so we'll do it on first user click\n this.initializeAudioContext();\n // Subscribe to theme service for reactive theme updates\n this.themeService.getEffectiveTheme$()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(theme => {\n this.darkMode.set(theme === 'dark');\n // Update theme menu item based on current state\n this.updateThemeMenuItem();\n });\n \n // Set initial darkMode state from theme service\n this.darkMode.set(this.themeService.isDarkMode());\n\n this.loadFinancialYears();\n this.loadAcademicYears();\n // Initialize notification dropdown with empty state\n this.updateNotificationDropdown();\n // Then try to load notifications\n this.initializeNotifications();\n }\n\n /**\n * Initialize notification system\n */\n private initializeNotifications(): void {\n try {\n const user = this.appStateService.currentUser();\n if (!user || !user._id) {\n console.warn('[Notifications] User not available, skipping initialization');\n return;\n }\n\n // Get token from localStorage (using auth service storage key)\n const token = localStorage.getItem('cide_auth_token') || localStorage.getItem('auth_token') || localStorage.getItem('token') || '';\n \n if (!token) {\n console.warn('[Notifications] No token found, skipping WebSocket connection');\n // Still try to load notifications from API (might work if GET is public)\n this.loadNotifications();\n return;\n }\n\n if (!this.wsNotificationService) {\n console.error('[Notifications] WebSocket service not available');\n return;\n }\n\n console.log('[Notifications] Initializing with user:', user._id);\n \n // Connect WebSocket\n this.wsNotificationService.connect(token, String(user._id));\n \n // Subscribe to real-time notifications\n this.wsNotificationService.notification$.pipe(\n takeUntilDestroyed(this.destroyRef)\n ).subscribe({\n next: (notification: NotificationPayload) => {\n console.log('[Notifications] New notification received:', notification);\n this.loadNotifications();\n // Play notification sound based on user settings\n this.playNotificationSound();\n },\n error: (error) => {\n console.error('[Notifications] Error in notification stream:', error);\n }\n });\n\n // Subscribe to connection status\n this.wsNotificationService.connectionStatus$.pipe(\n takeUntilDestroyed(this.destroyRef)\n ).subscribe({\n next: (status) => {\n console.log('[Notifications] Connection status:', status);\n },\n error: (error) => {\n console.error('[Notifications] Error in connection status:', error);\n }\n });\n\n // Load initial notifications from API\n this.loadNotifications();\n } catch (error) {\n console.error('[Notifications] Error initializing notifications:', error);\n }\n }\n\n /**\n * Load notifications from API\n * @param showAll - If true, show all notifications (read + unread). If false, show only unread.\n */\n private loadNotifications(showAll: boolean = false): void {\n try {\n // Get notifications from WebSocket service (real-time)\n const wsNotifications = this.wsNotificationService?.allNotifications() || [];\n console.log('[Notifications] WebSocket notifications:', wsNotifications.length);\n \n // Load from API to get all notifications (including read status)\n const params: any = {\n pageSize: showAll ? 100 : 20\n };\n \n // If not showing all, filter to exclude read notifications\n if (!showAll) {\n // We'll filter client-side after loading to ensure we get accurate read status\n }\n \n this.notificationApiService.getNotifications(params).subscribe({\n next: (response: any) => {\n console.log('[Notifications] API response:', response);\n if (response && response.success && response.data) {\n // Convert server notifications to notification payloads\n const apiPayloads: NotificationPayload[] = response.data.map((notif: any) => ({\n id: String(notif._id),\n type: notif.not_type || 'info',\n category: notif.not_category,\n title: notif.not_title,\n message: notif.not_message,\n data: notif.not_data,\n action_url: notif.not_action_url,\n action_label: notif.not_action_label,\n priority: notif.not_priority || 'normal',\n created_at: new Date(notif.not_created_at),\n timestamp: new Date(notif.not_created_at),\n // Store read status for filtering\n isRead: notif.not_status === 'read' || notif.not_read_at !== undefined\n } as NotificationPayload & { isRead?: boolean }));\n \n console.log('[Notifications] Converted API payloads:', apiPayloads.length);\n console.log('[Notifications] Read status breakdown:', {\n total: apiPayloads.length,\n read: apiPayloads.filter(n => (n as any).isRead).length,\n unread: apiPayloads.filter(n => !(n as any).isRead).length\n });\n \n // Merge WebSocket and API notifications (API takes priority for read status)\n const mergedNotifications: (NotificationPayload & { isRead?: boolean })[] = [];\n \n // Add API notifications first (they have read status)\n apiPayloads.forEach(apiNotif => {\n mergedNotifications.push(apiNotif);\n });\n \n // Add WebSocket notifications that aren't in API (new real-time notifications)\n wsNotifications.forEach(wsNotif => {\n if (!mergedNotifications.find(n => n.id === wsNotif.id)) {\n mergedNotifications.push({ ...wsNotif, isRead: false });\n }\n });\n \n // Filter out read notifications if not showing all\n let filteredNotifications = mergedNotifications;\n if (!showAll) {\n filteredNotifications = mergedNotifications.filter(n => !(n as any).isRead);\n console.log('[Notifications] Filtered to unread only:', filteredNotifications.length);\n }\n \n // Sort by timestamp (newest first)\n filteredNotifications.sort((a, b) => \n new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()\n );\n \n // Detect new notifications and play sound\n if (!this.isInitialLoad) {\n const currentNotificationIds = new Set(filteredNotifications.map(n => n.id));\n const newNotifications = filteredNotifications.filter(n => !this.previousNotificationIds.has(n.id));\n \n if (newNotifications.length > 0) {\n console.log(`[Notifications] ${newNotifications.length} new notification(s) detected, playing sound...`);\n // Play sound for new notifications\n this.playNotificationSound();\n }\n \n // Update previous notification IDs\n this.previousNotificationIds = currentNotificationIds;\n } else {\n // First load - just track IDs, don't play sound\n this.previousNotificationIds = new Set(filteredNotifications.map(n => n.id));\n this.isInitialLoad = false;\n }\n \n console.log('[Notifications] Total notifications to display:', filteredNotifications.length);\n this.notifications.set(filteredNotifications as NotificationPayload[]);\n this.updateNotificationDropdown();\n } else {\n console.warn('[Notifications] API response invalid, using WebSocket notifications only');\n // Fallback to WebSocket notifications only (filter to unread if needed)\n const filtered = showAll ? wsNotifications : wsNotifications.filter(n => !(n as any).isRead);\n this.notifications.set(filtered);\n this.updateNotificationDropdown();\n }\n },\n error: (error: any) => {\n console.error('[Notifications] Error loading from API:', error);\n // Fallback to WebSocket notifications only (filter to unread if needed)\n const filtered = showAll ? wsNotifications : wsNotifications.filter(n => !(n as any).isRead);\n this.notifications.set(filtered);\n this.updateNotificationDropdown();\n }\n });\n } catch (error) {\n console.error('[Notifications] Error in loadNotifications:', error);\n }\n }\n\n /**\n * Update notification dropdown items\n */\n private updateNotificationDropdown(): void {\n const notifs = this.notifications();\n const unreadCount = this.unreadCount();\n \n // Filter to show only unread notifications in the dropdown (or all if \"View All\" was clicked)\n // For now, show first 20 notifications (increased from 10 for better UX)\n const notificationsToShow = notifs.slice(0, 20);\n \n // Map notifications to dropdown items\n const items: DropdownItem[] = notificationsToShow.map(notif => ({\n id: notif.id,\n label: notif.title,\n icon: this.getNotificationIcon(notif.type),\n iconColor: this.getNotificationIconColor(notif.type),\n // Note: description is not supported by DropdownItem interface, but keeping for future use\n // description: notif.message,\n } as DropdownItem));\n\n // Add action buttons if there are notifications\n if (notifs.length > 0) {\n // Add divider before actions\n items.push({\n id: 'divider-1',\n label: '',\n divider: true\n } as DropdownItem);\n \n // Add \"Mark All as Read\" if there are unread notifications\n if (unreadCount > 0) {\n items.push({\n id: 'mark-all-read',\n label: 'Mark All as Read',\n icon: 'done_all',\n iconColor: 'tw-text-blue-500'\n } as DropdownItem);\n }\n \n // Add \"Clear All\" option (only if there are notifications)\n items.push({\n id: 'clear-all',\n label: 'Clear All',\n icon: 'clear_all',\n iconColor: 'tw-text-red-500',\n textColor: 'tw-text-red-600',\n hoverBgColor: 'hover:tw-bg-red-50'\n } as DropdownItem);\n \n // Add divider before \"View All\"\n items.push({\n id: 'divider-2',\n label: '',\n divider: true\n } as DropdownItem);\n \n // Add \"View All\" option (show count if more than displayed)\n const viewAllLabel = notifs.length > 20 \n ? `View All Notifications (${notifs.length})` \n : 'View All Notifications';\n items.push({\n id: 'view-all',\n label: viewAllLabel,\n icon: 'list',\n iconColor: 'tw-text-blue-500'\n } as DropdownItem);\n } else {\n items.push({\n id: 'no-notifications',\n label: 'No notifications',\n icon: 'notifications_off',\n iconColor: 'tw-text-gray-400',\n disabled: true\n } as DropdownItem);\n }\n \n // Set the signal with the complete array\n this.notificationItems.set(items);\n }\n\n /**\n * Get icon for notification type\n */\n getNotificationIcon(type: string): string {\n const iconMap: { [key: string]: string } = {\n 'info': 'info',\n 'success': 'check_circle',\n 'warning': 'warning',\n 'error': 'error',\n 'system': 'settings'\n };\n return iconMap[type] || 'notifications';\n }\n\n /**\n * Get icon color for notification type\n */\n private getNotificationIconColor(type: string): string {\n const colorMap: { [key: string]: string } = {\n 'info': 'tw-text-blue-500',\n 'success': 'tw-text-green-500',\n 'warning': 'tw-text-yellow-500',\n 'error': 'tw-text-red-500',\n 'system': 'tw-text-gray-500'\n };\n return colorMap[type] || 'tw-text-gray-500';\n }\n\n /**\n * Check if notification is undoable based on type\n */\n isNotificationUndoable(notification: NotificationPayload): boolean {\n // System notifications are not undoable\n if (notification.type === 'system') {\n return false;\n }\n // Error notifications are not undoable\n if (notification.type === 'error') {\n return false;\n }\n // Success notifications might be undoable (e.g., \"Marked as read\" can be undone)\n if (notification.type === 'success') {\n return true;\n }\n // Info and warning notifications are undoable\n return notification.type === 'info' || notification.type === 'warning';\n }\n\n /**\n * Handle notification item click (from custom template)\n */\n onNotificationItemClick(notification: NotificationPayload): void {\n const notificationId = String(notification.id);\n \n // Check if undoable\n const isUndoable = this.isNotificationUndoable(notification);\n \n if (isUndoable) {\n // Add animation class (start slide-out animation)\n this.animatingNotifications.update(animating => {\n const newSet = new Set(animating);\n newSet.add(notificationId);\n return newSet;\n });\n \n // Store notification for undo with timeout\n const timeoutId = setTimeout(() => {\n // After 5 seconds, actually mark as read and remove\n this.markNotificationAsRead(notificationId, true); // skipAnimation = true\n this.animatingNotifications.update(animating => {\n const newSet = new Set(animating);\n newSet.delete(notificationId);\n return newSet;\n });\n this.recentlyRemovedNotifications.update(removed => {\n const newMap = new Map(removed);\n newMap.delete(notificationId);\n return newMap;\n });\n // Remove from list after timeout\n this.notifications.update(notifs => \n notifs.filter(n => String(n.id) !== notificationId)\n );\n this.updateNotificationDropdown();\n }, 5000); // 5 seconds to undo\n \n this.recentlyRemovedNotifications.update(removed => {\n const newMap = new Map(removed);\n newMap.set(notificationId, { notification, timeoutId });\n return newMap;\n });\n \n // Don't remove from list immediately - keep it visible with animation and undo button\n // It will be removed after 5 seconds if not undone\n } else {\n // Not undoable - mark as read immediately with animation\n this.animatingNotifications.update(animating => {\n const newSet = new Set(animating);\n newSet.add(notificationId);\n return newSet;\n });\n \n // Remove from view after animation\n setTimeout(() => {\n this.markNotificationAsRead(notificationId, true);\n this.notifications.update(notifs => \n notifs.filter(n => String(n.id) !== notificationId)\n );\n this.updateNotificationDropdown();\n this.animatingNotifications.update(animating => {\n const newSet = new Set(animating);\n newSet.delete(notificationId);\n return newSet;\n });\n }, 300); // Wait for animation to complete\n }\n\n // Navigate to action URL if available\n if (notification?.action_url) {\n this.router.navigate([notification.action_url]);\n }\n }\n\n /**\n * Undo notification removal\n */\n undoNotificationRemoval(notificationId: string): void {\n const removed = this.recentlyRemovedNotifications().get(notificationId);\n if (!removed) return;\n \n // Clear timeout\n clearTimeout(removed.timeoutId);\n \n // Remove from animating set (restore animation state)\n this.animatingNotifications.update(animating => {\n const newSet = new Set(animating);\n newSet.delete(notificationId);\n return newSet;\n });\n \n // Notification should still be in the list, just restore its state\n // The notification is already in the list, we just need to remove the animation classes\n \n // Remove from recently removed\n this.recentlyRemovedNotifications.update(removed => {\n const newMap = new Map(removed);\n newMap.delete(notificationId);\n return newMap;\n });\n \n this.updateNotificationDropdown();\n }\n\n /**\n * Check if notification is animating (being removed)\n */\n isNotificationAnimating(notification: NotificationPayload): boolean {\n const notificationId = String(notification.id);\n return this.animatingNotifications().has(notificationId);\n }\n\n /**\n * Check if notification can be undone (is currently animating/removed)\n */\n canUndoNotification(notification: NotificationPayload): boolean {\n const notificationId = String(notification.id);\n return this.animatingNotifications().has(notificationId) || this.recentlyRemovedNotifications().has(notificationId);\n }\n\n /**\n * Get notification ID as string (helper for template)\n */\n getNotificationId(notification: NotificationPayload): string {\n return String(notification.id);\n }\n\n /**\n * Check if notification is read\n */\n isNotificationRead(notification: NotificationPayload): boolean {\n return (notification as any).isRead === true;\n }\n\n /**\n * Get time ago string\n */\n getTimeAgo(timestamp: Date): string {\n const now = new Date();\n const diff = now.getTime() - new Date(timestamp).getTime();\n const seconds = Math.floor(diff / 1000);\n const minutes = Math.floor(seconds / 60);\n const hours = Math.floor(minutes / 60);\n const days = Math.floor(hours / 24);\n\n if (days > 0) return `${days} ${days === 1 ? 'day' : 'days'} ago`;\n if (hours > 0) return `${hours} ${hours === 1 ? 'hour' : 'hours'} ago`;\n if (minutes > 0) return `${minutes} ${minutes === 1 ? 'minute' : 'minutes'} ago`;\n return 'Just now';\n }\n\n /**\n * Get full time string (e.g., \"Friday 3:12 PM\")\n */\n getFullTime(timestamp: Date): string {\n const date = new Date(timestamp);\n const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n const dayName = days[date.getDay()];\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const ampm = hours >= 12 ? 'PM' : 'AM';\n const displayHours = hours % 12 || 12;\n const displayMinutes = minutes.toString().padStart(2, '0');\n return `${dayName} ${displayHours}:${displayMinutes} ${ampm}`;\n }\n\n /**\n * Get notification name (from data or title)\n */\n getNotificationName(notification: NotificationPayload): string {\n if (notification.data?.user_name) return notification.data.user_name;\n if (notification.data?.name) return notification.data.name;\n // Extract name from title if format is \"Name action...\"\n const titleParts = notification.title.split(' ');\n if (titleParts.length > 1) {\n return titleParts[0];\n }\n return 'System';\n }\n\n /**\n * Get notification action text\n */\n getNotificationAction(notification: NotificationPayload): string {\n const title = notification.title;\n const name = this.getNotificationName(notification);\n // Remove the name from title to get action\n return title.replace(name, '').trim();\n }\n\n /**\n * Get notification avatar (from data or created_by)\n */\n getNotificationAvatar(notification: NotificationPayload): string | null {\n if (notification.data?.user_photo_id_cyfm) return notification.data.user_photo_id_cyfm;\n if (notification.data?.photo_id) return notification.data.photo_id;\n // Try to get from created_by if it's a populated object\n const createdBy = (notification as any).not_id_created_by;\n if (createdBy && typeof createdBy === 'object' && createdBy.user_photo_id_cyfm) {\n return createdBy.user_photo_id_cyfm;\n }\n return null;\n }\n\n /**\n * Get file icon based on file type\n */\n getFileIcon(fileType: string): string {\n if (!fileType) return 'description';\n const type = fileType.toLowerCase();\n if (type.includes('pdf')) return 'PDF';\n if (type.includes('mp4') || type.includes('video')) return 'MP4';\n if (type.includes('image')) return 'IMG';\n if (type.includes('word') || type.includes('doc')) return 'DOC';\n if (type.includes('excel') || type.includes('xls')) return 'XLS';\n return 'FILE';\n }\n\n /**\n * Close notification dropdown\n */\n closeNotificationDropdown(event: Event): void {\n event.stopPropagation();\n // Close the dropdown by toggling it if it's open\n if (this.notificationDropdown && typeof this.notificationDropdown.toggleDropdown === 'function') {\n // If dropdown is open, toggle to close it\n if (this.notificationDropdown.isOpen && this.notificationDropdown.isOpen()) {\n this.notificationDropdown.toggleDropdown(event);\n }\n }\n }\n\n /**\n * Get notification icon color class\n */\n getNotificationIconColorClass(type: string): string {\n const colorMap: { [key: string]: string } = {\n 'info': 'tw-text-blue-500',\n 'success': 'tw-text-green-500',\n 'warning': 'tw-text-yellow-500',\n 'error': 'tw-text-red-500',\n 'system': 'tw-text-gray-500'\n };\n return colorMap[type] || 'tw-text-gray-500';\n }\n\n /**\n * Handle notification dropdown item click\n */\n onNotificationClick(item: DropdownItem): void {\n // Handle action buttons\n if (item.id === 'mark-all-read') {\n this.markAllAsRead();\n return;\n }\n\n if (item.id === 'clear-all') {\n this.clearAllNotifications();\n return;\n }\n\n if (item.id === 'view-all') {\n // Show all notifications - for now, just reload with more items\n console.log('[Notifications] View all notifications');\n this.loadAllNotifications();\n return;\n }\n\n if (item.id === 'no-notifications' || item.id === 'divider' || item.id === 'divider-1' || item.id === 'divider-2') {\n return;\n }\n\n // Mark notification as read when clicked\n this.markNotificationAsRead(String(item.id));\n\n // Navigate to action URL if available\n const notification = this.notifications().find(n => n.id === item.id);\n if (notification?.action_url) {\n this.router.navigate([notification.action_url]);\n }\n }\n\n /**\n * Mark a single notification as read\n */\n private markNotificationAsRead(notificationId: string, skipAnimation: boolean = false): void {\n console.log('[Notifications] Marking as read:', notificationId);\n \n // If not skipping animation, check if it's undoable\n if (!skipAnimation) {\n const notification = this.notifications().find(n => String(n.id) === notificationId);\n if (notification && this.isNotificationUndoable(notification)) {\n // Handle through onNotificationItemClick for undo functionality\n this.onNotificationItemClick(notification);\n return;\n }\n }\n \n // Mark in WebSocket service\n if (this.wsNotificationService) {\n this.wsNotificationService.markAsRead(notificationId);\n }\n \n // Mark in API\n this.notificationApiService.markAsRead(notificationId).subscribe({\n next: (response) => {\n console.log('[Notifications] Marked as read successfully:', response);\n // Reload notifications to update unread count (only show unread)\n this.loadNotifications(false); // false = only show unread\n },\n error: (error: any) => {\n console.error('[Notifications] Error marking notification as read:', error);\n console.error('[Notifications] Error details:', {\n status: error?.status,\n statusText: error?.statusText,\n message: error?.message,\n url: error?.url\n });\n // Still reload to get updated state\n this.loadNotifications();\n }\n });\n }\n\n /**\n * Mark all notifications as read\n */\n markAllAsRead(): void {\n console.log('[Notifications] Marking all as read');\n this.notificationApiService.markAllAsRead().subscribe({\n next: (response) => {\n console.log('[Notifications] All notifications marked as read successfully:', response);\n // Clear current notifications since they're all read now\n // This will show empty state or only new unread notifications\n this.notifications.set([]);\n this.updateNotificationDropdown();\n \n // Reload after a short delay to get updated state (will only show unread)\n setTimeout(() => {\n this.loadNotifications(false); // false = only show unread\n }, 500);\n },\n error: (error: any) => {\n console.error('[Notifications] Error marking all as read:', error);\n console.error('[Notifications] Error details:', {\n status: error?.status,\n statusText: error?.statusText,\n message: error?.message,\n url: error?.url\n });\n // Still reload to get updated state\n this.loadNotifications(false); // false = only show unread\n }\n });\n }\n\n /**\n * Clear all notifications (mark all as read and remove from view)\n */\n clearAllNotifications(): void {\n if (confirm('Are you sure you want to clear all notifications? This will mark them all as read.')) {\n console.log('[Notifications] Clearing all notifications');\n // First mark all as read\n this.notificationApiService.markAllAsRead().subscribe({\n next: (response) => {\n console.log('[Notifications] All notifications marked as read:', response);\n // Clear notifications from view immediately (they're all read now)\n this.notifications.set([]);\n this.updateNotificationDropdown();\n \n // Reload after a short delay to get updated state from server\n // This will show empty or only new unread notifications\n setTimeout(() => {\n this.loadNotifications(false); // false = only show unread\n }, 500);\n },\n error: (error: any) => {\n console.error('[Notifications] Error clearing all notifications:', error);\n console.error('[Notifications] Error details:', {\n status: error?.status,\n statusText: error?.statusText,\n message: error?.message,\n url: error?.url\n });\n // Still try to reload\n this.loadNotifications(false); // false = only show unread\n }\n });\n }\n }\n\n /**\n * Load all notifications (for \"View All\" functionality)\n */\n loadAllNotifications(): void {\n try {\n console.log('[Notifications] Loading all notifications (View All)');\n // Load all notifications (read + unread) for \"View All\"\n this.loadNotifications(true); // true = show all (read + unread)\n } catch (error) {\n console.error('[Notifications] Error in loadAllNotifications:', error);\n }\n }\n\n ngAfterViewInit() {\n // No need to manually load file details - cideEleFileImage directive will handle it\n }\n\n ngOnDestroy() {\n // Cleanup handled by takeUntilDestroyed\n }\n\n /**\n * Handles logo click to navigate back to control panel home\n */\n onLogoClick(): void {\n this.router.navigate(['/control-panel']);\n }\n\n /**\n * Handles entity name click to open entity selection floating container\n */\n async onEntityNameClick(): Promise<void> {\n try {\n await this.floatingEntitySelectionService.show();\n } catch (error) {\n // Error handling\n }\n }\n\n /**\n * Updates the tooltip position based on mouse event\n * Similar to the sidebar tooltip positioning\n * @param event Mouse event from icon hover\n */\n updateTooltipPosition(event: MouseEvent) {\n // Find the tooltip element within the event target's parent\n const iconElement = event.currentTarget as HTMLElement;\n const tooltip = iconElement.querySelector('.header-tooltip') as HTMLElement;\n\n if (tooltip) {\n // Ensure the tooltip is properly positioned\n const rect = iconElement.getBoundingClientRect();\n const headerRect = document.getElementById('cide-lyt-header-wrapper')?.getBoundingClientRect();\n\n if (headerRect) {\n // Adjust tooltip position if it would go outside the viewport\n const viewportWidth = window.innerWidth;\n const tooltipWidth = tooltip.offsetWidth;\n\n // Center the tooltip under the icon\n let leftPosition = '50%';\n let transform = 'translateX(-50%)';\n\n // Check if tooltip would extend beyond right edge\n if (rect.left + tooltipWidth / 2 > viewportWidth) {\n leftPosition = 'auto';\n tooltip.style.right = '0';\n transform = 'translateX(0)';\n }\n\n // Check if tooltip would extend beyond left edge\n if (rect.left - tooltipWidth / 2 < 0) {\n leftPosition = '0';\n tooltip.style.right = 'auto';\n transform = 'translateX(0)';\n }\n\n if (leftPosition !== 'auto' && leftPosition !== '0') {\n tooltip.style.left = leftPosition;\n }\n\n tooltip.style.transform = transform;\n }\n }\n }\n\n /**\n * Load financial years from API\n */\n loadFinancialYears(): void {\n this.financialYearService.getFinancialYearList({})\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response) => {\n if (response?.success && response.data) {\n this.financialYears.set(response.data);\n // Defer update to next change detection cycle to avoid ExpressionChangedAfterItHasBeenCheckedError\n Promise.resolve().then(() => {\n this.updateFinancialYearDropdown();\n });\n } else {\n this.financialYears.set([]);\n }\n },\n error: (error) => {\n this.financialYears.set([]);\n }\n });\n }\n\n /**\n * Load academic years from API\n */\n loadAcademicYears(): void {\n this.academicYearService.getAcademicYearList({})\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response) => {\n if (response?.success && response.data) {\n this.academicYears.set(response.data);\n // Defer update to next change detection cycle to avoid ExpressionChangedAfterItHasBeenCheckedError\n Promise.resolve().then(() => {\n this.updateAcademicYearDropdown();\n });\n } else {\n this.academicYears.set([]);\n }\n },\n error: (error) => {\n this.academicYears.set([]);\n }\n });\n }\n\n /**\n * Update financial year dropdown items\n */\n updateFinancialYearDropdown(): void {\n const years = this.financialYears();\n this.financialYearItems.set(years.map(year => {\n // Use correct field names: accyr_name, accyr_from_date, accyr_to_date\n const name = year.accyr_name;\n const fromDate = year.accyr_from_date;\n const toDate = year.accyr_to_date;\n \n // Build label with proper fallback\n let label = name;\n if (!label && fromDate && toDate) {\n // Format dates if they're Date objects\n const from = fromDate instanceof Date ? fromDate.toISOString().split('T')[0] : fromDate;\n const to = toDate instanceof Date ? toDate.toISOString().split('T')[0] : toDate;\n label = `${from} - ${to}`;\n } else if (!label && (fromDate || toDate)) {\n const date = fromDate || toDate;\n label = date instanceof Date ? date.toISOString().split('T')[0] : date || 'Financial Year';\n } else if (!label) {\n label = 'Financial Year';\n }\n \n // Add status indicators to label\n const statusIndicators: string[] = [];\n if (year.accyr_iscurrent) {\n statusIndicators.push('Current');\n }\n if (year.accyr_islocked) {\n statusIndicators.push('Locked');\n }\n \n const fullLabel = statusIndicators.length > 0 \n ? `${label} (${statusIndicators.join(', ')})`\n : label;\n \n return {\n id: year._id,\n label: fullLabel,\n icon: 'calendar_today',\n iconColor: 'tw-text-blue-500'\n } as DropdownItem;\n }));\n\n // Set current financial year (first active one or first in list)\n // Use correct field name: accyr_isactive\n const currentFY = years.find(year => year.accyr_isactive) || years[0];\n if (currentFY) {\n this.currentFinancialYear.set(currentFY);\n // Set display name with proper fallback\n const name = currentFY.accyr_name;\n const fromDate = currentFY.accyr_from_date;\n const toDate = currentFY.accyr_to_date;\n \n if (name) {\n this.currentFinancialYearName.set(name);\n } else if (fromDate && toDate) {\n const from = fromDate instanceof Date ? fromDate.toISOString().split('T')[0] : fromDate;\n const to = toDate instanceof Date ? toDate.toISOString().split('T')[0] : toDate;\n this.currentFinancialYearName.set(`${from} - ${to}`);\n } else {\n this.currentFinancialYearName.set('FY');\n }\n }\n }\n\n /**\n * Update academic year dropdown items\n */\n updateAcademicYearDropdown(): void {\n const years = this.academicYears();\n this.academicYearItems.set(years.map(year => {\n // Use correct field names: acayr_name, acayr_from_date, acayr_to_date\n const name = year.acayr_name;\n const fromDate = year.acayr_from_date;\n const toDate = year.acayr_to_date;\n \n // Build label with proper fallback\n let label = name;\n if (!label && fromDate && toDate) {\n label = `${fromDate} - ${toDate}`;\n } else if (!label && (fromDate || toDate)) {\n label = fromDate || toDate || 'Academic Year';\n } else if (!label) {\n label = 'Academic Year';\n }\n \n // Add status indicators to label\n const statusIndicators: string[] = [];\n if (year.acayr_iscurrent) {\n statusIndicators.push('Current');\n }\n if (year.acayr_islocked) {\n statusIndicators.push('Locked');\n }\n \n const fullLabel = statusIndicators.length > 0 \n ? `${label} (${statusIndicators.join(', ')})`\n : label;\n \n return {\n id: year._id,\n label: fullLabel,\n icon: 'school',\n iconColor: 'tw-text-green-500'\n } as DropdownItem;\n }));\n\n // Set current academic year (first active one or first in list)\n const currentAY = years.find(year => year.acayr_isactive) || years[0];\n if (currentAY) {\n this.currentAcademicYear.set(currentAY);\n // Set display name with proper fallback\n const name = currentAY.acayr_name;\n const fromDate = currentAY.acayr_from_date;\n const toDate = currentAY.acayr_to_date;\n \n if (name) {\n this.currentAcademicYearName.set(name);\n } else if (fromDate && toDate) {\n this.currentAcademicYearName.set(`${fromDate} - ${toDate}`);\n } else {\n this.currentAcademicYearName.set('AY');\n }\n } else if (years.length > 0) {\n // If no active year, set the first one\n const firstYear = years[0];\n this.currentAcademicYear.set(firstYear);\n const name = firstYear.acayr_name;\n const fromDate = firstYear.acayr_from_date;\n const toDate = firstYear.acayr_to_date;\n \n if (name) {\n this.currentAcademicYearName.set(name);\n } else if (fromDate && toDate) {\n this.currentAcademicYearName.set(`${fromDate} - ${toDate}`);\n } else {\n this.currentAcademicYearName.set('AY');\n }\n }\n }\n\n /**\n * Handle financial year dropdown item clicks\n */\n onFinancialYearClick(item: DropdownItem): void {\n const selectedYear = this.financialYears().find(year => year._id === item.id);\n if (selectedYear) {\n this.currentFinancialYear.set(selectedYear);\n // Set display name with proper fallback\n const name = selectedYear.accyr_name;\n const fromDate = selectedYear.accyr_from_date;\n const toDate = selectedYear.accyr_to_date;\n \n if (name) {\n this.currentFinancialYearName.set(name);\n } else if (fromDate && toDate) {\n const from = fromDate instanceof Date ? fromDate.toISOString().split('T')[0] : fromDate;\n const to = toDate instanceof Date ? toDate.toISOString().split('T')[0] : toDate;\n this.currentFinancialYearName.set(`${from} - ${to}`);\n } else {\n this.currentFinancialYearName.set('FY');\n }\n // TODO: Update app state or notify other components about the change\n }\n }\n\n /**\n * Handle academic year dropdown item clicks\n */\n onAcademicYearClick(item: DropdownItem): void {\n const selectedYear = this.academicYears().find(year => year._id === item.id);\n if (selectedYear) {\n this.currentAcademicYear.set(selectedYear);\n // Set display name with proper fallback\n const name = selectedYear.acayr_name;\n const fromDate = selectedYear.acayr_from_date;\n const toDate = selectedYear.acayr_to_date;\n \n if (name) {\n this.currentAcademicYearName.set(name);\n } else if (fromDate && toDate) {\n this.currentAcademicYearName.set(`${fromDate} - ${toDate}`);\n } else {\n this.currentAcademicYearName.set('AY');\n }\n // TODO: Update app state or notify other components about the change\n }\n }\n\n /**\n * Handle profile dropdown item clicks\n * @param item The clicked dropdown item\n */\n onProfileClick(item: DropdownItem): void {\n switch (item.id) {\n case 'profile':\n this.navigateToProfile();\n break;\n case 'settings':\n this.navigateToSettings();\n break;\n case 'theme':\n this.toggleTheme();\n // Update the label dynamically\n this.updateThemeMenuItem();\n break;\n case 'help':\n this.navigateToHelp();\n break;\n case 'logout':\n this.handleLogout();\n break;\n }\n }\n\n /**\n * Toggle dark mode theme\n */\n toggleTheme(): void {\n // Use the CIDE Element Library theme service for theme management\n // The service handles DOM manipulation, localStorage, and theme application\n this.themeService.toggleTheme();\n // Note: darkMode signal is automatically updated via the subscription in ngOnInit\n }\n\n /**\n * Update theme menu item label and icon based on current theme\n */\n updateThemeMenuItem(): void {\n const themeItem = this.profileItems.find(item => item.id === 'theme');\n if (themeItem) {\n themeItem.label = this.darkMode() ? 'Light Mode' : 'Dark Mode';\n themeItem.icon = this.darkMode() ? 'light_mode' : 'dark_mode';\n }\n }\n\n /**\n * Navigate to user profile page\n */\n private navigateToProfile(): void {\n // TODO: Implement profile navigation\n // this.router.navigate(['/profile']);\n }\n\n /**\n * Handle more options dropdown item clicks (DEPRECATED)\n * @param item The clicked dropdown item\n */\n onMoreOptionsClick(item: DropdownItem): void {\n switch (item.id) {\n case 'settings':\n this.navigateToSettings();\n break;\n case 'help':\n this.navigateToHelp();\n break;\n case 'logout':\n this.handleLogout();\n break;\n }\n }\n\n /**\n * Navigate to settings page\n */\n private navigateToSettings(): void {\n // TODO: Implement settings navigation\n // this.router.navigate(['/settings']);\n }\n\n /**\n * Navigate to help and support page\n */\n private navigateToHelp(): void {\n // TODO: Implement help navigation\n // this.router.navigate(['/help']);\n }\n\n /**\n * Handle user logout\n * Uses the auth service to sign out and navigate to login page\n */\n private handleLogout(): void {\n // Show confirmation dialog using cloud-ide-elements ConfirmationService\n this.confirmationService.ask({\n title: 'Confirm Logout',\n message: 'Are you sure you want to logout?',\n confirmText: 'Logout',\n cancelText: 'Cancel',\n type: 'warning',\n icon: 'logout'\n }).then((confirmed: boolean) => {\n if (confirmed) {\n try {\n // Use the auth service to sign out\n this.authService.signOut();\n\n // Navigate to login page\n this.router.navigate(['/auth/sign-in']).then(success => {\n if (!success) {\n // Fallback: reload the page to force navigation\n window.location.href = '/auth/sign-in';\n }\n }).catch(error => {\n // Fallback: reload the page to force navigation\n window.location.href = '/auth/sign-in';\n });\n } catch (error) {\n // Still try to navigate to login page even if logout fails\n this.router.navigate(['/auth/sign-in']);\n }\n }\n });\n }\n\n /**\n * Initialize audio context early to avoid browser autoplay restrictions\n */\n private initializeAudioContext(): void {\n // Initialize audio context on first user interaction\n const initAudio = () => {\n try {\n const AudioContextClass = window.AudioContext || (window as any).webkitAudioContext;\n if (AudioContextClass && !(window as any)._notificationAudioContext) {\n const audioContext = new AudioContextClass();\n // Resume to unlock audio (required for autoplay policy)\n if (audioContext.state === 'suspended') {\n audioContext.resume().then(() => {\n console.log('[Notifications] Audio context initialized and resumed');\n }).catch((error) => {\n console.warn('[Notifications] Failed to initialize audio context:', error);\n });\n }\n (window as any)._notificationAudioContext = audioContext;\n }\n } catch (error) {\n console.warn('[Notifications] Failed to initialize audio context:', error);\n }\n };\n\n // Try to initialize on any user interaction\n const events = ['click', 'touchstart', 'keydown'];\n const initOnce = () => {\n initAudio();\n // Remove listeners after first initialization\n events.forEach(event => {\n document.removeEventListener(event, initOnce);\n });\n };\n\n events.forEach(event => {\n document.addEventListener(event, initOnce, { once: true, passive: true });\n });\n }\n\n /**\n * Play notification sound based on user settings\n */\n playNotificationSound(): void {\n if (this.notificationSettingsService) {\n this.notificationSettingsService.playNotificationSound();\n }\n }\n\n /**\n * Open notification settings in floating container\n */\n async openNotificationSettings(): Promise<void> {\n // Ensure component is registered\n if (!this.floatingContainerService.isComponentRegistered('notification-settings')) {\n this.floatingContainerService.registerComponent('notification-settings', NotificationSettingsComponent);\n }\n\n const containerId = this.floatingContainerService.show({\n id: `notification-settings-${Date.now()}`,\n title: 'Notification Settings',\n icon: 'settings',\n width: '500px',\n height: '600px',\n minWidth: '400px',\n minHeight: '450px',\n maxWidth: '90vw',\n maxHeight: '90vh',\n resizable: true,\n draggable: true,\n closable: true,\n minimizable: true,\n maximizable: true,\n backdrop: false,\n componentId: 'notification-settings',\n componentConfig: {\n inputs: {},\n outputs: {}\n }\n });\n\n this.floatingContainerService.bringToFront(containerId);\n }\n}\n","<header id=\"cide-lyt-header-wrapper\" class=\"cide-lyt-header tw-w-full tw-select-none cide-lyt-header-wrapper-hide\">\n <!-- Logo Section -->\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"header-logo-container tw-flex tw-items-center tw-gap-3 tw-cursor-pointer\" (click)=\"onLogoClick()\"\n (keydown.enter)=\"onLogoClick()\" (keydown.space)=\"onLogoClick()\" tabindex=\"0\" role=\"button\"\n aria-label=\"Navigate to home\" title=\"Click to go to control panel home\">\n @if (appStateService.activeEntity()?.syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(appStateService.activeEntity()?.syen_photo_id_cyfm || '')\"\n [altText]=\"'Entity Logo'\" class=\"tw-w-8 tw-h-8 tw-object-contain\">\n } @else {\n <cide-ele-icon name=\"business\" class=\"tw-w-8 tw-h-8 tw-text-blue-600\"></cide-ele-icon>\n }\n\n </div>\n @if (appStateService.activeEntity()?.syen_name) {\n <span\n class=\"tw-text-md tw-font-semibold tw-text-blue-600 hover:tw-text-blue-800 tw-cursor-pointer sm:block tw-transition-colors tw-duration-200 hover:tw-underline\"\n (click)=\"onEntityNameClick()\" title=\"Click to switch entity\">\n {{ appStateService.activeEntity()?.syen_name }}\n </span>\n }\n </div>\n <!-- Search Section -->\n <div class=\"header-search-container\">\n <cide-ele-input id=\"cide_lyt_header_search\" placeholder=\"Search...\" leadingIcon=\"search\"\n size=\"md\"></cide-ele-input>\n </div>\n\n <!-- Icons Section -->\n <div class=\"header-icons-container\">\n <!-- Financial Year Dropdown -->\n <div class=\"header-dropdown-container\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-dropdown [items]=\"financialYearItems()\" [config]=\"financialYearConfig\"\n [triggerTemplate]=\"financialYearTriggerTemplate\"\n (itemClick)=\"onFinancialYearClick($event)\">\n </cide-ele-dropdown>\n <div class=\"header-tooltip\">Financial Year</div>\n </div>\n \n <ng-template #financialYearTriggerTemplate let-isOpen=\"isOpen\">\n <div class=\"header-year-pill\">\n <cide-ele-icon size=\"2xs\" type=\"none\" class=\"tw-mr-1\">calendar_today</cide-ele-icon>\n <span class=\"header-year-pill-text\">{{ currentFinancialYearName() }}</span>\n </div>\n </ng-template>\n\n <!-- Academic Year Dropdown -->\n <div class=\"header-dropdown-container\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-dropdown [items]=\"academicYearItems()\" [config]=\"academicYearConfig\"\n [triggerTemplate]=\"academicYearTriggerTemplate\"\n (itemClick)=\"onAcademicYearClick($event)\">\n </cide-ele-dropdown>\n <div class=\"header-tooltip\">Academic Year</div>\n </div>\n \n <ng-template #academicYearTriggerTemplate let-isOpen=\"isOpen\">\n <div class=\"header-year-pill\">\n <cide-ele-icon size=\"2xs\" type=\"none\" class=\"tw-mr-1\">school</cide-ele-icon>\n <span class=\"header-year-pill-text\">{{ currentAcademicYearName() }}</span>\n </div>\n </ng-template>\n\n <!-- Notifications Dropdown -->\n <div class=\"header-dropdown-container\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-dropdown \n #notificationDropdown\n [items]=\"notificationItems()\" \n [config]=\"notificationConfig\"\n [triggerTemplate]=\"notificationTriggerTemplate\"\n [menuTemplate]=\"notificationMenuTemplate\"\n (itemClick)=\"onNotificationClick($event)\">\n </cide-ele-dropdown>\n <div class=\"header-tooltip\">Notifications</div>\n </div>\n \n <ng-template #notificationTriggerTemplate let-isOpen=\"isOpen\">\n <div class=\"header-icon notification-icon\" [class.active]=\"isOpen\">\n <cide-ele-icon>notifications</cide-ele-icon>\n @if (unreadCount() > 0) {\n <div class=\"header-badge\">{{ unreadCount() > 99 ? '99+' : unreadCount() }}</div>\n }\n </div>\n </ng-template>\n\n <!-- Custom Notification Menu Template -->\n <ng-template #notificationMenuTemplate let-items=\"items\">\n <div class=\"tw-min-w-[380px] tw-bg-white dark:tw-bg-gray-800 tw-rounded-xl tw-shadow-2xl tw-overflow-hidden tw-text-gray-900 dark:tw-text-gray-100\">\n <!-- Header - Fixed/Sticky -->\n <div class=\"tw-sticky tw-top-0 tw-z-10 tw-px-2.5 tw-py-1 tw-bg-white dark:tw-bg-gray-800 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200 dark:tw-border-gray-700 tw-backdrop-blur-sm\">\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n <div class=\"tw-w-5 tw-h-5 tw-bg-blue-500 tw-rounded tw-flex tw-items-center tw-justify-center tw-shadow-sm\">\n <cide-ele-icon class=\"!tw-text-[10px] !tw-text-white\">notifications</cide-ele-icon>\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n <h3 class=\"tw-m-0 tw-text-[10px] tw-font-bold tw-text-gray-900 dark:tw-text-gray-100 tw-leading-none\">Notifications</h3>\n @if (unreadCount() > 0) {\n <span class=\"tw-bg-red-500 tw-text-white tw-px-1 tw-py-0 tw-rounded-full tw-text-[7px] tw-font-bold tw-leading-none tw-animate-pulse\">{{ unreadCount() }}</span>\n }\n </div>\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-0.5\">\n <button \n type=\"button\"\n class=\"tw-bg-transparent tw-border-none tw-p-0.5 tw-cursor-pointer tw-text-gray-600 dark:tw-text-gray-400 tw-flex tw-items-center tw-justify-center tw-rounded tw-transition-all tw-duration-200 hover:tw-bg-gray-100 dark:hover:tw-bg-gray-600 hover:tw-text-gray-900 dark:hover:tw-text-gray-200\"\n (click)=\"openNotificationSettings(); $event.stopPropagation()\"\n title=\"Notification Settings\">\n <cide-ele-icon class=\"!tw-text-xs\">settings</cide-ele-icon>\n </button>\n @if (unreadCount() > 0) {\n <button \n type=\"button\"\n class=\"tw-bg-blue-500 tw-text-white tw-px-1 tw-py-0.5 tw-rounded tw-text-[8px] tw-font-semibold tw-cursor-pointer tw-transition-all tw-duration-200 tw-flex tw-items-center tw-gap-0.5 tw-shadow-sm hover:tw-bg-blue-600 hover:tw-scale-105\"\n (click)=\"markAllAsRead(); $event.stopPropagation()\"\n title=\"Mark all as read\">\n <cide-ele-icon class=\"!tw-text-[9px]\">done_all</cide-ele-icon>\n </button>\n }\n <button \n type=\"button\" \n class=\"tw-bg-transparent tw-border-none tw-p-0.5 tw-cursor-pointer tw-text-gray-600 dark:tw-text-gray-400 tw-flex tw-items-center tw-justify-center tw-rounded tw-transition-all tw-duration-200 hover:tw-bg-gray-100 dark:hover:tw-bg-gray-600 hover:tw-text-gray-900 dark:hover:tw-text-gray-200 hover:tw-rotate-90\"\n (click)=\"closeNotificationDropdown($event)\"\n title=\"Close\">\n <cide-ele-icon class=\"!tw-text-xs\">close</cide-ele-icon>\n </button>\n </div>\n </div>\n\n <!-- Notifications List -->\n <div class=\"tw-overflow-x-hidden notification-scroll-container tw-bg-white dark:tw-bg-gray-800 tw-text-gray-900 dark:tw-text-gray-100\">\n @if (notifications().length === 0) {\n <div class=\"tw-py-16 tw-px-4 tw-text-center tw-bg-white dark:tw-bg-gray-800\">\n <cide-ele-icon class=\"!tw-text-6xl !tw-text-gray-300 dark:!tw-text-gray-600 tw-mb-3\">notifications_off</cide-ele-icon>\n <p class=\"tw-m-0 tw-text-sm tw-text-gray-600 dark:tw-text-gray-400 tw-font-medium\">No notifications yet</p>\n <p class=\"tw-m-0 tw-mt-1 tw-text-xs tw-text-gray-500 dark:tw-text-gray-500\">You're all caught up!</p>\n </div>\n } @else {\n @for (notif of notifications().slice(0, 15); track notif.id) {\n <div \n class=\"tw-flex tw-items-start tw-px-3 tw-py-2 tw-cursor-pointer tw-transition-all tw-duration-300 tw-relative tw-gap-2 tw-border-b tw-border-gray-200 dark:tw-border-gray-700 last:tw-border-b-0 hover:tw-bg-gray-50 dark:hover:tw-bg-gray-700 tw-transform tw-ease-in-out tw-bg-white dark:tw-bg-gray-800 tw-text-gray-900 dark:tw-text-gray-100\"\n [class.tw-border-l-2]=\"!isNotificationRead(notif)\"\n [class.tw-border-l-blue-500]=\"!isNotificationRead(notif)\"\n [class.dark:tw-border-l-blue-400]=\"!isNotificationRead(notif)\"\n [class.tw-bg-blue-50]=\"!isNotificationRead(notif)\"\n [class.dark:tw-bg-gray-700]=\"!isNotificationRead(notif)\"\n [class.-tw-translate-x-full]=\"isNotificationAnimating(notif)\"\n [class.tw-opacity-0]=\"isNotificationAnimating(notif)\"\n [class.tw-max-h-0]=\"isNotificationAnimating(notif)\"\n [class.tw-overflow-hidden]=\"isNotificationAnimating(notif)\"\n [class.tw-mb-0]=\"isNotificationAnimating(notif)\"\n [class.tw-p-0]=\"isNotificationAnimating(notif)\"\n (click)=\"onNotificationItemClick(notif)\">\n <!-- Icon/Avatar -->\n <div class=\"tw-flex-shrink-0 tw-relative\">\n <div class=\"tw-w-9 tw-h-9 tw-rounded-full tw-overflow-hidden tw-bg-gradient-to-br tw-from-blue-500 tw-to-blue-600 tw-flex tw-items-center tw-justify-center tw-shadow-sm tw-ring-1 tw-ring-white\">\n @if (getNotificationAvatar(notif)) {\n <img \n cideEleFileImage \n [fileId]=\"getNotificationAvatar(notif) || ''\"\n [altText]=\"getNotificationName(notif)\"\n class=\"tw-w-full tw-h-full tw-object-cover\">\n } @else {\n <cide-ele-icon class=\"!tw-text-base !tw-text-white\">{{ getNotificationIcon(notif.type) }}</cide-ele-icon>\n }\n </div>\n <!-- Green online indicator -->\n <div class=\"tw-absolute tw-bottom-0 tw-right-0 tw-w-2 tw-h-2 tw-bg-green-500 tw-rounded-full tw-border tw-border-white\"></div>\n </div>\n\n <!-- Content -->\n <div class=\"tw-flex-1 tw-min-w-0\">\n <!-- Title and relative time -->\n <div class=\"tw-flex tw-items-start tw-justify-between tw-gap-1.5 tw-mb-0.5\">\n <div class=\"tw-flex-1 tw-min-w-0\">\n <h4 class=\"tw-m-0 tw-text-[11px] tw-font-bold tw-text-gray-900 dark:tw-text-gray-100 tw-leading-tight\">\n <span class=\"tw-text-blue-600 dark:tw-text-blue-400\">{{ getNotificationName(notif) }}</span><span class=\"tw-font-normal tw-text-gray-800 dark:tw-text-gray-300\"> {{ getNotificationAction(notif) }}</span>\n </h4>\n <p class=\"tw-m-0 tw-text-[9px] tw-text-gray-500 dark:tw-text-gray-500 tw-mt-0.5\">{{ getTimeAgo(notif.timestamp) }}</p>\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-flex-shrink-0\">\n @if (!isNotificationRead(notif)) {\n <div class=\"tw-w-1.5 tw-h-1.5 tw-rounded-full tw-bg-blue-500 dark:tw-bg-blue-400 tw-animate-pulse\"></div>\n }\n @if (isNotificationAnimating(notif) && isNotificationUndoable(notif)) {\n <button \n type=\"button\"\n (click)=\"undoNotificationRemoval(getNotificationId(notif)); $event.stopPropagation()\"\n class=\"tw-px-2 tw-py-0.5 tw-text-[9px] tw-font-semibold tw-text-blue-600 dark:tw-text-blue-400 tw-bg-blue-50 dark:tw-bg-blue-900 tw-border tw-border-blue-200 dark:tw-border-blue-700 tw-rounded-md tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-bg-blue-100 dark:hover:tw-bg-blue-800 hover:tw-border-blue-300 dark:hover:tw-border-blue-600 hover:tw-scale-105 tw-whitespace-nowrap tw-animate-pulse\">\n Undo\n </button>\n }\n </div>\n </div>\n \n <!-- Message -->\n @if (notif.message && notif.message !== notif.title) {\n <p class=\"tw-m-0 tw-mt-1 tw-text-[10px] tw-text-gray-700 dark:tw-text-gray-400 tw-leading-snug tw-line-clamp-2\">\n {{ notif.message }}\n </p>\n }\n \n <!-- Comment -->\n @if (notif.data?.comment) {\n <div class=\"tw-mt-1.5 tw-py-1.5 tw-px-2.5 tw-bg-gray-100 dark:tw-bg-gray-700 tw-rounded-md tw-border-l-2 tw-border-l-blue-500 dark:tw-border-l-blue-500\">\n <p class=\"tw-m-0 tw-text-[10px] tw-text-gray-800 dark:tw-text-gray-300 tw-leading-snug tw-italic tw-line-clamp-2\">{{ notif.data.comment }}</p>\n </div>\n }\n \n <!-- File -->\n @if (notif.data?.file) {\n <div class=\"tw-mt-1.5 tw-py-1.5 tw-px-2.5 tw-bg-gray-100 dark:tw-bg-gray-700 tw-border tw-border-gray-300 dark:tw-border-gray-600 tw-rounded-md tw-flex tw-items-center tw-gap-2\">\n <div class=\"tw-w-7 tw-h-7 tw-bg-blue-100 dark:tw-bg-blue-900 tw-rounded-md tw-flex tw-items-center tw-justify-center tw-flex-shrink-0\">\n <span class=\"tw-text-[9px] tw-font-bold tw-text-blue-700 dark:tw-text-blue-300\">{{ getFileIcon(notif.data.file.type) }}</span>\n </div>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <p class=\"tw-m-0 tw-text-[10px] tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100 tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap\">{{ notif.data.file.name }}</p>\n <p class=\"tw-m-0 tw-text-[9px] tw-text-gray-600 dark:tw-text-gray-400\">{{ notif.data.file.size }}</p>\n </div>\n <cide-ele-icon class=\"!tw-text-sm !tw-text-blue-600 dark:!tw-text-blue-400 tw-cursor-pointer tw-transition-all tw-duration-200 tw-flex-shrink-0 hover:tw-text-blue-700 dark:hover:tw-text-blue-300 hover:tw-scale-110\">download</cide-ele-icon>\n </div>\n }\n \n <!-- Action Buttons -->\n @if (notif.action_label) {\n <div class=\"tw-mt-1.5 tw-flex tw-gap-1.5\">\n @if (notif.action_label.toLowerCase().includes('decline')) {\n <button type=\"button\" class=\"tw-py-1 tw-px-3 tw-border tw-border-gray-300 dark:tw-border-gray-600 tw-bg-white dark:tw-bg-gray-800 tw-rounded-md tw-text-[10px] tw-font-semibold tw-cursor-pointer tw-transition-all tw-duration-200 tw-text-gray-800 dark:tw-text-gray-300 hover:tw-bg-gray-100 dark:hover:tw-bg-gray-700 hover:tw-border-gray-400 dark:hover:tw-border-gray-500 hover:tw-scale-105\">Decline</button>\n }\n @if (notif.action_label.toLowerCase().includes('accept')) {\n <button type=\"button\" class=\"tw-py-1 tw-px-3 tw-border tw-border-blue-600 dark:tw-border-blue-500 tw-bg-blue-600 dark:tw-bg-blue-500 tw-rounded-md tw-text-[10px] tw-font-semibold tw-cursor-pointer tw-transition-all tw-duration-200 tw-text-white hover:tw-bg-blue-700 dark:hover:tw-bg-blue-600 hover:tw-border-blue-700 dark:hover:tw-border-blue-600 hover:tw-scale-105\">Accept</button>\n }\n </div>\n }\n </div>\n </div>\n }\n }\n </div>\n\n </div>\n </ng-template>\n\n <div class=\"header-divider\"></div>\n\n <!-- Profile with Dropdown -->\n <div class=\"header-icon user-profile\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-dropdown [items]=\"profileItems\" [config]=\"profileConfig\"\n [triggerTemplate]=\"triggerTemplate\"\n (itemClick)=\"onProfileClick($event)\">\n <ng-template #triggerTemplate>\n @if (appStateService.currentUser()?.user_photo_id_cyfm) {\n <div class=\"profile-avatar\">\n <img cideEleFileImage [fileId]=\"(appStateService.currentUser()?.user_photo_id_cyfm || '')\"\n [altText]=\"'User Profile Photo'\" class=\"tw-w-full tw-h-full tw-object-cover tw-rounded-full\">\n </div>\n } @else {\n <div class=\"profile-avatar\">\n <cide-ele-icon name=\"person\" class=\"tw-w-6 tw-h-6 tw-text-white\"></cide-ele-icon>\n </div>\n }\n </ng-template>\n </cide-ele-dropdown>\n <div class=\"header-tooltip\">My Account</div>\n </div>\n </div>\n</header>","import { Injectable, signal, computed } from '@angular/core';\r\nimport { BehaviorSubject, interval } from 'rxjs';\r\n\r\nexport type UserStatus = 'online' | 'offline' | 'away' | 'busy' | 'do-not-disturb';\r\n\r\nexport interface UserStatusData {\r\n status: UserStatus;\r\n lastActive: Date;\r\n message?: string;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytUserStatusService {\r\n // Modern Angular Signals pattern\r\n private _userStatus = signal<UserStatusData>({\r\n status: 'online',\r\n lastActive: new Date(),\r\n message: undefined\r\n });\r\n\r\n // Public readonly access to status\r\n public readonly userStatus = this._userStatus.asReadonly();\r\n\r\n // Computed properties\r\n public readonly isOnline = computed(() => this._userStatus().status !== 'offline');\r\n public readonly statusColor = computed(() => this.getStatusColor(this._userStatus().status));\r\n public readonly statusText = computed(() => this.getStatusText(this._userStatus().status));\r\n\r\n // Legacy observable for compatibility\r\n private statusSubject = new BehaviorSubject<UserStatusData>(this._userStatus());\r\n public readonly status$ = this.statusSubject.asObservable();\r\n\r\n // Auto-away functionality\r\n private lastActivityTime = Date.now();\r\n private autoAwayTimeout = 5 * 60 * 1000; // 5 minutes\r\n private autoAwayEnabled = true;\r\n\r\n constructor() {\r\n this.initializeActivityTracking();\r\n this.startAutoAwayTimer();\r\n }\r\n\r\n /**\r\n * Sets the user status\r\n * @param status The new status to set\r\n * @param message Optional custom status message\r\n */\r\n setStatus(status: UserStatus, message?: string): void {\r\n const statusData: UserStatusData = {\r\n status,\r\n lastActive: new Date(),\r\n message\r\n };\r\n \r\n this._userStatus.set(statusData);\r\n this.statusSubject.next(statusData);\r\n this.lastActivityTime = Date.now();\r\n }\r\n\r\n /**\r\n * Marks user as active (resets away timer)\r\n */\r\n markUserActive(): void {\r\n this.lastActivityTime = Date.now();\r\n \r\n // If user was away, bring them back to online\r\n if (this._userStatus().status === 'away') {\r\n this.setStatus('online');\r\n }\r\n }\r\n\r\n /**\r\n * Gets CSS class for status color\r\n */\r\n private getStatusColor(status: UserStatus): string {\r\n switch (status) {\r\n case 'online': return 'tw-bg-green-500';\r\n case 'away': return 'tw-bg-yellow-500';\r\n case 'busy': return 'tw-bg-orange-500';\r\n case 'do-not-disturb': return 'tw-bg-red-500';\r\n case 'offline': return 'tw-bg-gray-400';\r\n default: return 'tw-bg-gray-400';\r\n }\r\n }\r\n\r\n /**\r\n * Gets human-readable status text\r\n */\r\n private getStatusText(status: UserStatus): string {\r\n const current = this._userStatus();\r\n const baseText = this.getBaseStatusText(status);\r\n \r\n return current.message ? `${baseText} - ${current.message}` : baseText;\r\n }\r\n\r\n private getBaseStatusText(status: UserStatus): string {\r\n switch (status) {\r\n case 'online': return 'Online';\r\n case 'away': return 'Away';\r\n case 'busy': return 'Busy';\r\n case 'do-not-disturb': return 'Do not disturb';\r\n case 'offline': return 'Offline';\r\n default: return 'Unknown';\r\n }\r\n }\r\n\r\n /**\r\n * Initialize activity tracking for auto-away\r\n */\r\n private initializeActivityTracking(): void {\r\n if (typeof window === 'undefined') return;\r\n\r\n const events = ['mousedown', 'mousemove', 'keypress', 'scroll', 'touchstart', 'click'];\r\n \r\n events.forEach(event => {\r\n document.addEventListener(event, () => {\r\n this.markUserActive();\r\n }, { passive: true });\r\n });\r\n }\r\n\r\n /**\r\n * Start the auto-away timer\r\n */\r\n private startAutoAwayTimer(): void {\r\n if (!this.autoAwayEnabled) return;\r\n\r\n interval(30000).subscribe({\r\n next: () => { // Check every 30 seconds\r\n const now = Date.now();\r\n const timeSinceActivity = now - this.lastActivityTime;\r\n \r\n if (timeSinceActivity > this.autoAwayTimeout && \r\n this._userStatus().status === 'online') {\r\n this.setStatus('away', 'Auto-away due to inactivity');\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Enable or disable auto-away functionality\r\n */\r\n setAutoAwayEnabled(enabled: boolean): void {\r\n this.autoAwayEnabled = enabled;\r\n }\r\n\r\n /**\r\n * Set the auto-away timeout (in milliseconds)\r\n */\r\n setAutoAwayTimeout(timeout: number): void {\r\n this.autoAwayTimeout = timeout;\r\n }\r\n} ","import { Component, ElementRef, HostListener, OnInit, inject, effect, ChangeDetectionStrategy, input, signal } from '@angular/core';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { menuResponseData } from 'cloud-ide-lms-model';\nimport { CommonModule } from '@angular/common';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { filter } from 'rxjs/operators';\nimport { CideLytSidebarService } from '../sidebar.service';\nimport {\n CideEleResizerDirective, CideIconComponent, CideInputComponent, TooltipDirective,\n CideSpinnerComponent, CideThemeService\n} from 'cloud-ide-element';\nimport { AppStateHelperService } from '../../../services/app-state';\nimport { CideLytUserStatusService, type UserStatus } from '../../../services/user-status/user-status.service';\n\n@Component({\n selector: 'cide-lyt-sidebar-wrapper',\n imports: [CideIconComponent, CideInputComponent, CommonModule, CideEleResizerDirective, TooltipDirective, CideSpinnerComponent],\n templateUrl: './sidebar-wrapper.component.html',\n styleUrls: ['./sidebar-wrapper.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('slideInOut', [\n state('in', style({\n opacity: 1,\n transform: 'translateY(0)',\n height: '*'\n })),\n state('out', style({\n opacity: 0,\n transform: 'translateY(-10px)',\n height: '0px'\n })),\n transition('in => out', animate('200ms ease-in')),\n transition('out => in', animate('200ms ease-out'))\n ]),\n trigger('notificationRemove', [\n state('visible', style({\n opacity: 1,\n transform: 'translateX(0)',\n height: '*',\n marginBottom: '*',\n padding: '*'\n })),\n state('removing', style({\n opacity: 0,\n transform: 'translateX(-100%)',\n height: '0px',\n marginBottom: '0px',\n padding: '0px',\n overflow: 'hidden'\n })),\n transition('visible => removing', animate('300ms ease-in-out')),\n transition('* => visible', animate('200ms ease-out'))\n ])\n ]\n})\nexport class CideLytSidebarWrapperComponent implements OnInit {\n public sidebarSetupData = {\n cide_lyt_sidebar_width: 0\n };\n\n isCollapsed = signal(false);\n darkMode = signal(false);\n showUserMenu = signal(false);\n showOptions = signal(false);\n showNotifications = signal(false);\n showNotificationsPanel = signal(false);\n searchText = signal('');\n isExpanded = signal(true);\n searchResults = signal<{ icon: string, title: string }[]>([]);\n \n // Notifications management\n notifications = signal<Array<{\n id: string;\n icon: string;\n title: string;\n message: string;\n time: string;\n unread: boolean;\n state: 'visible' | 'removing';\n }>>([\n {\n id: '1',\n icon: 'notifications',\n title: 'New feature available',\n message: 'Try our new analytics dashboard with improved visualizations.',\n time: 'Just now',\n unread: true,\n state: 'visible'\n },\n {\n id: '2',\n icon: 'person_add',\n title: 'New team member',\n message: 'Jane Smith has joined your team.',\n time: '2 hours ago',\n unread: false,\n state: 'visible'\n }\n ]);\n\n // Collapsed section states tracking\n collapsedSections: { [key: string]: boolean } = {\n 'company': false,\n 'account': false,\n 'advanced': false,\n 'recent': false\n };\n\n // Track expanded state for menu sections\n expandedSections = signal<{ [key: string]: boolean }>({});\n\n // For scroll-based animation\n animateSections = signal([false, false, false, false, false]);\n lastScrollTop = 0;\n scrolledPast = signal([false, false, false, false, false]);\n public core_system_menu = signal<menuResponseData[]>([]);\n public core_system_module = signal<menuResponseData[]>([]);\n\n // Track active state for enhanced visual effects\n activeModuleId: string = '';\n hoverModuleId: string = '';\n animateItems = signal(false);\n moduleLoadComplete = signal(false);\n menuLoadComplete = signal(false);\n loadingMenus = signal(false);\n\n // Add this getter to retrieve the menu tree for the selected module\n get selectedModuleMenus(): menuResponseData[] {\n return this.core_system_menu() || [];\n }\n\n /**\n * Gets the CSS classes for the user status indicator\n * Uses the injected user status service\n */\n getUserStatusClass(): string {\n return this.userStatusService.statusColor();\n }\n\n /**\n * Gets the tooltip text for the user status\n * Uses the injected user status service\n */\n getUserStatusText(): string {\n return this.userStatusService.statusText();\n }\n\n /**\n * Sets the user status (delegates to service)\n * @param status The new status to set\n * @param message Optional custom status message\n */\n setUserStatus(status: UserStatus, message?: string): void {\n this.userStatusService.setStatus(status, message);\n }\n\n /**\n * Gets the current user status data\n */\n get currentUserStatus() {\n return this.userStatusService.userStatus();\n }\n\n /**\n * Gets the icon for the currently active module\n * @returns The icon name for the active module or a default icon\n */\n getActiveModuleIcon(): string {\n if (this.core_system_module() && this.core_system_module().length > 0 && this.activeModuleId) {\n const activeModule = this.core_system_module().find(m => m._id === this.activeModuleId);\n return activeModule?.syme_icon || 'dashboard';\n }\n return 'dashboard';\n }\n\n // Add a click handler for menu navigation\n onMenuClick(menu: menuResponseData, event?: Event) {\n // Prevent event propagation to avoid triggering parent click handlers\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n \n if (menu.syme_path) {\n // Navigate without reloading the menu - just route navigation\n // The menu should not reload unless the module actually changes\n this.router.navigate([`/control-panel/${menu.syme_path}`]).catch(err => {\n console.error('Navigation error:', err);\n });\n }\n }\n\n /**\n * Toggle section expand/collapse state\n */\n toggleSection(sectionId: string): void {\n const map = { ...this.expandedSections() };\n map[sectionId] = !map[sectionId];\n this.expandedSections.set(map);\n console.log('📂 SIDEBAR: Section', sectionId, 'expanded:', this.expandedSections()[sectionId]);\n }\n\n /**\n * Check if section is expanded\n */\n isSectionExpanded(sectionId: string): boolean {\n return this.expandedSections()[sectionId] ?? true; // Default to expanded\n }\n\n private sidebarService = inject(CideLytSidebarService);\n private elementRef = inject(ElementRef);\n public appState = inject(AppStateHelperService);\n private router = inject(Router);\n protected userStatusService = inject(CideLytUserStatusService);\n private themeService = inject(CideThemeService);\n\n constructor() {\n // React to active module changes using signal effects\n effect(() => {\n const activeModule = this.appState.activeModule();\n if (activeModule) {\n // Only load menus if the module ID actually changed\n if (this.activeModuleId !== activeModule._id) {\n console.log('🔄 SIDEBAR: Active module changed from', this.activeModuleId, 'to', activeModule._id);\n // Update local state when active module changes\n this.activeModuleId = activeModule._id;\n // Load menus only when module actually changed\n this.loadMenusForModule(activeModule);\n } else {\n console.log('⏭️ SIDEBAR: Active module unchanged, skipping menu reload');\n }\n }\n });\n\n // Subscribe to router events to prevent unwanted module changes on navigation\n // Only listen to NavigationEnd events to avoid triggering on every navigation event\n this.router.events.pipe(\n filter(event => event instanceof NavigationEnd)\n ).subscribe((event: NavigationEnd) => {\n // Don't trigger module change on menu navigation - only on actual module selection\n // The active module should only change when user explicitly clicks a module icon\n console.log('📍 SIDEBAR: Navigation ended to', event.url, '- not changing active module');\n });\n }\n\n ngOnInit() {\n // Initialize dark mode from localStorage\n if (typeof document !== 'undefined' && typeof localStorage !== 'undefined') {\n const isDarkMode = localStorage.getItem('cide-dark-mode') === 'true';\n this.darkMode.set(isDarkMode);\n \n if (isDarkMode) {\n const root = document.documentElement;\n const body = document.body;\n root.setAttribute('data-theme', 'dark');\n root.classList.add('dark-mode');\n body.setAttribute('data-theme', 'dark');\n body.classList.add('dark-mode');\n }\n }\n\n // Modern ES2022+ pattern: Use Promise-based delays instead of nested setTimeout\n const initializeAnimations = async () => {\n await new Promise(resolve => setTimeout(resolve, 100));\n this.animateItems.set(true);\n await new Promise(resolve => setTimeout(resolve, 200));\n this.animateSections.set([true, true, true, true, true]);\n };\n initializeAnimations();\n\n // Get sidebar menu data with loading state tracking\n this.sidebarService?.getSidebarMenues({ syme_type: \"module\", sort: 'asc', syme_title: \"\" })?.subscribe({\n next: (res) => {\n this.core_system_module.set(res?.data || []);\n\n // Handle module initialization and active module setup\n if (this.core_system_module().length > 0) {\n const activeModule = this.appState.activeModule();\n console.log('🔍 SIDEBAR: Modules loaded. Current active module:', activeModule?.syme_title || 'none');\n console.log('📊 SIDEBAR: Available modules:', this.core_system_module().map(m => m.syme_title).join(', '));\n\n if (activeModule) {\n // Active module exists, verify it's in the loaded modules\n const foundModule = this.core_system_module().find(m => m._id === activeModule._id);\n if (foundModule) {\n console.log('✅ SIDEBAR: Active module found in loaded modules:', foundModule.syme_title);\n // The effect should have already triggered, but ensure menus are loaded\n if (this.core_system_menu().length === 0) {\n console.log('🔄 SIDEBAR: No menus loaded yet, triggering load for active module');\n this.loadMenusForModule(activeModule);\n }\n } else {\n console.log('⚠️ SIDEBAR: Active module not found in loaded modules, setting first as active');\n this.setActiveMenuByIndex(0);\n }\n } else {\n console.log('📌 SIDEBAR: No active module, setting first module as active');\n this.setActiveMenuByIndex(0);\n }\n }\n\n // Modern ES2022+ pattern: Use Promise-based delay\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\n delay(300).then(() => {\n this.moduleLoadComplete.set(true);\n });\n },\n error: (err) => {\n console.error('Error loading sidebar modules:', err);\n this.moduleLoadComplete.set(true); // Set to true even on error to ensure UI is responsive\n }\n });\n\n // collecte the width of the sidebar by using the style property\n const cide_lyt_stack_wrapper_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-stack-wrapper-width'));\n const cide_lyt_sidebar_menu_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-sidebar-menu-width'));\n\n this.sidebarSetupData.cide_lyt_sidebar_width = (cide_lyt_stack_wrapper_width + cide_lyt_sidebar_menu_width);\n }\n\n /**\n * Load menus for a specific module\n * @param module The module to load menus for\n */\n loadMenusForModule(module: menuResponseData): void {\n if (!module?._id) {\n console.warn('🚫 SIDEBAR: Cannot load menus - no module ID provided');\n return;\n }\n\n console.log('📂 SIDEBAR: Loading menus for module:', module.syme_title, 'ID:', module._id);\n this.loadingMenus.set(true);\n this.menuLoadComplete.set(false);\n\n // Fetch menus for the selected module\n this.sidebarService?.getSidebarMenues({\n syme_id: module._id,\n sort: 'asc'\n })?.subscribe({\n next: (res) => {\n const menus = res?.data || [];\n this.core_system_menu.set(menus);\n this.loadingMenus.set(false);\n\n console.log('✅ SIDEBAR: Loaded', menus, 'menus for module:', module.syme_title);\n console.log('📋 SIDEBAR: Menu titles:', menus.map(m => m.syme_title).join(', '));\n\n // Modern ES2022+ pattern: Use Promise-based delay\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\n delay(200).then(() => {\n this.menuLoadComplete.set(true);\n console.log('🎯 SIDEBAR: Menu loading complete for:', module.syme_title);\n });\n },\n error: (err) => {\n console.error('❌ SIDEBAR: Error loading menus for module:', module.syme_title, err);\n this.core_system_menu.set([]);\n this.loadingMenus.set(false);\n this.menuLoadComplete.set(true);\n }\n });\n }\n\n toggleSidebar() {\n this.isCollapsed.set(!this.isCollapsed());\n\n // Add animation class\n const sidebarElement = this.elementRef.nativeElement.querySelector('.cide-lyt-sidebar');\n sidebarElement.classList.add('animating');\n\n // Remove animation class after animation completes\n // Modern ES2022+ pattern: Use Promise-based delay\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\n delay(300).then(() => {\n sidebarElement.classList.remove('animating');\n });\n\n // this.sidebarService.toggleSidebar();\n }\n\n toggleUserMenu() {\n this.showUserMenu.set(!this.showUserMenu());\n // Close other menus if open\n if (this.showUserMenu()) {\n this.showOptions.set(false);\n this.showNotifications.set(false);\n }\n\n // Add subtle animation when opening menu\n if (this.showUserMenu()) {\n this.animateMenuOpen('user-menu');\n }\n }\n\n /**\n * Sets the active menu item with animation\n * @param moduleId The ID of the module to set as active\n * @param event Optional click event to prevent propagation\n */\n setActiveMenu(moduleId: string, event?: Event): void {\n // Prevent event propagation to avoid triggering unwanted side effects\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n if (this.activeModuleId === moduleId) return;\n\n // Set the active module in app state - the effect will handle local state updates\n const selectedModule = this.core_system_module().find((m: any) => m._id === moduleId);\n if (selectedModule) {\n this.appState.setActiveModule(selectedModule);\n // The effect will automatically update this.activeModuleId and load menus\n }\n\n // You could trigger custom animations here\n }\n\n /**\n * Sets the active menu item by index with animation\n * @param index The index of the menu item\n */\n setActiveMenuByIndex(index: number): void {\n const selectedModule = this.core_system_module()[index];\n if (selectedModule) {\n this.appState.setActiveModule(selectedModule);\n // The effect will automatically update this.activeModuleId and load menus\n }\n }\n\n /**\n * Public method to set active module by ID from external components\n * This is useful when you want to programmatically set the active module\n * @param moduleId The ID of the module to set as active\n * @returns boolean indicating if the module was found and set as active\n */\n public setActiveModuleById(moduleId: string): boolean {\n const module = this.core_system_module().find((m: any) => m._id === moduleId);\n if (module) {\n this.setActiveMenu(moduleId);\n return true;\n }\n console.warn(`Module with ID \"${moduleId}\" not found in sidebar modules`);\n return false;\n }\n\n /**\n * Public method to get the currently active module ID\n * @returns The ID of the currently active module, or empty string if none\n */\n public getActiveModuleId(): string {\n return this.activeModuleId;\n }\n\n /**\n * Tracks hover state for enhanced visual feedback\n * @param moduleId The ID of the hovered module, or empty string for none\n */\n onItemHover(moduleId: string): void {\n this.hoverModuleId = moduleId;\n }\n\n /**\n * Adds subtle animations when opening dropdown menus\n * @param menuId The ID of the menu element\n */\n animateMenuOpen(menuId: string): void {\n const menuElement = this.elementRef.nativeElement.querySelector(`.${menuId}`);\n if (!menuElement) return;\n\n // First set initial state\n menuElement.style.opacity = '0';\n menuElement.style.transform = 'translateY(-8px) scale(0.95)';\n\n // Then animate to final state\n setTimeout(() => {\n menuElement.style.transition = 'opacity 0.2s ease, transform 0.2s ease';\n menuElement.style.opacity = '1';\n menuElement.style.transform = 'translateY(0) scale(1)';\n }, 10);\n }\n\n /**\n * Updates tooltip position for more accurate placement\n * @param event MouseEvent from hovering\n * @param tooltip The tooltip element\n */\n updateTooltipPosition(event: MouseEvent, tooltipIndex: number): void {\n const tooltip = this.elementRef.nativeElement.querySelectorAll('.nav-tooltip')[tooltipIndex];\n if (!tooltip) return;\n\n // Get the vertical position of the cursor\n const cursorY = event.clientY;\n\n // Set the tooltip position to match the cursor Y position\n tooltip.style.top = `${cursorY}px`;\n\n // Add a slight animation\n tooltip.style.transition = 'opacity 0.2s ease, transform 0.2s ease';\n tooltip.style.transform = 'translateY(-50%)';\n }\n\n toggleNotificationsPanel() {\n this.showNotificationsPanel.set(!this.showNotificationsPanel());\n this.showNotifications.set(this.showNotificationsPanel());\n // Close other menus if open\n if (this.showNotificationsPanel()) {\n this.showUserMenu.set(false);\n this.showOptions.set(false);\n }\n\n // Add animation when opening panel\n if (this.showNotificationsPanel()) {\n this.animateMenuOpen('notifications-panel');\n }\n }\n\n toggleTheme() {\n // Use the CIDE Element Library theme service for theme management\n // The service handles DOM manipulation, localStorage, and theme application\n this.themeService.toggleTheme();\n // Update local darkMode signal\n this.darkMode.set(this.themeService.isDarkMode());\n }\n\n toggleOptions() {\n this.showOptions.set(!this.showOptions());\n // Close other menus if open\n if (this.showOptions()) {\n this.showUserMenu.set(false);\n this.showNotifications.set(false);\n }\n\n // Add subtle animation when opening menu\n if (this.showOptions()) {\n this.animateMenuOpen('options-menu');\n }\n }\n\n /**\n * Toggle old-style collapsed sections (for backwards compatibility)\n */\n toggleCollapsedSection(section: string) {\n this.collapsedSections[section] = !this.collapsedSections[section];\n }\n\n isSectionCollapsed(section: string): boolean {\n return this.collapsedSections[section];\n }\n\n onSearchTextChange(value: any): void {\n this.searchText.set(String(value || ''));\n }\n\n onSearch() {\n // Reset animation trigger when searching\n this.resetAnimations();\n\n // Mock search functionality - would be integrated with actual search service\n if (this.searchText().trim() === '') {\n this.searchResults.set([]);\n return;\n }\n\n // Example search results - would come from actual data source\n const allItems = [\n { icon: 'settings', title: 'General Settings' },\n { icon: 'payments', title: 'Billing & Payments' },\n { icon: 'shield', title: 'Security Settings' },\n { icon: 'person', title: 'Profile Settings' },\n { icon: 'notifications', title: 'Notification Preferences' },\n { icon: 'integration_instructions', title: 'API Integrations' },\n { icon: 'key', title: 'API Keys' },\n { icon: 'groups', title: 'Team Members' },\n { icon: 'devices', title: 'Connected Devices' },\n { icon: 'language', title: 'Language Settings' },\n ];\n\n // Simple text search on title\n this.searchResults.set(\n allItems.filter(item => item.title.toLowerCase().includes(this.searchText().toLowerCase()))\n );\n }\n\n onScroll(event: Event) {\n const scrollTop = (event.target as HTMLElement).scrollTop;\n const sections = this.elementRef.nativeElement.querySelectorAll('.sidebar-section');\n\n // Reset animations if scrolling back to top\n if (scrollTop < 10) {\n this.resetAnimations();\n return;\n }\n\n // Animate sections as they come into view\n const animateArr = [...this.animateSections()];\n const scrolledArr = [...this.scrolledPast()];\n sections.forEach((section: HTMLElement, index: number) => {\n if (index >= animateArr.length) return;\n\n const sectionTop = section.offsetTop;\n const scrollPosition = scrollTop + 300; // Offset to trigger animation before fully visible\n\n // When scrolling down and section comes into view\n if (scrollPosition > sectionTop && !scrolledArr[index] && scrollTop > this.lastScrollTop) {\n animateArr[index] = true;\n scrolledArr[index] = true;\n }\n\n // When scrolling up to top, reset animation\n if (scrollTop < 50 && this.lastScrollTop > scrollTop) {\n this.resetAnimations();\n }\n });\n\n this.animateSections.set(animateArr);\n this.scrolledPast.set(scrolledArr);\n this.lastScrollTop = scrollTop;\n }\n\n resetAnimations() {\n this.animateSections.set([false, false, false, false, false]);\n this.scrolledPast.set([false, false, false, false, false]);\n\n // Re-trigger animations\n setTimeout(() => {\n this.animateSections.set([true, true, true, true, true]);\n }, 50);\n }\n\n /**\n * Remove notification with animation\n * @param notificationId The ID of the notification to remove\n */\n removeNotification(notificationId: string): void {\n const notifications = this.notifications();\n const notification = notifications.find(n => n.id === notificationId);\n \n if (!notification) return;\n \n // Set state to 'removing' to trigger animation\n const updatedNotifications = notifications.map(n => \n n.id === notificationId ? { ...n, state: 'removing' as const } : n\n );\n this.notifications.set(updatedNotifications);\n \n // Remove from list after animation completes\n setTimeout(() => {\n const finalNotifications = this.notifications().filter(n => n.id !== notificationId);\n this.notifications.set(finalNotifications);\n }, 300); // Match animation duration\n }\n\n /**\n * Mark all notifications as read\n */\n markAllAsRead(): void {\n const notifications = this.notifications().map(n => ({ ...n, unread: false }));\n this.notifications.set(notifications);\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent) {\n // Close dropdown menus when clicking outside\n const clickedInside = this.elementRef.nativeElement.contains(event.target);\n if (!clickedInside) {\n this.showUserMenu.set(false);\n this.showOptions.set(false);\n }\n }\n}\n","<nav class=\"cide-lyt-sidebar tw-flex tw-h-full tw-select-none\" [class.collapsed]=\"isCollapsed()\">\n <!-- First tier sidebar (Icon only) -->\n <div class=\"cide-lyt-stack tw-h-full tw-flex tw-flex-col tw-items-center tw-border-r tw-border-gray-100\">\n <!-- Scrollable content -->\n <div class=\"sidebar-scroll-content\">\n <!-- Collapse/Expand toggle -->\n <div class=\"nav-item collapse-toggle\" tabindex=\"0\" (click)=\"toggleSidebar()\"\n (keydown.enter)=\"toggleSidebar()\">\n <div class=\"nav-tooltip\">{{isCollapsed() ? 'Expand' : 'Collapse'}} Sidebar</div>\n <cide-ele-icon size=\"xs\" type=\"box\" class=\"tw-text-gray-500 hover:tw-text-gray-700\">\n {{isCollapsed() ? 'chevron_right' : 'chevron_left'}}\n </cide-ele-icon>\n </div> <!-- Main navigation icons - Enhanced Design -->\n <div class=\"tw-flex tw-flex-col tw-gap-4\">\n @for (core_system_module_item of core_system_module(); track $index) {\n <div class=\"nav-item tw-relative tw-group\" (click)=\"setActiveMenu(core_system_module_item._id, $event)\"\n [cideEleTooltip]=\"core_system_module_item.syme_title\" [tooltipShowArrow]=\"true\"\n tooltipPlacement=\"right\"\n [ngClass]=\"{'nav-item-active': activeModuleId === core_system_module_item._id}\"\n (mouseenter)=\"onItemHover(core_system_module_item._id)\" (mouseleave)=\"onItemHover('')\"\n [tabindex]=\"$index.toString()\" (keydown.enter)=\"setActiveMenu(core_system_module_item._id, $event)\">\n\n <!-- Notification Badge with enhanced design -->\n @if (core_system_module_item?.syme_ping) {\n <div class=\"nav-badge tw-absolute -tw-top-1 -tw-right-1 tw-w-1.5 tw-h-1.5 tw-rounded-full tw-animate-ping\"\n style=\"background-color: var(--cide-theme-error-color);\">\n </div>\n }\n\n <!-- Enhanced icon with better visual effects -->\n <div\n class=\"tw-p-2 tw-rounded-xl tw-transition-all tw-duration-200 tw-ease-in-out\n group-hover:tw-bg-blue-50 group-hover:tw-shadow-md group-hover:tw-scale-105\n tw-border-2 tw-border-transparent\n {{activeModuleId === core_system_module_item._id ? 'tw-bg-blue-100 tw-border-blue-200 tw-shadow-sm' : 'tw-bg-gray-50'}}\">\n <cide-ele-icon type=\"box\" size=\"xs\"\n class=\"tw-transition-all tw-duration-200 tw-ease-in-out\n {{activeModuleId === core_system_module_item._id ? 'tw-text-blue-600' : 'tw-text-gray-600 group-hover:tw-text-blue-500'}}\">\n {{core_system_module_item?.syme_icon || 'dashboard'}}\n </cide-ele-icon>\n </div>\n\n <!-- Modern active indicator -->\n @if (activeModuleId === core_system_module_item._id) {\n <div\n class=\"nav-indicator tw-absolute tw-left-0 tw-top-1/2 tw-transform -tw-translate-y-1/2 tw-w-1 tw-h-8 tw-bg-blue-500 tw-rounded-r-full tw-shadow-lg tw-transition-all tw-duration-300\">\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div> <!-- Second tier sidebar (Expanded view) -->\n <div class=\"cide-lyt-sidebar-menu tw-h-full tw-overflow-hidden tw-shadow-sm\">\n <div class=\"tw-flex tw-flex-col tw-h-full\">\n <!-- Header section with search and options -->\n <div class=\"sidebar-header tw-p-2.5 tw-border-b tw-border-gray-100\">\n <!-- Title with back button - Clean layout without online indicator -->\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mb-2.5\">\n <button\n class=\"back-button tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100 hover:tw-text-gray-700 tw-transition-colors tw-flex-shrink-0\"\n [cideEleTooltip]=\"'Back to home'\" tooltipPlacement=\"bottom\">\n <cide-ele-icon type=\"none\" size=\"xs\" class=\"tw-transition-transform hover:tw-scale-110\">{{\n getActiveModuleIcon() }}</cide-ele-icon>\n </button>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <h2 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-leading-5\">\n {{ appState.getActiveModuleTitle() || 'Menu' }}\n </h2>\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-mt-0.5\">\n Module Dashboard\n </p>\n </div>\n </div>\n\n <!-- Search and options -->\n <div class=\"tw-flex tw-items-center tw-justify-between\">\n <div class=\"search-wrapper tw-relative tw-flex-1\">\n <cide-ele-input type=\"text\" leadingIcon=\"search\" size=\"xs\" placeholder=\"Search settings...\"\n [clearInput]=\"true\" [ngModel]=\"searchText()\" (ngModelChange)=\"onSearchTextChange($event)\" (input)=\"onSearch()\">\n </cide-ele-input>\n <div\n class=\"search-shortcut tw-absolute tw-right-3 tw-top-1/2 -tw-translate-y-1/2 tw-bg-gray-100 tw-text-gray-500 tw-rounded tw-px-1.5 tw-py-0.5 tw-text-xs\">\n ⌘K</div>\n </div>\n <button\n class=\"tw-ml-2 tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100 hover:tw-text-gray-700 tw-transition-colors\"\n (click)=\"toggleOptions()\">\n <cide-ele-icon type=\"none\" size=\"xs\">more_vert</cide-ele-icon>\n </button>\n\n <!-- Options dropdown menu -->\n <div *ngIf=\"showOptions()\"\n class=\"options-menu tw-absolute tw-right-4 tw-top-16 tw-mt-2 tw-w-48 tw-rounded-md tw-shadow-lg tw-bg-white tw-ring-1 tw-ring-black tw-ring-opacity-5 tw-divide-y tw-divide-gray-100 tw-z-10\">\n <div class=\"tw-py-1\">\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">refresh</cide-ele-icon>\n Refresh\n </a>\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">sync</cide-ele-icon>\n Sync settings\n </a>\n </div>\n <div class=\"tw-py-1\">\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">help_outline</cide-ele-icon>\n Help & support\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Menu items with categories -->\n <div class=\"sidebar-content tw-overflow-y-auto tw-flex-1\" (scroll)=\"onScroll($event)\">\n <!-- Search results if searching -->\n <div *ngIf=\"searchText()\" class=\"sidebar-section tw-p-2.5\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-2\">\n <h3 class=\"tw-text-xs tw-font-semibold tw-text-gray-500\">SEARCH RESULTS</h3>\n <span class=\"tw-text-xs tw-text-gray-500\">{{searchResults().length}} items</span>\n </div>\n\n <div *ngIf=\"searchResults().length > 0\" class=\"tw-space-y-1\">\n <a *ngFor=\"let item of searchResults()\" href=\"#\"\n class=\"menu-item tw-flex tw-items-center tw-px-2 tw-py-1.5 tw-rounded-md hover:tw-bg-gray-50\">\n <cide-ele-icon class=\"tw-mr-2 tw-text-gray-500\" type=\"none\"\n size=\"xs\">{{item.icon}}</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-700\">{{item.title}}</span>\n </a>\n </div>\n\n <div *ngIf=\"searchResults().length === 0\" class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-icon class=\"tw-text-gray-400\" type=\"none\" size=\"md\">search_off</cide-ele-icon>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">No results for \"{{searchText()}}\"</p>\n <p class=\"tw-text-xs tw-text-gray-400 tw-mt-1\">Try another search term</p>\n </div>\n </div>\n\n <!-- Only show these sections if not searching -->\n <ng-container *ngIf=\"!searchText()\">\n <!-- Loading state -->\n <div *ngIf=\"loadingMenus()\" class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-spinner variant=\"circle\" size=\"xs\"></cide-ele-spinner>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">Loading menus...</p>\n </div>\n\n <!-- Dynamic menu tree -->\n <div *ngIf=\"!loadingMenus() && menuLoadComplete()\" class=\"sidebar-section tw-p-2.5\"\n [class.animate-in]=\"animateSections()[0]\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: selectedModuleMenus, level: 0}\"></ng-container>\n </div>\n\n <!-- Empty state -->\n <div *ngIf=\"!loadingMenus() && menuLoadComplete() && selectedModuleMenus.length === 0\"\n class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-icon class=\"tw-text-gray-400\" type=\"none\" size=\"md\">folder_open</cide-ele-icon>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">No menus available</p>\n <p class=\"tw-text-xs tw-text-gray-400 tw-mt-1\">Select a module to view its menus</p>\n </div>\n </ng-container>\n\n <!-- Recursive menu template -->\n <ng-template #recursiveMenu let-menus let-level=\"level\">\n <div [class.tw-ml-0]=\"level > 0\">\n <div *ngFor=\"let menu of menus\" class=\"tw-mb-2\">\n <!-- Title type items (section headers) -->\n <div *ngIf=\"menu.syme_type === 'title'\" class=\"tw-mb-1.5\">\n <h3 class=\"tw-text-[10px] tw-font-medium tw-text-gray-400 tw-uppercase tw-mb-1 tw-tracking-wider\">{{\n menu.syme_title }}</h3>\n <!-- Render children of title -->\n <ng-container *ngIf=\"menu.children && menu.children.length > 0\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </ng-container>\n </div>\n\n <!-- Section type items (collapsible sections) -->\n <div *ngIf=\"menu.syme_type === 'section'\" class=\"tw-mb-2\">\n <!-- Section header (clickable to expand/collapse) -->\n <button (click)=\"toggleSection(menu._id)\" (keydown.enter)=\"toggleSection(menu._id)\"\n (keydown.space)=\"toggleSection(menu._id)\"\n class=\"section-header tw-w-full tw-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-md hover:tw-bg-gray-50 tw-cursor-pointer tw-transition-colors tw-text-left\"\n [class.tw-bg-blue-50]=\"isSectionExpanded(menu._id)\" type=\"button\" tabindex=\"0\"\n role=\"button\" [attr.aria-expanded]=\"isSectionExpanded(menu._id)\"\n [attr.aria-label]=\"'Toggle ' + menu.syme_title + ' section'\">\n\n <!-- Section Icon (left side, like other menu items) -->\n <cide-ele-icon class=\"tw-mr-1.5 tw-text-gray-400\" type=\"none\" size=\"2xs\">{{\n menu.syme_icon || 'folder' }}</cide-ele-icon>\n\n <!-- Section Title -->\n <span class=\"tw-text-xs tw-font-medium tw-text-gray-700\">{{ menu.syme_title\n }}</span>\n\n <!-- Right side icons container -->\n <div class=\"tw-ml-auto tw-flex tw-items-center tw-space-x-1.5\">\n <!-- Child Count Badge -->\n <span *ngIf=\"menu.children && menu.children.length > 0\"\n class=\"tw-px-1.5 tw-py-0.5 tw-bg-gray-200 tw-text-gray-500 tw-rounded-full tw-text-[10px] tw-font-medium\">\n {{ menu.children.length }}\n </span>\n\n <!-- Expand/Collapse Icon (right side) -->\n <cide-ele-icon class=\"tw-text-gray-400 tw-transition-transform tw-duration-200\"\n [class.tw-rotate-90]=\"isSectionExpanded(menu._id)\" type=\"none\"\n size=\"2xs\">chevron_right</cide-ele-icon>\n </div>\n </button>\n\n <!-- Section Content (collapsible) -->\n <div *ngIf=\"isSectionExpanded(menu._id) && menu.children && menu.children.length > 0\"\n class=\"section-content tw-mt-1 tw-ml-2 tw-border-l tw-border-gray-200 tw-pl-2.5\"\n [@slideInOut]=\"isSectionExpanded(menu._id) ? 'in' : 'out'\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </div>\n </div>\n\n <!-- Menu type items (clickable links) -->\n <a *ngIf=\"menu.syme_type === 'menu'\" (click)=\"onMenuClick(menu, $event)\"\n (keydown.enter)=\"onMenuClick(menu, $event)\" (keydown.space)=\"onMenuClick(menu, $event)\" tabindex=\"0\"\n role=\"button\"\n class=\"menu-item tw-flex tw-items-center tw-px-2 tw-py-1.5 tw-rounded-md hover:tw-bg-gray-50 tw-cursor-pointer tw-transition-colors\">\n <cide-ele-icon *ngIf=\"menu.syme_icon\" class=\"tw-mr-2 tw-text-gray-500\" type=\"none\"\n size=\"xs\">{{ menu.syme_icon }}</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-700\">{{ menu.syme_title }}</span>\n <cide-ele-icon *ngIf=\"menu.children && menu.children.length > 0\"\n class=\"tw-ml-auto tw-text-gray-400\" type=\"none\"\n size=\"2xs\">chevron_right</cide-ele-icon>\n </a>\n\n <!-- Render nested children for menu items -->\n <ng-container\n *ngIf=\"menu.syme_type === 'menu' && menu.children && menu.children.length > 0\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </ng-template>\n </div>\n\n <!-- Notification panel (overlays content when shown) -->\n <div *ngIf=\"showNotifications()\" class=\"notification-panel tw-absolute tw-inset-0 tw-bg-white tw-z-20\">\n <div class=\"tw-p-4 tw-border-b tw-border-gray-100 tw-flex tw-justify-between tw-items-center\">\n <h3 class=\"tw-text-sm tw-font-medium\">Notifications</h3>\n <button class=\"tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100\"\n (click)=\"toggleNotificationsPanel()\">\n <cide-ele-icon type=\"none\" size=\"xs\">close</cide-ele-icon>\n </button>\n </div>\n\n <div class=\"tw-p-4\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-mb-4\">\n <div class=\"tw-text-xs tw-text-gray-500\">Today</div>\n <button class=\"tw-text-xs tw-text-blue-500 hover:tw-text-blue-600\" (click)=\"markAllAsRead()\">Mark all as read</button>\n </div>\n\n <div class=\"tw-space-y-3\">\n @for (notification of notifications(); track notification.id) {\n <div \n [@notificationRemove]=\"notification.state\"\n class=\"notification-item tw-p-3 tw-rounded-lg tw-border-l-4 tw-relative tw-group\"\n [class.tw-border-blue-500]=\"notification.unread\"\n [class.tw-border-transparent]=\"!notification.unread\"\n [class.tw-bg-blue-50]=\"notification.unread\">\n <div class=\"tw-flex tw-gap-3\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-full tw-flex tw-items-center tw-justify-center\"\n [class.tw-bg-blue-100]=\"notification.unread\"\n [class.tw-bg-gray-100]=\"!notification.unread\"\n [class.tw-text-blue-500]=\"notification.unread\"\n [class.tw-text-gray-500]=\"!notification.unread\">\n <cide-ele-icon type=\"none\" size=\"xs\">{{ notification.icon }}</cide-ele-icon>\n </div>\n <div class=\"tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900\">{{ notification.title }}</div>\n <div class=\"tw-text-xs tw-text-gray-500 tw-mt-1\">{{ notification.message }}</div>\n <div class=\"tw-text-xs tw-text-gray-400 tw-mt-2\">{{ notification.time }}</div>\n </div>\n <button \n class=\"tw-opacity-0 group-hover:tw-opacity-100 tw-transition-opacity tw-p-1 tw-rounded hover:tw-bg-gray-200 tw-text-gray-500 hover:tw-text-gray-700\"\n (click)=\"removeNotification(notification.id)\"\n title=\"Remove notification\">\n <cide-ele-icon type=\"none\" size=\"xs\">close</cide-ele-icon>\n </button>\n </div>\n </div>\n }\n @if (notifications().length === 0) {\n <div class=\"tw-p-8 tw-text-center\">\n <cide-ele-icon class=\"tw-text-gray-400 tw-mb-2\" type=\"none\" size=\"md\">notifications_none</cide-ele-icon>\n <p class=\"tw-text-sm tw-text-gray-500\">No notifications</p>\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Storage info at bottom -->\n <div class=\"sidebar-footer tw-p-2 tw-border-t tw-border-gray-100\">\n <!-- for info display -->\n </div>\n </div>\n </div>\n\n <!-- Resizer -->\n <div parentElementSelector=\"#cide-lyt-sidebar-page-inner-wrapper\"\n [minPrevSize]=\"sidebarSetupData.cide_lyt_sidebar_width\" prevElementSelector=\"#cide-lyt-sidebar-page\"\n nextElementSelector=\"#cide-lyt-page-wrapper\" cideEleResizer direction=\"horizontal\">\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\n </div>\n</nav>","import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router';\nimport { ComponentRef, ViewContainerRef } from '@angular/core';\n\n/**\n * A custom route reuse strategy that allows storing and retrieving routes\n * to persist component state, especially for tabbed navigation.\n */\nexport class CustomRouteReuseStrategy implements RouteReuseStrategy {\n private storedRoutes: { [key: string]: DetachedRouteHandle } = {};\n\n // Generates a unique key for a route.\n // For routes marked with 'reuseTab', this key includes sorted query parameters\n // to ensure distinct states for tabs differing by query params.\n private getPathKey(route: ActivatedRouteSnapshot): string {\n let path = route.pathFromRoot\n .map(r => r.url.map(segment => segment.path).join('/'))\n .filter(p => p.length > 0)\n .join('/');\n\n // If the route is marked for tab reuse and has query parameters,\n // append them to the key in a sorted, consistent manner.\n if (route.data && route.data['reuseTab'] && route.queryParamMap.keys.length > 0) {\n const queryParams = route.queryParamMap.keys\n .sort() // Ensure consistent order of query parameters\n .map(key => `${key}=${route.queryParamMap.get(key)}`)\n .join('&');\n path += '?' + queryParams;\n }\n return path;\n }\n\n // Determines if this route (and its subtree) should be detached to be reused later.\n shouldDetach(route: ActivatedRouteSnapshot): boolean {\n return !!(route.data && route.data['reuseTab']);\n }\n\n // Stores the detached route.\n store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void {\n const pathKey = this.getPathKey(route);\n if (handle && route.data && route.data['reuseTab'] && pathKey) {\n this.storedRoutes[pathKey] = handle;\n }\n }\n\n // Determines if this route (and its subtree) should be reattached.\n shouldAttach(route: ActivatedRouteSnapshot): boolean {\n const pathKey = this.getPathKey(route);\n return !!pathKey && !!this.storedRoutes[pathKey];\n }\n\n // Retrieves the previously stored route.\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n const pathKey = this.getPathKey(route);\n if (!pathKey || !this.storedRoutes[pathKey]) {\n return null;\n }\n \n const handle = this.storedRoutes[pathKey];\n \n // Verify the handle is still valid (not destroyed)\n // If the component was destroyed, remove it from stored routes\n if (handle && typeof handle === 'object') {\n const handleAny = handle as any;\n // Check if ComponentRef is destroyed\n if (handleAny.destroyed === true || (handleAny.hostView && handleAny.hostView.destroyed)) {\n console.log(`⚠️ Stored route handle for ${pathKey} is already destroyed, removing from cache`);\n delete this.storedRoutes[pathKey];\n return null;\n }\n }\n \n return handle;\n }\n\n // Determines if a route should be reused.\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n return future.routeConfig === curr.routeConfig;\n }\n\n // Clears a stored route, typically when a tab is closed.\n // This method now properly destroys the component instance to prevent memory leaks\n // and ensure old data doesn't persist when reopening the same route.\n public clearStoredRoute(pathKey: string): void {\n const handle = this.storedRoutes[pathKey];\n if (handle) {\n // Properly destroy the component instance to prevent memory leaks\n // and ensure clean state when the route is reopened\n try {\n // In Angular, DetachedRouteHandle is typically a ComponentRef\n // We need to destroy it to remove the component from DOM and clean up resources\n \n // Method 1: Check if handle is a ComponentRef directly\n if (handle && typeof (handle as any).destroy === 'function') {\n const componentRef = handle as ComponentRef<any>;\n // Verify it has hostView (ComponentRef signature)\n if ((componentRef as any).hostView || (componentRef as any).location) {\n console.log(`🗑️ Destroying component instance (ComponentRef) for route: ${pathKey}`);\n componentRef.destroy();\n }\n }\n \n // Method 2: Check if handle is a ViewContainerRef\n if (handle && typeof (handle as any).clear === 'function' && typeof (handle as any).length === 'number') {\n const viewContainerRef = handle as ViewContainerRef;\n console.log(`🗑️ Clearing view container for route: ${pathKey}`);\n viewContainerRef.clear();\n }\n \n // Method 3: Check if handle is an object with nested ComponentRef\n if (handle && typeof handle === 'object' && !(handle instanceof ComponentRef) && !(handle instanceof ViewContainerRef)) {\n const handleObj = handle as any;\n \n // Try to find and destroy ComponentRef from various possible properties\n let componentRef: ComponentRef<any> | null = null;\n \n // Check common property names\n if (handleObj.componentRef && typeof handleObj.componentRef.destroy === 'function') {\n componentRef = handleObj.componentRef;\n } else if (handleObj.component && typeof handleObj.component.destroy === 'function') {\n componentRef = handleObj.component;\n } else if (handleObj.context && typeof handleObj.context.destroy === 'function') {\n componentRef = handleObj.context;\n } else if (handleObj._componentRef && typeof handleObj._componentRef.destroy === 'function') {\n componentRef = handleObj._componentRef;\n }\n \n if (componentRef) {\n console.log(`🗑️ Destroying component instance from handle object for route: ${pathKey}`);\n componentRef.destroy();\n }\n \n // Also try to clear view container if it exists\n if (handleObj.viewContainerRef && typeof handleObj.viewContainerRef.clear === 'function') {\n console.log(`🗑️ Clearing view container from handle object for route: ${pathKey}`);\n handleObj.viewContainerRef.clear();\n }\n \n // Try to destroy any nested components\n if (handleObj.components && Array.isArray(handleObj.components)) {\n handleObj.components.forEach((comp: any, index: number) => {\n if (comp && typeof comp.destroy === 'function') {\n console.log(`🗑️ Destroying nested component ${index} for route: ${pathKey}`);\n comp.destroy();\n }\n });\n }\n }\n } catch (error) {\n console.warn(`⚠️ Error destroying route handle for ${pathKey}:`, error);\n }\n \n // Remove from stored routes - this ensures shouldAttach will return false for this route\n delete this.storedRoutes[pathKey];\n console.log(`✅ Cleared stored route: ${pathKey} (removed from storedRoutes map)`);\n } else {\n console.log(`ℹ️ No stored route found for: ${pathKey}`);\n }\n }\n\n // Clears all stored routes (useful for cleanup)\n public clearAllStoredRoutes(): void {\n Object.keys(this.storedRoutes).forEach(pathKey => {\n this.clearStoredRoute(pathKey);\n });\n }\n\n // Gets the count of stored routes (useful for debugging)\n public getStoredRoutesCount(): number {\n return Object.keys(this.storedRoutes).length;\n }\n}","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { distinctUntilChanged, map } from 'rxjs/operators';\r\nimport { merge } from 'lodash';\r\n\r\n/**\r\n * Defines the shape of the state for components that need to persist\r\n * data on a per-tab basis. Using Partial<> for flexibility.\r\n */\r\nexport interface PerTabState {\r\n sideDrawer?: {\r\n isOpen: boolean;\r\n activeComponent: string | null;\r\n componentState?: { [componentKey: string]: unknown };\r\n };\r\n footer?: {\r\n someData?: string;\r\n };\r\n console?: {\r\n history: string[];\r\n };\r\n}\r\n\r\n/**\r\n * Represents the entire state for a single tab, including its metadata\r\n * and the state of various components.\r\n */\r\nexport interface TabState {\r\n id: string;\r\n title: string;\r\n componentState: PerTabState;\r\n}\r\n\r\n/**\r\n * Creates the default state for a new tab.\r\n */\r\nconst createDefaultComponentState = (): PerTabState => ({\r\n sideDrawer: { isOpen: false, activeComponent: null, componentState: {} },\r\n footer: { someData: '' },\r\n console: { history: [] },\r\n});\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class TabStateService {\r\n // Holds the state for all open tabs, keyed by tab ID.\r\n private readonly _tabsState = new BehaviorSubject<Map<string, TabState>>(new Map());\r\n\r\n // Holds the ID of the currently active tab.\r\n private readonly _activeTabId = new BehaviorSubject<string | null>(null);\r\n\r\n /** An observable of all open tabs. */\r\n public readonly tabs$: Observable<TabState[]> = this._tabsState.pipe(\r\n map(tabsMap => Array.from(tabsMap.values()))\r\n );\r\n\r\n /** An observable of the currently active tab's ID. */\r\n public readonly activeTabId$ = this._activeTabId.asObservable().pipe(distinctUntilChanged());\r\n\r\n /** An observable of the state of the currently active tab. */\r\n public readonly activeTabState$: Observable<TabState | null> = this.activeTabId$.pipe(\r\n map(activeId => (activeId ? this._tabsState.getValue().get(activeId) ?? null : null)),\r\n // Use a deep-ish comparison to prevent emissions when only the object reference changes\r\n distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr))\r\n );\r\n\r\n /** An observable of just the component-specific state for the active tab. */\r\n public readonly activeComponentState$: Observable<PerTabState | null> = this.activeTabState$.pipe(\r\n map(activeTab => activeTab?.componentState ?? null)\r\n );\r\n\r\n /**\r\n * Adds a new tab to the state.\r\n * @param title The title for the new tab.\r\n * @param id An optional unique ID. If not provided, one will be generated.\r\n * @returns The ID of the newly created tab.\r\n */\r\n public addTab(title: string, id?: string): string {\r\n const newTabId = id || `tab_${Date.now()}_${Math.random()}`;\r\n const newTab: TabState = {\r\n id: newTabId,\r\n title,\r\n componentState: createDefaultComponentState(),\r\n };\r\n\r\n const currentTabs = this._tabsState.getValue();\r\n const newTabs = new Map(currentTabs).set(newTabId, newTab);\r\n this._tabsState.next(newTabs);\r\n this.setActiveTab(newTabId);\r\n\r\n return newTabId;\r\n }\r\n\r\n /**\r\n * Removes a tab from the state.\r\n * @param tabIdToRemove The ID of the tab to remove.\r\n */\r\n public removeTab(tabIdToRemove: string): void {\r\n const currentTabs = this._tabsState.getValue();\r\n if (!currentTabs.has(tabIdToRemove)) {\r\n return;\r\n }\r\n\r\n const newTabs = new Map(currentTabs);\r\n newTabs.delete(tabIdToRemove);\r\n this._tabsState.next(newTabs);\r\n }\r\n\r\n constructor() {\r\n // You can initialize with default tabs if needed\r\n // For example:\r\n // this.addTab('Welcome Tab');\r\n }\r\n\r\n /**\r\n * Sets the currently active tab.\r\n * @param tabId The unique identifier of the tab to activate.\r\n */\r\n public setActiveTab(tabId: string | null): void {\r\n if (this._activeTabId.getValue() !== tabId) {\r\n this._activeTabId.next(tabId);\r\n }\r\n }\r\n\r\n /**\r\n * Updates the state for the currently active tab.\r\n * This performs a deep merge to avoid overwriting nested state.\r\n * @param partialState The partial state to update for the active tab.\r\n */\r\n public updateActiveTabState(partialState: Partial<PerTabState>): void {\r\n const activeId = this._activeTabId.getValue();\r\n if (!activeId) {\r\n console.warn('Cannot update state, no active tab.');\r\n return;\r\n }\r\n\r\n const tabs = this._tabsState.getValue();\r\n const activeTabState = tabs.get(activeId);\r\n\r\n if (activeTabState) {\r\n // Use lodash merge for a deep merge\r\n const updatedState = merge({}, activeTabState, { componentState: partialState });\r\n const newTabsState = new Map(tabs);\r\n newTabsState.set(activeId, updatedState);\r\n this._tabsState.next(newTabsState);\r\n }\r\n }\r\n\r\n /**\r\n * Gets an observable for a specific tab's state.\r\n * @param tabId The ID of the tab to observe.\r\n */\r\n public getTabState(tabId: string): Observable<TabState | undefined> {\r\n return this._tabsState.pipe(map(tabs => tabs.get(tabId)));\r\n }\r\n\r\n /**\r\n * Determines the ID of the next tab to activate when a tab is closed.\r\n * @param idToRemove The ID of the tab being removed.\r\n * @returns The ID of the next tab to activate, or null if no tabs are left.\r\n */\r\n private getNextActiveTabId(idToRemove: string): string | null {\r\n const tabsMap = this._tabsState.getValue();\r\n if (tabsMap.size <= 1) {\r\n return null;\r\n }\r\n\r\n const tabIds = Array.from(tabsMap.keys());\r\n const removedIndex = tabIds.indexOf(idToRemove);\r\n\r\n // If it's the last tab in the list, activate the one before it. Otherwise, activate the next one.\r\n const nextIndex = removedIndex === tabIds.length - 1 ? removedIndex - 1 : removedIndex + 1;\r\n return tabIds[nextIndex];\r\n }\r\n}","import { Injectable, inject, signal, WritableSignal, Signal, computed } from '@angular/core';\nimport { Router, RouteReuseStrategy } from '@angular/router';\nimport { CustomRouteReuseStrategy } from '../../utils/custom-route-reuse-strategy';\nimport { TabStateService } from '../../services/tab-state.service';\nimport { CideLytSidedrawerService } from '../sidedrawer/sidedrawer.service';\nimport { CideLytSharedService } from '../shared/shared.service';\nimport { CideEleFloatingContainerService } from 'cloud-ide-element';\nimport { ISytmLayout } from 'cloud-ide-lms-model';\nimport { AppStateService } from '../../services/app-state/app-state.service';\n\nexport interface TabInfo {\n id: string;\n title: string;\n route: string;\n params?: Record<string, unknown>;\n active: boolean;\n sytm_page_id_sypg: string;\n themeId: string;\n loadedComponent?: unknown;\n scrollTop?: number;\n scrollLeft?: number;\n layout?: ISytmLayout;\n}\n\n// Interface for page data passed from shared service\ninterface PageDataResponse {\n data?: {\n page?: {\n sypg_title?: string;\n };\n };\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CideLytRequestService {\n public requestVisible: boolean = false;\n // Modern Angular v20+ pattern: Use Signals instead of BehaviorSubject\n public tabsSignal: WritableSignal<TabInfo[]> = signal([]);\n public activeTabIdSignal: WritableSignal<string | null> = signal(null);\n \n // Computed signals for derived state and public readonly access\n public tabs: Signal<TabInfo[]> = computed(() => this.tabsSignal());\n public activeTabId: Signal<string | null> = computed(() => this.activeTabIdSignal());\n public activeTab: Signal<TabInfo | undefined> = computed(() => \n this.tabsSignal().find(tab => tab.active)\n );\n\n // Use inject() for all dependencies\n private router = inject(Router);\n private routeReuseStrategy = inject(RouteReuseStrategy);\n private tabStateService = inject(TabStateService);\n private sidedrawerService = inject(CideLytSidedrawerService);\n private sharedService = inject(CideLytSharedService);\n private floatingContainerService = inject(CideEleFloatingContainerService);\n private appStateService = inject(AppStateService);\n\n constructor() {\n // Initialize router\n this.router = inject(Router);\n this.router.routeReuseStrategy = new CustomRouteReuseStrategy();\n \n // Register tab management callback with shared service to avoid circular dependency\n this.sharedService.registerTabManagement(this.handleRouteBasedTabManagement.bind(this));\n \n // Register request visibility callback\n this.sharedService.registerRequestVisibility(this.handleRequestVisibility.bind(this));\n \n // Register entity change handler with AppStateService to close tabs when entity changes\n // This is safe because AppStateService no longer imports CideLytRequestService\n this.appStateService.registerEntityChangeHandler((entity) => {\n console.log('🏢 [RequestService] Entity changed, closing all tabs:', entity?._id);\n this.closeAllTabs();\n });\n }\n\n /**\n * Handle request visibility changes from shared service\n */\n private handleRequestVisibility(show: boolean): void {\n if (show) {\n this.showRequest();\n } else {\n this.hideRequest();\n }\n }\n\n /**\n * Handle sidebar sync when tab becomes active\n */\n private handleSidebarSync(tabInfo: TabInfo): void {\n // The sidebar sync will be handled automatically by the shared service\n // when page data is loaded, so we don't need additional logic here\n console.log('🔗 REQUEST SERVICE: Tab activated, sidebar sync handled by shared service:', tabInfo.title);\n }\n\n /**\n * Handle route-based tab management - called by shared service\n * This method checks for existing tabs and creates/activates as needed\n */\n handleRouteBasedTabManagement(\n currentRoutePath: string,\n queryParams: Record<string, unknown>,\n layout: ISytmLayout,\n pageData: PageDataResponse,\n pageCode: string\n ) {\n console.log('handleRouteBasedTabManagement', currentRoutePath, queryParams, layout, pageData, pageCode);\n const currentTabs = this.tabsSignal();\n const tabAlreadyExists = currentTabs.find((t: TabInfo) => {\n const tRoutePath = t.route.startsWith('/') ? t.route : '/' + t.route;\n const tParamsMatch = JSON.stringify(t.params || {}) === JSON.stringify(queryParams || {});\n return tRoutePath === currentRoutePath && tParamsMatch;\n });\n console.log('tabAlreadyExists', tabAlreadyExists);\n if (!tabAlreadyExists) {\n const title = pageData.data?.page?.sypg_title || pageCode.toString() || 'Untitled Tab';\n console.log(`🆕 Adding new tab: ${title}`);\n this.addTab(title, currentRoutePath, queryParams, layout);\n } else if (tabAlreadyExists && !tabAlreadyExists.active) {\n console.log(`🔄 Activating existing tab: ${tabAlreadyExists.title}`);\n this.activateTab(tabAlreadyExists.id);\n }else if (tabAlreadyExists && tabAlreadyExists.active) {\n console.log(`🔄 Activating existing tab: ${tabAlreadyExists.title}`);\n this.activateTab(tabAlreadyExists.id);\n }\n }\n\n addTab(title: string, route: string, params?: Record<string, unknown>, layout?: ISytmLayout): string {\n console.log('addTab', title, route, params, layout);\n const id = this.generateId();\n const currentTabs = this.tabsSignal();\n console.log('currentTabs', currentTabs, route);\n // Tab reuse disabled - always create new tab\n // Removed existing tab check to prevent tab reuse\n \n // Create new tab\n const newTab: TabInfo = {\n id,\n title,\n route,\n params,\n active: true,\n layout,\n sytm_page_id_sypg: '',\n themeId: ''\n };\n\n // Deactivate all other tabs\n currentTabs.forEach((tab: TabInfo) => tab.active = false);\n console.log('currentTabs after deactivate', currentTabs, 'activateTab', id);\n // Add new tab\n this.tabsSignal.set([...currentTabs, newTab]);\n this.activeTabIdSignal.set(id);\n\n // Sync with TabStateService\n this.tabStateService.addTab(title, id);\n \n // Request visibility is now controlled by layout configuration in setPageData\n // No need to automatically show request wrapper here\n \n // Navigate to the new route\n if (params) {\n this.router.navigate([route], { queryParams: params });\n } else {\n this.router.navigate([route]);\n }\n\n return id;\n }\n\n activateTab(tabId: string): void {\n console.log('🔍 REQUEST SERVICE: Activating tab:', tabId);\n const tabs = this.tabsSignal();\n const tabToActivate = tabs.find(tab => tab.id === tabId);\n \n if (!tabToActivate) {\n console.warn('⚠️ Tab not found:', tabId);\n return;\n }\n\n // Before navigating, ensure the route is fresh by clearing any cached state\n // This prevents old component data from persisting when reopening a tab\n if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {\n let pathKey = tabToActivate.route.startsWith('/') ? tabToActivate.route.substring(1) : tabToActivate.route;\n\n if (tabToActivate.params && Object.keys(tabToActivate.params).length > 0) {\n const queryParamsString = Object.keys(tabToActivate.params)\n .sort()\n .map(key => `${key}=${tabToActivate.params![key]}`)\n .join('&');\n pathKey += '?' + queryParamsString;\n }\n\n // Clear any cached route to ensure fresh component state\n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKey);\n console.log(`🔄 REQUEST SERVICE: Cleared cached route ${pathKey} before activating tab`);\n }\n\n // Update tabs: deactivate all, then activate the target\n const updatedTabs = tabs.map(tab => ({\n ...tab,\n active: tab.id === tabId\n }));\n\n this.tabsSignal.set(updatedTabs);\n this.activeTabIdSignal.set(tabId);\n \n console.log('✅ REQUEST SERVICE: Tab activated:', tabToActivate.title);\n\n // Navigate to the tab's route\n this.router.navigate([tabToActivate.route], { \n queryParams: tabToActivate.params || {},\n replaceUrl: false \n });\n \n // Trigger sidebar sync for the activated tab by calling shared service\n // The shared service will handle the sidebar sync when the route loads\n console.log('🔗 REQUEST SERVICE: Sidebar sync will be handled by route change');\n }\n\n closeTab(id: string): void {\n const currentTabs = this.tabsSignal();\n const tabIndex = currentTabs.findIndex((tab: TabInfo) => tab.id === id);\n\n if (tabIndex === -1) return;\n\n const tabToClose = currentTabs[tabIndex];\n const wasActive = tabToClose.active;\n\n // Sync with TabStateService by removing the tab state\n this.tabStateService.removeTab(id);\n\n // Clear stored route from strategy and ensure proper component cleanup\n if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {\n // Generate pathKey in the same format as CustomRouteReuseStrategy.getPathKey()\n // Remove leading slash to match the format used by getPathKey\n let pathKey = tabToClose.route.startsWith('/') ? tabToClose.route.substring(1) : tabToClose.route;\n\n // Only add query params if the route is marked for reuse (matching getPathKey logic)\n // But we'll try to clear with both formats to be safe\n if (tabToClose.params && Object.keys(tabToClose.params).length > 0) {\n const queryParamsString = Object.keys(tabToClose.params)\n .sort()\n .map(key => `${key}=${tabToClose.params![key]}`)\n .join('&');\n pathKey += '?' + queryParamsString;\n }\n\n // Clear the stored route and destroy the component instance\n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKey);\n \n // Also try clearing without query params in case the route wasn't marked for reuse\n // This ensures we catch all possible pathKey variations\n const pathKeyWithoutParams = tabToClose.route.startsWith('/') ? tabToClose.route.substring(1) : tabToClose.route;\n if (pathKeyWithoutParams !== pathKey) {\n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKeyWithoutParams);\n }\n \n // Force a route refresh to ensure clean component state\n // This prevents old data from persisting when the same route is reopened\n console.log(`🧹 REQUEST SERVICE: Cleared stored route for ${pathKey} and destroyed component instance`);\n \n // If this was the active tab, navigate away to ensure component is removed from DOM\n if (wasActive) {\n // The navigation to the new active tab will happen below, which will properly clear the router outlet\n // But we also want to ensure the component is removed immediately\n console.log(`🧹 REQUEST SERVICE: Active tab closed, component will be removed on navigation`);\n }\n }\n\n // Remove the tab from this service's list\n const newTabs = currentTabs.filter((tab: TabInfo) => tab.id !== id);\n\n // If we're closing the active tab, activate the next available tab\n if (wasActive && newTabs.length > 0) {\n const newActiveIndex = Math.max(0, Math.min(tabIndex, newTabs.length - 1));\n const newActiveTab = newTabs[newActiveIndex];\n\n // Update sidedrawer for the new active tab\n this.sidedrawerService.updateDrawerItems(newActiveTab.layout);\n\n newTabs[newActiveIndex].active = true;\n this.activeTabIdSignal.set(newActiveTab.id);\n this.tabStateService.setActiveTab(newActiveTab.id);\n\n // Navigate to the new active tab's route\n if (newActiveTab.params) {\n this.router.navigate([newActiveTab.route], { queryParams: newActiveTab.params });\n } else {\n this.router.navigate([newActiveTab.route]);\n }\n } else if (newTabs.length === 0) {\n this.activeTabIdSignal.set(null);\n this.tabStateService.setActiveTab(null);\n // Clear sidedrawer as no tabs are open\n this.sidedrawerService.updateDrawerItems(undefined);\n // Redirect to home screen when all tabs are closed\n this.router.navigate(['/control-panel']);\n }\n this.tabsSignal.set(newTabs);\n // Request wrapper visibility is now controlled by layout configuration\n // The wrapper will be hidden/shown based on sytm_layout_request.status in setPageData\n }\n\n /**\n * Close all tabs and navigate to home\n * This is used when entity changes to ensure all components are destroyed and refreshed\n */\n closeAllTabs(): void {\n console.log('🧹 REQUEST SERVICE: Closing all tabs due to entity change');\n const currentTabs = this.tabsSignal();\n \n // Close all floating containers first\n this.floatingContainerService.hideAll();\n console.log('🧹 REQUEST SERVICE: Closed all floating containers');\n \n // Clear all tabs from TabStateService\n currentTabs.forEach(tab => {\n this.tabStateService.removeTab(tab.id);\n \n // Clear stored routes from route reuse strategy\n if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {\n let pathKey = tab.route.startsWith('/') ? tab.route.substring(1) : tab.route;\n \n if (tab.params && Object.keys(tab.params).length > 0) {\n const queryParamsString = Object.keys(tab.params)\n .sort()\n .map(key => `${key}=${tab.params![key]}`)\n .join('&');\n pathKey += '?' + queryParamsString;\n }\n \n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKey);\n \n // Also clear without query params\n const pathKeyWithoutParams = tab.route.startsWith('/') ? tab.route.substring(1) : tab.route;\n if (pathKeyWithoutParams !== pathKey) {\n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKeyWithoutParams);\n }\n }\n });\n \n // Clear all tabs\n this.tabsSignal.set([]);\n this.activeTabIdSignal.set(null);\n this.tabStateService.setActiveTab(null);\n \n // Clear sidedrawer\n this.sidedrawerService.updateDrawerItems(undefined);\n \n // Navigate to home\n this.router.navigate(['/control-panel']);\n \n console.log('✅ REQUEST SERVICE: All tabs and floating containers closed, navigated to home');\n }\n\n // Hide Request\n hideRequest() {\n console.log('🚫 REQUEST SERVICE - Hiding request wrapper');\n this.requestVisible = false;\n document.querySelector(`#cide-lyt-request-wrapper`)?.classList.add('cide-lyt-request-wrapper-hide');\n document.querySelector(`body`)?.classList.remove('cide-lyt-request-exist');\n }\n\n // Show Request\n showRequest() {\n console.log('✅ REQUEST SERVICE - Showing request wrapper');\n this.requestVisible = true;\n document.querySelector(`#cide-lyt-request-wrapper`)?.classList.remove('cide-lyt-request-wrapper-hide');\n document.querySelector(`body`)?.classList.add('cide-lyt-request-exist');\n }\n\n private generateId(): string {\n return 'tab-' + Math.random().toString(36).substr(2, 9);\n }\n\n updateTabScrollPosition(tabId: string, scrollTop: number, scrollLeft: number): void {\n const currentTabs = this.tabsSignal();\n const tabIndex = currentTabs.findIndex((t: TabInfo) => t.id === tabId);\n if (tabIndex !== -1) {\n const tabToUpdate = currentTabs[tabIndex];\n tabToUpdate.scrollTop = scrollTop;\n tabToUpdate.scrollLeft = scrollLeft;\n // Create a new array reference to trigger change detection\n this.tabsSignal.set([...currentTabs]);\n }\n }\n\n /**\n * Force refresh a route by clearing its cached state\n * This is useful when you want to ensure a clean component state\n * @param route The route path to refresh\n * @param params Optional query parameters\n */\n forceRefreshRoute(route: string, params?: Record<string, unknown>): void {\n if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {\n let pathKey = route.startsWith('/') ? route.substring(1) : route;\n\n if (params && Object.keys(params).length > 0) {\n const queryParamsString = Object.keys(params)\n .sort()\n .map(key => `${key}=${params[key]}`)\n .join('&');\n pathKey += '?' + queryParamsString;\n }\n\n // Clear the stored route to force a fresh component instance\n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKey);\n console.log(`🔄 REQUEST SERVICE: Force refreshed route ${pathKey}`);\n }\n }\n\n /**\n * Get information about cached routes (useful for debugging)\n */\n getCachedRoutesInfo(): { count: number; routes: string[] } {\n if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {\n const count = (this.routeReuseStrategy as CustomRouteReuseStrategy).getStoredRoutesCount();\n return { count, routes: [] }; // Could be enhanced to return actual route paths\n }\n return { count: 0, routes: [] };\n }\n}\n","import { Component, OnInit, ViewContainerRef, ViewChild, ComponentRef, Type, inject, effect } from '@angular/core';\r\nimport { computed } from '@angular/core';\r\nimport { CideEleResizerDirective, CideIconComponent, TooltipDirective } from 'cloud-ide-element';\r\nimport { CideEleSkeletonLoaderComponent } from 'cloud-ide-element';\r\nimport { CideLytSidedrawerService, SidedrawerItem } from '../sidedrawer.service';\r\nimport { take } from 'rxjs';\r\nimport { NgClass, NgFor, NgIf } from '@angular/common';\r\nimport { CideLytRequestService } from '../../request/request.service'; // Import request service\r\nimport { NotesComponentState } from '../sidedrawer-notes/sidedrawer-notes.component';\r\nimport { TabStateService } from '../../../services/tab-state.service';\r\n\r\n// Type guard for setState/getState\r\nfunction hasStateMethods(instance: unknown): instance is { getState: () => NotesComponentState; setState: (state: NotesComponentState) => void; context?: { configFor?: string } } {\r\n return !!instance && typeof (instance as { getState?: unknown }).getState === 'function' && typeof (instance as { setState?: unknown }).setState === 'function';\r\n}\r\n\r\n// Type guard for NotesComponentState\r\nfunction isNotesComponentState(state: unknown): state is NotesComponentState {\r\n return !!state && typeof state === 'object' &&\r\n 'newNoteModel' in state &&\r\n 'isFormVisible' in state &&\r\n 'scrollTop' in state;\r\n}\r\n\r\n@Component({\r\n selector: 'cide-lyt-sidedrawer-wrapper',\r\n standalone: true,\r\n imports: [\r\n NgClass,\r\n CideIconComponent,\r\n CideEleResizerDirective,\r\n CideEleSkeletonLoaderComponent,\r\n NgFor,\r\n NgIf,\r\n TooltipDirective\r\n ],\r\n templateUrl: './sidedrawer-wrapper.component.html',\r\n styleUrl: './sidedrawer-wrapper.component.css'\r\n})\r\nexport class CideLytSidedrawerWrapperComponent implements OnInit {\r\n public sidedrawerSetupData = {\r\n cide_lyt_sidedrawer_width: 0\r\n };\r\n // Modern Angular v20 pattern: Use Signals directly\r\n public get drawerItems() { return this.sidedrawerService.drawerItems; }\r\n public get notesVisible() { return this.sidedrawerService.notesVisible; }\r\n public isExpanded: boolean = false; // New property to track expansion state\r\n\r\n // Computed signal to determine if sidedrawer should be visible\r\n public get shouldShowSidedrawer() {\r\n return computed(() => {\r\n const items = this.drawerItems();\r\n return items && items.length > 0;\r\n });\r\n }\r\n\r\n @ViewChild('notesContainer', { read: ViewContainerRef }) notesContainer!: ViewContainerRef;\r\n private currentComponentRef: ComponentRef<unknown> | null = null;\r\n private componentMap: { [key: string]: () => Promise<Type<unknown>> } = {}; // Map configFor to component\r\n private currentTabId: string | null = null;\r\n private currentActiveComponent: string | null = null;\r\n\r\n public sidedrawerService = inject(CideLytSidedrawerService);\r\n private requestService = inject(CideLytRequestService);\r\n private tabStateService = inject(TabStateService);\r\n\r\n constructor() {\r\n // Modern Angular v20 pattern: Use Signals directly with effect\r\n effect(() => {\r\n const configFor = this.sidedrawerService.activeComponent();\r\n this.currentActiveComponent = configFor;\r\n this.loadComponent(configFor);\r\n }, { allowSignalWrites: true });\r\n \r\n // Effect to track active tab changes\r\n effect(() => {\r\n const activeTabId = this.requestService.activeTabId();\r\n console.log('🔍 SIDEDRAWER - Active tab changed:', activeTabId);\r\n this.currentTabId = activeTabId;\r\n \r\n if (activeTabId) {\r\n console.log('🔍 SIDEDRAWER - Loading tab state for:', activeTabId);\r\n this.tabStateService.getTabState(activeTabId).pipe(take(1)).subscribe(tabState => {\r\n console.log('🔍 SIDEDRAWER - Tab state loaded:', tabState);\r\n const sideDrawer = tabState?.componentState.sideDrawer;\r\n if (sideDrawer) {\r\n console.log('🔍 SIDEDRAWER - Restoring drawer state:', sideDrawer);\r\n // Restore activeComponent\r\n this.sidedrawerService.setActiveComponent(sideDrawer.activeComponent);\r\n // Modern ES2022+ pattern: Use Promise-based delay with microtask\r\n Promise.resolve().then(() => {\r\n if (sideDrawer.activeComponent && this.currentComponentRef && hasStateMethods(this.currentComponentRef.instance)) {\r\n const compState = sideDrawer.componentState?.[sideDrawer.activeComponent];\r\n // Add type guards for each component as needed\r\n if (sideDrawer.activeComponent === 'drowar_notes' && isNotesComponentState(compState)) {\r\n this.currentComponentRef.instance.setState(compState);\r\n }\r\n }\r\n });\r\n } else {\r\n console.log('🔍 SIDEDRAWER - No drawer state found, clearing active component');\r\n this.sidedrawerService.setActiveComponent(null);\r\n }\r\n });\r\n } else {\r\n console.log('🔍 SIDEDRAWER - No active tab, clearing drawer state');\r\n this.sidedrawerService.setActiveComponent(null);\r\n }\r\n }, { allowSignalWrites: true });\r\n \r\n // collecte the width of the sidebar by using the style property\r\n const cide_lyt_sidedrawer_wrapper_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-sidedrawer-wrapper-width'));\r\n this.sidedrawerSetupData.cide_lyt_sidedrawer_width = (cide_lyt_sidedrawer_wrapper_width);\r\n }\r\n\r\n ngOnInit(): void {\r\n // Initialize the component map (You'd likely populate this from a config or service)\r\n this.componentMap['drowar_notes'] = () => import('../sidedrawer-notes/sidedrawer-notes.component').then(m => m.CideLytSidedrawerNotesComponent);\r\n this.componentMap['drawer_theme'] = () => import('../drawer-theme/drawer-theme.component').then(m => m.CideLytDrawerThemeComponent);\r\n }\r\n\r\n async loadComponent(configFor: string | null) {\r\n console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);\r\n \r\n // Always clear the container and destroy the previous component\r\n this.notesContainer?.clear();\r\n if (this.currentComponentRef) {\r\n this.currentComponentRef.destroy();\r\n this.currentComponentRef = null;\r\n }\r\n\r\n if (!configFor) {\r\n console.log('🔍 SIDEDRAWER - No component to load, collapsing');\r\n this.isExpanded = false;\r\n this.saveSidedrawerState(null);\r\n return;\r\n }\r\n\r\n console.log('🔍 SIDEDRAWER - Expanding and loading:', configFor);\r\n this.isExpanded = true;\r\n \r\n const componentLoader = this.componentMap[configFor];\r\n console.log('🔍 SIDEDRAWER - Component loader found:', !!componentLoader);\r\n \r\n if (componentLoader) {\r\n try {\r\n console.log('🔍 SIDEDRAWER - Importing component for:', configFor);\r\n const componentType = await componentLoader();\r\n console.log('🔍 SIDEDRAWER - Component imported successfully');\r\n \r\n this.currentComponentRef = this.notesContainer.createComponent(componentType);\r\n console.log('🔍 SIDEDRAWER - Component created successfully');\r\n\r\n // Add the cide-lyt-sidedrawer-wrapper-child class to the created component\r\n if (this.currentComponentRef.location.nativeElement) {\r\n this.currentComponentRef.location.nativeElement.classList.add('cide-lyt-sidedrawer-wrapper-child');\r\n }\r\n\r\n this.setComponentContext(configFor);\r\n // Optionally restore state here if you have it\r\n this.saveSidedrawerState(configFor);\r\n console.log('🔍 SIDEDRAWER - Component setup completed');\r\n } catch (error) {\r\n console.error(`🚨 SIDEDRAWER - Error loading component for ${configFor}:`, error);\r\n this.isExpanded = false;\r\n }\r\n } else {\r\n console.warn(`⚠️ SIDEDRAWER - No component mapping found for configFor: ${configFor}`);\r\n console.log('🔍 SIDEDRAWER - Available mappings:', Object.keys(this.componentMap));\r\n this.isExpanded = false;\r\n }\r\n }\r\n\r\n private clearComponent(destroy: boolean = true) {\r\n this.saveSidedrawerState();\r\n this.notesContainer?.clear();\r\n if (this.currentComponentRef && destroy) {\r\n this.currentComponentRef.destroy();\r\n }\r\n this.currentComponentRef = null;\r\n }\r\n\r\n private saveSidedrawerState(configForOverride?: string | null) {\r\n console.log('🔍 SIDEDRAWER - Saving state, current tab:', this.currentTabId);\r\n \r\n if (!this.currentTabId) {\r\n console.log('⚠️ SIDEDRAWER - No current tab, skipping state save');\r\n return;\r\n }\r\n \r\n const activeComponent = configForOverride !== undefined ? configForOverride : this.currentActiveComponent;\r\n console.log('🔍 SIDEDRAWER - Active component for save:', activeComponent);\r\n \r\n let componentState: { [componentKey: string]: unknown } | undefined = undefined;\r\n if (this.currentComponentRef && hasStateMethods(this.currentComponentRef.instance) && activeComponent) {\r\n const state = this.currentComponentRef.instance.getState();\r\n // Add type guards for each component as needed\r\n if (activeComponent === 'drowar_notes' && isNotesComponentState(state)) {\r\n componentState = { [activeComponent]: state };\r\n }\r\n // Example for other components:\r\n // else if (activeComponent === 'other_component' && isOtherComponentState(state)) {\r\n // componentState = { [activeComponent]: state };\r\n // }\r\n }\r\n \r\n console.log('🔍 SIDEDRAWER - Updating tab state with:', {\r\n isOpen: !!activeComponent,\r\n activeComponent,\r\n componentState\r\n });\r\n \r\n this.tabStateService.updateActiveTabState({\r\n sideDrawer: {\r\n isOpen: !!activeComponent,\r\n activeComponent,\r\n componentState\r\n }\r\n });\r\n }\r\n\r\n private setComponentContext(configFor: string) {\r\n // You can adjust this logic to pass different context data based on configFor if needed.\r\n const context = this.getNotesContext(configFor); // Using your existing method for now.\r\n if (this.currentComponentRef && context && this.currentComponentRef.setInput) {\r\n // Pass context data\r\n this.currentComponentRef.setInput('context', context);\r\n }\r\n }\r\n // This function needs to be enhanced to handle contexts for different components\r\n private getNotesContext(configFor: string) {\r\n switch (configFor) {\r\n case 'drowar_notes': {\r\n // Example for notes component context\r\n const activeTab = this.requestService.activeTab(); // Use the computed signal for active tab\r\n return {\r\n pageId: activeTab?.sytm_page_id_sypg,\r\n themeId: activeTab?.themeId,\r\n // Add other properties as needed for notes\r\n };\r\n }\r\n case 'drawer_theme': {\r\n // You can add theme context here if needed\r\n return {};\r\n }\r\n default:\r\n return null; // Or a default context if appropriate\r\n }\r\n }\r\n onItemClick(item: SidedrawerItem): void {\r\n const activeTabId = this.requestService.activeTabId();\r\n console.log('🔍 SIDEDRAWER - Item clicked:', item);\r\n console.log('🔍 SIDEDRAWER - Active tab ID:', activeTabId);\r\n \r\n // Modern Angular v20 pattern: Use Signals directly\r\n const activeComponent = this.sidedrawerService.activeComponent();\r\n console.log('🔍 SIDEDRAWER - Current active component:', activeComponent);\r\n console.log('🔍 SIDEDRAWER - Item configFor:', item.configFor);\r\n \r\n if (activeComponent === item?.configFor) {\r\n console.log('🔄 SIDEDRAWER - Same component clicked, toggling off');\r\n const cide_lyt_sidedrawer_wrapper = document.querySelector('#cide-lyt-sidedrawer-wrapper');\r\n const cide_lyt_outlet_wrapper = document.querySelector('#cide-lyt-outlet-wrapper');\r\n if (cide_lyt_sidedrawer_wrapper instanceof HTMLElement && cide_lyt_outlet_wrapper instanceof HTMLElement) {\r\n const width_of_prev = parseInt(cide_lyt_outlet_wrapper.style.width);\r\n const width_of_next = parseInt(cide_lyt_sidedrawer_wrapper.style.width);\r\n const width_of_next_default = 32;\r\n const width_of_prev_default = width_of_prev + (width_of_next - width_of_next_default);\r\n cide_lyt_outlet_wrapper.style.width = `${width_of_prev_default}px`;\r\n cide_lyt_sidedrawer_wrapper.style.width = `${width_of_next_default}px`; // Fix: Cast to HTMLElement to access style property\r\n }\r\n this.sidedrawerService.setActiveComponent(null); // Destroy if same\r\n this.saveSidedrawerState(null);\r\n } else {\r\n console.log('✅ SIDEDRAWER - New component clicked, setting active:', item.configFor);\r\n this.sidedrawerService.setActiveComponent(item.configFor); // Set new\r\n this.saveSidedrawerState(item.configFor);\r\n }\r\n }\r\n}\r\n","<nav *ngIf=\"shouldShowSidedrawer()\" \r\n [ngClass]=\"{'expanded tw-min-w-[var(--cide-lyt-sidedrawer-wrapper-width-expanded-min)]': isExpanded, 'tw-w-[var(--cide-lyt-sidedrawer-wrapper-width)]': !isExpanded}\"\r\n id=\"cide-lyt-sidedrawer-wrapper\" class=\"tw-flex tw-relative tw-flex-col tw-items-center tw-justify-between tw-h-full tw-bg-white tw-shadow-lg tw-border-l tw-border-gray-200\">\r\n <!-- Resizer Divider -->\r\n <div parentElementSelector=\"#cide-lyt-outlet-sidedrawer-wrapper\"\r\n [minNextSize]=\"sidedrawerSetupData.cide_lyt_sidedrawer_width\" prevElementSelector=\"#cide-lyt-outlet-wrapper\"\r\n nextElementSelector=\"#cide-lyt-sidedrawer-wrapper\" cideEleResizer direction=\"horizontal\" to=\"right-to-left\">\r\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\r\n </div>\r\n <!-- Main Icon Area -->\r\n <div class=\"tw-flex tw-justify-between tw-h-full tw-w-full\">\r\n <div class=\"tw-w-8 tw-h-full tw-border-r tw-border-gray-200\">\r\n <div class=\"sidedrawer-icon tw-flex tw-flex-col tw-items-center tw-gap-2\">\r\n <ng-container *ngIf=\"drawerItems() as items; else loading\">\r\n <div *ngFor=\"let item of items\" [title]=\"item.title\">\r\n <button (click)=\"onItemClick(item)\"\r\n class=\"tw-p-0 tw-rounded-md hover:tw-bg-gray-100 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500\"\r\n [ngClass]=\"{'tw-bg-blue-100 tw-text-blue-700': sidedrawerService.activeComponent() === item.configFor}\">\r\n <cide-ele-icon [cideEleTooltip]=\"item.title\" tooltipPlacement=\"left\" width=\"1.3rem\" height=\"1.5rem\" type=\"box\">{{item.icon}}</cide-ele-icon>\r\n </button>\r\n </div>\r\n </ng-container>\r\n <ng-template #loading>\r\n <cide-ele-skeleton-loader [width]=\"'2rem'\" [height]=\"'2rem'\" [count]=\"3\"\r\n [circle]=\"true\"></cide-ele-skeleton-loader>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class=\"tw-flex-1 cide-lyt-sidedrawer-wrapper-child-holder\">\r\n <div #notesContainer class=\"tw-h-full\">\r\n </div>\r\n </div>\r\n </div>\r\n</nav>","import { Component, OnInit, OnDestroy, inject, signal, computed } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { FormsModule } from '@angular/forms';\nimport { \n KeyboardShortcutService, \n KeyboardShortcut,\n FloatingContainerShortcutsService\n} from 'cloud-ide-element';\nimport { CideIconComponent, CideEleButtonComponent } from 'cloud-ide-element';\n\n/**\n * Shortcut Display Interface\n */\nexport interface ShortcutDisplay {\n id: string;\n title: string;\n description?: string;\n keyCombination: string;\n category: string;\n featuredHTML?: string;\n isUserDefined: boolean;\n}\n\n/**\n * Shortcuts Panel Component\n * Displays all registered keyboard shortcuts (system and user-defined)\n */\n@Component({\n selector: 'cide-lyt-shortcuts-panel',\n standalone: true,\n imports: [CommonModule, FormsModule, CideIconComponent, CideEleButtonComponent],\n template: `\n <div class=\"tw-p-6 tw-space-y-4 tw-bg-white dark:tw-bg-gray-900\">\n <!-- View Toggle and Refresh -->\n <div class=\"tw-flex tw-items-center tw-justify-end tw-gap-2 tw-mb-4\">\n <button\n type=\"button\"\n cideEleButton\n variant=\"outline\"\n size=\"sm\"\n (click)=\"loadShortcuts()\"\n title=\"Refresh shortcuts\">\n <cide-ele-icon>refresh</cide-ele-icon>\n Refresh\n </button>\n <button\n type=\"button\"\n cideEleButton\n variant=\"outline\"\n size=\"sm\"\n (click)=\"toggleView()\">\n <cide-ele-icon>{{ viewMode() === 'grouped' ? 'view_list' : 'category' }}</cide-ele-icon>\n {{ viewMode() === 'grouped' ? 'List View' : 'Grouped View' }}\n </button>\n </div>\n\n <!-- Search -->\n <div class=\"tw-relative\">\n <cide-ele-icon class=\"tw-absolute tw-left-2 tw-top-1/2 tw-transform -tw-translate-y-1/2 tw-text-gray-400\">search</cide-ele-icon>\n <input\n type=\"text\"\n [value]=\"searchQuery()\"\n (input)=\"searchQuery.set($any($event.target).value)\"\n placeholder=\"Search shortcuts...\"\n class=\"tw-w-full tw-pl-8 tw-pr-3 tw-py-2 tw-text-sm tw-border tw-border-gray-300 dark:tw-border-gray-600 tw-rounded-lg tw-bg-white dark:tw-bg-gray-800 tw-text-gray-900 dark:tw-text-gray-100 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500\">\n </div>\n\n <!-- Shortcuts Content -->\n @if (filteredShortcuts().length === 0) {\n <div class=\"tw-py-12 tw-text-center\">\n <cide-ele-icon class=\"tw-text-4xl tw-text-gray-300 dark:tw-text-gray-600 tw-mb-2\">keyboard_off</cide-ele-icon>\n <p class=\"tw-text-sm tw-text-gray-500 dark:tw-text-gray-400\">No shortcuts found</p>\n </div>\n } @else {\n @if (viewMode() === 'grouped') {\n <!-- Grouped View -->\n @for (category of categories(); track category) {\n <div class=\"tw-space-y-2\">\n <h4 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-uppercase tw-tracking-wide tw-mt-4 tw-mb-2\">\n {{ category }}\n </h4>\n <div class=\"tw-space-y-2\">\n @for (shortcut of getShortcutsByCategory(category); track shortcut.id) {\n <div class=\"tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700 hover:tw-border-blue-500 dark:hover:tw-border-blue-400 tw-transition-colors\">\n @if (shortcut.featuredHTML) {\n <div class=\"tw-mb-2 tw-p-2 tw-bg-white dark:tw-bg-gray-800 tw-rounded tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div [innerHTML]=\"sanitizeHTML(shortcut.featuredHTML)\"></div>\n </div>\n }\n <div class=\"tw-flex tw-items-start tw-justify-between tw-gap-3\">\n <div class=\"tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mb-1\">\n <h5 class=\"tw-m-0 tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">\n {{ shortcut.title }}\n </h5>\n @if (shortcut.isUserDefined) {\n <span class=\"tw-px-1.5 tw-py-0.5 tw-text-[10px] tw-font-semibold tw-text-blue-600 dark:tw-text-blue-400 tw-bg-blue-50 dark:tw-bg-blue-900/30 tw-rounded\">Custom</span>\n }\n </div>\n @if (shortcut.description) {\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-600 dark:tw-text-gray-400\">{{ shortcut.description }}</p>\n }\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-flex-shrink-0\">\n @for (key of getKeyParts(shortcut.keyCombination); track $index; let isLast = $last) {\n <kbd class=\"tw-px-2 tw-py-1 tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-bg-gray-200 dark:tw-bg-gray-600 tw-border tw-border-gray-300 dark:tw-border-gray-500 tw-rounded tw-shadow-sm\">\n {{ key }}\n </kbd>\n @if (!isLast) {\n <span class=\"tw-text-gray-400 tw-text-xs\">+</span>\n }\n }\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n } @else {\n <!-- List View -->\n <div class=\"tw-space-y-2\">\n @for (shortcut of filteredShortcuts(); track shortcut.id) {\n <div class=\"tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700 hover:tw-border-blue-500 dark:hover:tw-border-blue-400 tw-transition-colors\">\n @if (shortcut.featuredHTML) {\n <div class=\"tw-mb-2 tw-p-2 tw-bg-white dark:tw-bg-gray-800 tw-rounded tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div [innerHTML]=\"sanitizeHTML(shortcut.featuredHTML)\"></div>\n </div>\n }\n <div class=\"tw-flex tw-items-start tw-justify-between tw-gap-3\">\n <div class=\"tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mb-1\">\n <h5 class=\"tw-m-0 tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">\n {{ shortcut.title }}\n </h5>\n @if (shortcut.isUserDefined) {\n <span class=\"tw-px-1.5 tw-py-0.5 tw-text-[10px] tw-font-semibold tw-text-blue-600 dark:tw-text-blue-400 tw-bg-blue-50 dark:tw-bg-blue-900/30 tw-rounded\">Custom</span>\n }\n </div>\n @if (shortcut.description) {\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-600 dark:tw-text-gray-400\">{{ shortcut.description }}</p>\n }\n @if (shortcut.category) {\n <span class=\"tw-inline-block tw-mt-1 tw-px-1.5 tw-py-0.5 tw-text-[10px] tw-font-medium tw-text-gray-500 dark:tw-text-gray-400 tw-bg-gray-100 dark:tw-bg-gray-600 tw-rounded\">\n {{ shortcut.category }}\n </span>\n }\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-flex-shrink-0\">\n @for (key of getKeyParts(shortcut.keyCombination); track $index) {\n <kbd class=\"tw-px-2 tw-py-1 tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-bg-gray-200 dark:tw-bg-gray-600 tw-border tw-border-gray-300 dark:tw-border-gray-500 tw-rounded tw-shadow-sm\">\n {{ key }}\n </kbd>\n @if (!$last) {\n <span class=\"tw-text-gray-400 tw-text-xs\">+</span>\n }\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n `,\n styles: [`\n :host {\n display: block;\n }\n \n kbd {\n font-family: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace;\n font-size: 0.75rem;\n line-height: 1.5;\n }\n `]\n})\nexport class ShortcutsPanelComponent implements OnInit, OnDestroy {\n private keyboardShortcutService = inject(KeyboardShortcutService);\n private sanitizer = inject(DomSanitizer);\n // Inject FloatingContainerShortcutsService to ensure it's initialized and shortcuts are registered\n private floatingContainerShortcutsService = inject(FloatingContainerShortcutsService);\n private refreshInterval?: any;\n\n shortcuts = signal<ShortcutDisplay[]>([]);\n searchQuery = signal<string>('');\n viewMode = signal<'grouped' | 'list'>('grouped');\n\n filteredShortcuts = computed(() => {\n const query = this.searchQuery().toLowerCase();\n if (!query) return this.shortcuts();\n \n return this.shortcuts().filter(shortcut =>\n shortcut.title.toLowerCase().includes(query) ||\n shortcut.description?.toLowerCase().includes(query) ||\n shortcut.keyCombination.toLowerCase().includes(query) ||\n shortcut.category.toLowerCase().includes(query)\n );\n });\n\n categories = computed(() => {\n const cats = new Set<string>();\n this.shortcuts().forEach(s => {\n if (s.category) cats.add(s.category);\n });\n return Array.from(cats).sort();\n });\n\n ngOnInit(): void {\n // FloatingContainerShortcutsService is now injected, so it's initialized\n // Load shortcuts immediately\n this.loadShortcuts();\n \n // Reload shortcuts periodically to catch dynamically registered shortcuts\n // This ensures floating container shortcuts and custom shortcuts are shown\n this.refreshInterval = setInterval(() => {\n this.loadShortcuts();\n }, 3000); // Reload every 3 seconds\n }\n\n ngOnDestroy(): void {\n if (this.refreshInterval) {\n clearInterval(this.refreshInterval);\n }\n }\n\n /**\n * Load all shortcuts from services\n */\n loadShortcuts(): void {\n const displayShortcuts: ShortcutDisplay[] = [];\n\n // Load from KeyboardShortcutService\n const keyboardShortcuts = this.keyboardShortcutService.getAllShortcuts();\n keyboardShortcuts.forEach(shortcut => {\n displayShortcuts.push(this.convertToDisplay(shortcut));\n });\n\n // TODO: Load from AppShortcutService when available\n // For now, only KeyboardShortcutService shortcuts are loaded\n\n // Sort by category, then by title\n displayShortcuts.sort((a, b) => {\n if (a.category !== b.category) {\n return a.category.localeCompare(b.category);\n }\n return a.title.localeCompare(b.title);\n });\n\n this.shortcuts.set(displayShortcuts);\n }\n\n /**\n * Convert KeyboardShortcut to ShortcutDisplay\n */\n private convertToDisplay(shortcut: KeyboardShortcut): ShortcutDisplay {\n const extended = shortcut as KeyboardShortcut & {\n title?: string;\n category?: string;\n isUserDefined?: boolean;\n featuredHTML?: string;\n };\n \n // Auto-detect category based on shortcut ID\n const autoCategory = this.detectCategory(shortcut.id);\n \n return {\n id: shortcut.id,\n title: extended.title || shortcut.description || this.formatTitleFromId(shortcut.id),\n description: shortcut.description,\n keyCombination: this.formatKeyCombination(shortcut),\n category: extended.category || autoCategory,\n isUserDefined: extended.isUserDefined || false,\n featuredHTML: extended.featuredHTML\n };\n }\n\n /**\n * Detect category from shortcut ID\n */\n private detectCategory(shortcutId: string): string {\n const id = shortcutId.toLowerCase();\n \n if (id.startsWith('floating-container-')) {\n return 'Floating Containers';\n }\n if (id.startsWith('app-') || id.includes('sidebar') || id.includes('theme') || id.includes('settings')) {\n return 'Application';\n }\n if (id.includes('navigation') || id.includes('navigate')) {\n return 'Navigation';\n }\n if (id.includes('edit') || id.includes('save') || id.includes('delete')) {\n return 'Editing';\n }\n if (id.includes('view') || id.includes('toggle') || id.includes('show') || id.includes('hide')) {\n return 'View';\n }\n \n return 'General';\n }\n\n /**\n * Format title from shortcut ID\n */\n private formatTitleFromId(id: string): string {\n // Convert kebab-case to Title Case\n return id\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n }\n\n /**\n * Format key combination string\n */\n private formatKeyCombination(shortcut: KeyboardShortcut): string {\n const parts: string[] = [];\n if (shortcut.ctrlKey) parts.push('Ctrl');\n if (shortcut.altKey) parts.push('Alt');\n if (shortcut.shiftKey) parts.push('Shift');\n if (shortcut.metaKey) parts.push('Meta');\n parts.push(shortcut.key.toUpperCase());\n return parts.join(' + ');\n }\n\n /**\n * Get shortcuts by category\n */\n getShortcutsByCategory(category: string): ShortcutDisplay[] {\n return this.filteredShortcuts().filter(s => s.category === category);\n }\n\n /**\n * Get key parts for display\n */\n getKeyParts(keyCombination: string): string[] {\n return keyCombination.split(' + ');\n }\n\n /**\n * Sanitize HTML content\n */\n sanitizeHTML(html: string | undefined): any {\n if (!html) return '';\n return this.sanitizer.sanitize(1, html); // SecurityContext.HTML = 1\n }\n\n /**\n * Toggle view mode\n */\n toggleView(): void {\n this.viewMode.set(this.viewMode() === 'grouped' ? 'list' : 'grouped');\n }\n\n /**\n * Handle search query change\n */\n onSearchChange(): void {\n // Computed signal will automatically update\n }\n}\n\n","import { Component, OnInit, inject, signal, computed } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CideIconComponent, CideEleButtonComponent } from 'cloud-ide-element';\nimport { NotificationSettingsComponent } from '../notification-settings/notification-settings.component';\nimport { ShortcutsPanelComponent } from '../shortcuts-panel/shortcuts-panel.component';\n\n/**\n * Settings Section Interface\n */\nexport interface SettingsSection {\n id: string;\n title: string;\n icon: string;\n description?: string;\n component?: any;\n badge?: string;\n}\n\n/**\n * Settings Container Component\n * Main settings panel with left sidebar navigation and content area\n */\n@Component({\n selector: 'cide-lyt-settings-container',\n standalone: true,\n imports: [\n CommonModule,\n CideIconComponent,\n NotificationSettingsComponent,\n ShortcutsPanelComponent\n ],\n template: `\n <div class=\"tw-flex tw-h-full tw-bg-white dark:tw-bg-gray-900 tw-text-gray-900 dark:tw-text-gray-100\">\n <!-- Left Sidebar Navigation -->\n <div class=\"tw-w-64 tw-border-r tw-border-gray-200 dark:tw-border-gray-700 tw-bg-gray-50 dark:tw-bg-gray-800 tw-flex tw-flex-col\">\n <!-- Header -->\n <div class=\"tw-px-4 tw-py-4 tw-border-b tw-border-gray-200 dark:tw-border-gray-700\">\n <h2 class=\"tw-m-0 tw-text-base tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100\">Settings</h2>\n <p class=\"tw-m-0 tw-mt-1 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400\">Manage your preferences</p>\n </div>\n\n <!-- Navigation List -->\n <nav class=\"tw-flex-1 tw-overflow-y-auto tw-p-2\">\n @for (section of sections(); track section.id) {\n <button\n type=\"button\"\n cideEleButton\n [ngClass]=\"{\n 'tw-bg-blue-50 dark:tw-bg-blue-900/20 tw-text-blue-600 dark:tw-text-blue-400': selectedSection() === section.id,\n 'tw-text-gray-700 dark:tw-text-gray-300': selectedSection() !== section.id\n }\"\n (click)=\"selectSection(section.id)\"\n class=\"tw-w-full tw-flex tw-items-center tw-gap-3 tw-px-3 tw-py-2.5 tw-mb-1 tw-rounded-lg tw-transition-colors tw-text-left hover:tw-bg-gray-100 dark:hover:tw-bg-gray-700 tw-justify-start\">\n <cide-ele-icon class=\"tw-text-lg\">{{ section.icon }}</cide-ele-icon>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <span class=\"tw-text-sm tw-font-medium tw-truncate\">{{ section.title }}</span>\n @if (section.badge) {\n <span class=\"tw-px-1.5 tw-py-0.5 tw-text-[10px] tw-font-semibold tw-text-white tw-bg-blue-500 tw-rounded\">{{ section.badge }}</span>\n }\n </div>\n @if (section.description) {\n <p class=\"tw-m-0 tw-mt-0.5 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400 tw-truncate\">{{ section.description }}</p>\n }\n </div>\n </button>\n }\n </nav>\n </div>\n\n <!-- Main Content Area -->\n <div class=\"tw-flex-1 tw-flex tw-flex-col tw-overflow-hidden\">\n <!-- Content Header -->\n <div class=\"tw-px-6 tw-py-4 tw-border-b tw-border-gray-200 dark:tw-border-gray-700 tw-bg-white dark:tw-bg-gray-900\">\n @if (currentSection()) {\n <div class=\"tw-flex tw-items-center tw-justify-between\">\n <div>\n <h3 class=\"tw-m-0 tw-text-lg tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100\">\n {{ currentSection()?.title }}\n </h3>\n @if (currentSection()?.description) {\n <p class=\"tw-m-0 tw-mt-1 tw-text-sm tw-text-gray-500 dark:tw-text-gray-400\">\n {{ currentSection()?.description }}\n </p>\n }\n </div>\n </div>\n }\n </div>\n\n <!-- Content Body -->\n <div class=\"tw-flex-1 tw-overflow-y-auto tw-bg-white dark:tw-bg-gray-900\">\n @switch (selectedSection()) {\n @case ('notifications') {\n <cide-lyt-notification-settings></cide-lyt-notification-settings>\n }\n @case ('shortcuts') {\n <cide-lyt-shortcuts-panel></cide-lyt-shortcuts-panel>\n }\n @default {\n <div class=\"tw-p-6\">\n <div class=\"tw-text-center tw-py-12\">\n <cide-ele-icon class=\"tw-text-4xl tw-text-gray-300 dark:tw-text-gray-600 tw-mb-3\">{{ currentSection()?.icon || 'settings' }}</cide-ele-icon>\n <h4 class=\"tw-text-base tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100 tw-mb-1\">\n {{ currentSection()?.title || 'Settings' }}\n </h4>\n <p class=\"tw-text-sm tw-text-gray-500 dark:tw-text-gray-400\">\n {{ currentSection()?.description || 'Select a section from the sidebar to view settings.' }}\n </p>\n </div>\n </div>\n }\n }\n </div>\n </div>\n </div>\n `,\n styles: [`\n :host {\n display: block;\n height: 100%;\n }\n `]\n})\nexport class SettingsContainerComponent implements OnInit {\n selectedSection = signal<string>('notifications');\n \n sections = signal<SettingsSection[]>([\n {\n id: 'notifications',\n title: 'Notifications',\n icon: 'notifications',\n description: 'Manage notification preferences',\n component: NotificationSettingsComponent\n },\n {\n id: 'shortcuts',\n title: 'Keyboard Shortcuts',\n icon: 'keyboard',\n description: 'View and manage keyboard shortcuts',\n component: ShortcutsPanelComponent\n },\n {\n id: 'appearance',\n title: 'Appearance',\n icon: 'palette',\n description: 'Customize theme and display'\n },\n {\n id: 'account',\n title: 'Account',\n icon: 'account_circle',\n description: 'Manage your account settings'\n },\n {\n id: 'security',\n title: 'Security',\n icon: 'lock',\n description: 'Password and security settings'\n },\n {\n id: 'privacy',\n title: 'Privacy',\n icon: 'privacy_tip',\n description: 'Privacy and data settings'\n }\n ]);\n\n currentSection = computed(() => {\n return this.sections().find(s => s.id === this.selectedSection());\n });\n\n ngOnInit(): void {\n // Initialize with first section if none selected\n if (!this.selectedSection() && this.sections().length > 0) {\n this.selectedSection.set(this.sections()[0].id);\n }\n }\n\n selectSection(sectionId: string): void {\n this.selectedSection.set(sectionId);\n }\n}\n\n","import { Component, inject } from '@angular/core';\nimport { CideEleResizerDirective, CideIconComponent, CideEleFloatingContainerService } from 'cloud-ide-element';\nimport { SettingsContainerComponent } from '../../../components/settings-container/settings-container.component';\n\n@Component({\n selector: 'cide-lyt-footer-wrapper',\n standalone: true,\n imports: [CideIconComponent, CideEleResizerDirective],\n templateUrl: './footer-wrapper.component.html',\n styleUrl: './footer-wrapper.component.css'\n})\nexport class CideLytFooterWrapperComponent {\n private floatingContainerService = inject(CideEleFloatingContainerService);\n\n public footerSetupData = {\n cide_lyt_footer_height: 0\n }\n\n constructor() {\n // collecte the width of the sidebar by using the style property\n const cide_lyt_sidedrawer_wrapper_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-sidedrawer-wrapper-width'));\n\n this.footerSetupData.cide_lyt_footer_height = (cide_lyt_sidedrawer_wrapper_width);\n }\n\n /**\n * Open settings panel in floating container\n */\n async openSettingsPanel(): Promise<void> {\n // Ensure component is registered\n if (!this.floatingContainerService.isComponentRegistered('settings-container')) {\n this.floatingContainerService.registerComponent('settings-container', SettingsContainerComponent);\n }\n\n const containerId = this.floatingContainerService.show({\n id: `settings-container-${Date.now()}`,\n title: 'Settings',\n icon: 'settings',\n width: '900px',\n height: '700px',\n minWidth: '700px',\n minHeight: '500px',\n maxWidth: '95vw',\n maxHeight: '95vh',\n resizable: true,\n draggable: true,\n closable: true,\n minimizable: true,\n maximizable: true,\n backdrop: false,\n componentId: 'settings-container',\n componentConfig: {\n inputs: {},\n outputs: {}\n }\n });\n\n this.floatingContainerService.bringToFront(containerId);\n }\n}\n","<div\n class=\"cide-footer tw-w-full tw-justify-between tw-flex tw-h-5 tw-select-none tw-px-1\">\n <!-- Resizer -->\n <div parentElementSelector=\"#cide-lyt-layout-wrapper\" prevElementSelector=\"#cide-lyt-sidebar-page-wrapper\"\n nextElementSelector=\"#cide-lyt-footer-console-wrapper\" [minNextSize]=\"footerSetupData.cide_lyt_footer_height\" cideEleResizer direction=\"vertical\">\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\n </div>\n <div></div>\n <div class=\"tw-flex tw-items-center tw-gap-1.5\">\n <cide-ele-icon \n size=\"3xs\" \n class=\"tw-mt-0.5 tw-cursor-pointer tw-text-gray-500 dark:tw-text-gray-400 hover:tw-text-blue-600 dark:hover:tw-text-blue-400 tw-transition-colors\" \n type=\"none\"\n (click)=\"openSettingsPanel()\"\n title=\"Settings\">\n settings\n </cide-ele-icon>\n <cide-ele-icon size=\"3xs\" class=\"tw-mt-0.5\" type=\"none\">contact_support</cide-ele-icon>\n </div>\n</div>","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'cide-lyt-console-wrapper',\r\n standalone: true,\r\n imports: [],\r\n templateUrl: './console-wrapper.component.html',\r\n styleUrl: './console-wrapper.component.css'\r\n})\r\nexport class CideLytConsoleWrapperComponent {\r\n\r\n}\r\n","<div id=\"cide-lyt-console-wrapper\" class=\"cide-lyt-console tw-w-full tw-absolute tw-items-center tw-bg-gray-50 tw-h-0 tw-border-b-gray-200 tw-border-solid tw-border-t tw-select-none tw-z-[100] tw-bottom-0 tw-px-3\">\r\n\r\n</div>\r\n<!-- h-6 -->","import { Component, ElementRef, ViewChildren, QueryList, AfterViewInit, inject } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CideIconComponent } from 'cloud-ide-element';\r\nimport { CideLytRequestService } from '../request.service';\r\n\r\n@Component({\r\n selector: 'cide-lyt-request-wrapper',\r\n standalone: true,\r\n imports: [CommonModule, CideIconComponent],\r\n templateUrl: './request-wrapper.component.html',\r\n styleUrl: './request-wrapper.component.css'\r\n})\r\nexport class CideLytRequestWrapperComponent implements AfterViewInit {\r\n protected requestService = inject(CideLytRequestService);\r\n @ViewChildren('requestItemEl') requestItemElements!: QueryList<ElementRef>;\r\n \r\n // Modern Signal-based access for better performance\r\n public requestItems = this.requestService.tabs;\r\n \r\n ngAfterViewInit() {\r\n // Apply entrance animation to initial items\r\n this.applyAnimations();\r\n \r\n // Listen for changes in request items and apply animations\r\n this.requestItemElements.changes.subscribe({\r\n next: () => {\r\n this.applyAnimations();\r\n }\r\n });\r\n }\r\n\r\n // Apply animations to request items\r\n private applyAnimations() {\r\n if (!this.requestItemElements) return;\r\n \r\n this.requestItemElements.forEach((itemEl: ElementRef) => {\r\n const element = itemEl.nativeElement;\r\n element.classList.remove('request-item-enter');\r\n void element.offsetWidth; // Force reflow\r\n element.classList.add('request-item-enter');\r\n });\r\n }\r\n\r\n // Apply flicker effect to clicked item\r\n applyFlickerEffect(event: Event): void {\r\n const target = event.currentTarget as HTMLElement;\r\n if (target) {\r\n // Remove any existing flicker class\r\n target.classList.remove('request-item-flicker');\r\n \r\n // Force reflow to ensure the class removal is processed\r\n void target.offsetWidth;\r\n \r\n // Add flicker class to trigger animation\r\n target.classList.add('request-item-flicker');\r\n \r\n // Remove the class after animation completes\r\n setTimeout(() => {\r\n target.classList.remove('request-item-flicker');\r\n }, 400); // Match the animation duration\r\n }\r\n }\r\n}\r\n","<ng-container *ngIf=\"requestItems() as requestItems\">\r\n <div id=\"cide-lyt-request-wrapper\" class=\"cide-lyt-request tw-w-[inherit]\" [class.cide-lyt-request-wrapper-hide]=\"!requestItems.length\">\r\n <div class=\"request-content\">\r\n <ng-container *ngFor=\"let item of requestItems; let i = index\">\r\n <div #requestItemEl class=\"request-item\" (keydown.enter)=\"requestService.activateTab(item.id); applyFlickerEffect($event)\"\r\n [class.active]=\"item.active\" tabindex=\"0\" (click)=\"requestService.activateTab(item.id); applyFlickerEffect($event)\"\r\n [attr.data-tooltip]=\"item.title\">\r\n <span class=\"request-title\">{{ item.title }}</span>\r\n <button class=\"request-action close-action\" \r\n (click)=\"requestService.closeTab(item.id); $event.stopPropagation();\"\r\n (keydown.enter)=\"requestService.closeTab(item.id); $event.stopPropagation();\" \r\n tabindex=\"0\"\r\n data-tooltip=\"Close this tab\">\r\n <cide-ele-icon size=\"3xs\">close</cide-ele-icon>\r\n </button>\r\n </div>\r\n <!-- Only add divider between items -->\r\n <div class=\"request-divider\" *ngIf=\"i < requestItems.length - 1\"></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</ng-container>","import { Component, ElementRef, ViewChild, AfterViewInit, ChangeDetectorRef, effect } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NavigationEnd, Router, RouterModule } from '@angular/router';\r\nimport { CideLytRequestService, TabInfo } from '../request.service';\r\nimport { filter } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'cide-lyt-tab-content',\r\n standalone: true,\r\n imports: [CommonModule, RouterModule],\r\n template: `\r\n <div class=\"tab-content-container\" #scrollContainer (scroll)=\"onScroll()\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n `,\r\n styles: [`\r\n :host {\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n \r\n .tab-content-container {\r\n height: 100%;\r\n width: 100%;\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n flex: 1;\r\n }\r\n \r\n /* Ensure router outlet components take full height */\r\n ::ng-deep router-outlet + * {\r\n height: 100%;\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n \r\n /* Specific height fixes for common component selectors */\r\n ::ng-deep cide-lyt-home-wrapper,\r\n ::ng-deep cide-adm-home-wrapper,\r\n ::ng-deep cide-adm-entity,\r\n ::ng-deep cide-adm-entity-list {\r\n height: 100% !important;\r\n flex: 1 !important;\r\n display: flex !important;\r\n flex-direction: column !important;\r\n }\r\n `]\r\n})\r\nexport class TabContentComponent implements AfterViewInit {\r\n @ViewChild('scrollContainer') scrollContainerRef!: ElementRef<HTMLDivElement>;\r\n\r\n private currentActiveTabId: string | null = null;\r\n private isRestoringScroll = false; // Flag to prevent saving scroll during restoration attempts\r\n\r\n constructor(\r\n private requestService: CideLytRequestService,\r\n private router: Router, // Inject Router to listen for NavigationEnd\r\n private cdr: ChangeDetectorRef\r\n ) {\r\n // Modern Angular signal pattern: Use effect to react to active tab changes\r\n effect(() => {\r\n const activeTab = this.requestService.activeTab();\r\n if (activeTab && activeTab.id !== this.currentActiveTabId) {\r\n this.currentActiveTabId = activeTab.id;\r\n // Delay scroll restoration to ensure DOM is ready\r\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\r\n delay(100).then(() => this.restoreScrollPosition(activeTab));\r\n }\r\n });\r\n\r\n // Listen to route changes for scroll restoration\r\n this.router.events.pipe(\r\n filter(event => event instanceof NavigationEnd)\r\n ).subscribe({\r\n next: () => {\r\n // Use signal to get active tab after navigation\r\n const activeTab = this.requestService.activeTab();\r\n if (activeTab && activeTab.id !== this.currentActiveTabId) {\r\n this.currentActiveTabId = activeTab.id;\r\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\r\n delay(150).then(() => this.restoreScrollPosition(activeTab));\r\n }\r\n }\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n // Initial scroll restoration for the active tab\r\n const activeTab = this.requestService.activeTab();\r\n if (activeTab) {\r\n this.currentActiveTabId = activeTab.id;\r\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\r\n delay(50).then(() => this.restoreScrollPosition(activeTab));\r\n }\r\n }\r\n\r\n onScroll(): void {\r\n if (this.isRestoringScroll || !this.scrollContainerRef || !this.currentActiveTabId) {\r\n return;\r\n }\r\n const { scrollTop, scrollLeft } = this.scrollContainerRef.nativeElement;\r\n this.requestService.updateTabScrollPosition(this.currentActiveTabId, scrollTop, scrollLeft);\r\n }\r\n\r\n private restoreScrollPosition(tab: TabInfo | undefined): void {\r\n if (tab && this.scrollContainerRef?.nativeElement) {\r\n this.isRestoringScroll = true;\r\n const container = this.scrollContainerRef.nativeElement;\r\n container.scrollTop = tab.scrollTop ?? 0;\r\n container.scrollLeft = tab.scrollLeft ?? 0;\r\n // Modern ES2022+ pattern: Use Promise-based delay\r\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\r\n delay(150).then(() => { this.isRestoringScroll = false; }); // Allow scroll event to settle\r\n }\r\n }\r\n\r\n\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { CideLytHeaderWrapperComponent } from \"../../header/header-wrapper/header-wrapper.component\";\r\nimport { CideLytSidebarWrapperComponent } from \"../../sidebar/sidebar-wrapper/sidebar-wrapper.component\";\r\nimport { CideLytSidedrawerWrapperComponent } from \"../../sidedrawer/sidedrawer-wrapper/sidedrawer-wrapper.component\";\r\nimport { CideLytFooterWrapperComponent } from \"../../footer/footer-wrapper/footer-wrapper.component\";\r\nimport { CideLytConsoleWrapperComponent } from \"../../console/console-wrapper/console-wrapper.component\";\r\nimport { RouterModule } from '@angular/router';\r\nimport { CideLytRequestWrapperComponent } from \"../../request/request-wrapper/request-wrapper.component\";\r\nimport { TabContentComponent } from '../../request/tab-content/tab-content.component';\r\n\r\n@Component({\r\n selector: 'cide-lyt-layout-wrapper',\r\n standalone: true,\r\n templateUrl: './layout-wrapper.component.html',\r\n styleUrl: './layout-wrapper.component.css', \r\n imports: [\r\n CideLytHeaderWrapperComponent,\r\n CideLytSidebarWrapperComponent,\r\n CideLytSidedrawerWrapperComponent,\r\n CideLytFooterWrapperComponent,\r\n CideLytConsoleWrapperComponent,\r\n RouterModule,\r\n CideLytRequestWrapperComponent,\r\n TabContentComponent\r\n ]\r\n})\r\nexport class CideLytLayoutWrapperComponent {\r\n\r\n}\r\n","<div class=\"tw-w-full tw-table tw-h-screen tw-relative\" id=\"cide-lyt-layout-wrapper\">\r\n <!-- We will use here Header -->\r\n <cide-lyt-header-wrapper class=\"tw-table-row tw-h-0\"></cide-lyt-header-wrapper>\r\n <!-- we will use here request tabs -->\r\n <div class=\"tw-table-row\" id=\"cide-lyt-sidebar-page-wrapper\">\r\n <div class=\"cide-lyt-sidebar-page-wrapper tw-h-full tw-w-screen\" id=\"cide-lyt-sidebar-page-inner-wrapper\">\r\n <!-- We will use here Sidebar -->\r\n <cide-lyt-sidebar-wrapper id=\"cide-lyt-sidebar-page\"\r\n class=\"cide-lyt-sidebar-page-hide\"></cide-lyt-sidebar-wrapper>\r\n <!-- We will use here Router Outlet -->\r\n <div class=\"cide-lyt-page-wrapper tw-block tw-h-full tw-w-full\" id=\"cide-lyt-page-wrapper\">\r\n <cide-lyt-request-wrapper class=\"tw-w-[inherit] tw-h-auto\"></cide-lyt-request-wrapper>\r\n <div class=\"cide-lyt-outlet-sidedrawer-wrapper tw-table-row\"\r\n id=\"cide-lyt-outlet-sidedrawer-wrapper\">\r\n <div class=\"tw-w-full tw-h-full tw-overflow-y-auto cide-scrollbar-width-thin\"\r\n id=\"cide-lyt-outlet-wrapper\">\r\n <cide-lyt-tab-content></cide-lyt-tab-content>\r\n </div>\r\n <!-- We will use here Side Drawer -->\r\n <cide-lyt-sidedrawer-wrapper></cide-lyt-sidedrawer-wrapper>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"cide-lyt-footer-console-wrapper cide-lyt-footer-console-wrapper-hide tw-relative tw-table-row tw-h-0\"\r\n id=\"cide-lyt-footer-console-wrapper\">\r\n <!-- We will use here footer -->\r\n <cide-lyt-footer-wrapper></cide-lyt-footer-wrapper>\r\n <!-- We will use here Console -->\r\n <cide-lyt-console-wrapper></cide-lyt-console-wrapper>\r\n </div>\r\n</div>","import { Component } from '@angular/core';\r\nimport { CideLytLayoutWrapperComponent } from \"./layout/layout/layout-wrapper/layout-wrapper.component\";\r\nimport { CideEleFloatingContainerManagerComponent } from \"cloud-ide-element\";\r\nimport { CideEleGlobalNotificationsComponent } from \"cloud-ide-element\";\r\n\r\n@Component({\r\n selector: 'cide-lyt-wrapper',\r\n template: `\r\n <cide-lyt-layout-wrapper></cide-lyt-layout-wrapper>\r\n \r\n <!-- Floating Container Manager -->\r\n <cide-ele-floating-container-manager></cide-ele-floating-container-manager>\r\n \r\n <!-- Global Notifications and Confirmation Dialogs -->\r\n <cide-ele-global-notifications></cide-ele-global-notifications>\r\n `,\r\n styles: ``,\r\n imports: [\r\n CideLytLayoutWrapperComponent,\r\n CideEleFloatingContainerManagerComponent,\r\n CideEleGlobalNotificationsComponent\r\n ]\r\n})\r\nexport class CloudIdeLayoutComponent {\r\n\r\n}\r\n","import { Injectable, inject } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { CideLytRequestService } from '../request/request.service';\nimport { CideEleFloatingContainerService } from 'cloud-ide-element';\n\n/**\n * Service to detect component context (tab or floating container) and close appropriately\n * This allows components to close themselves without knowing their context\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ComponentContextService {\n private requestService = inject(CideLytRequestService);\n private floatingContainerService = inject(CideEleFloatingContainerService);\n private router = inject(Router);\n private route = inject(ActivatedRoute);\n\n /**\n * Close the current component context\n * - If in a tab: closes the tab\n * - If in a floating container: closes the floating container\n * - If neither: navigates to a fallback route (optional)\n * \n * @param fallbackRoute Optional route to navigate to if not in tab or floating container\n * @param containerId Optional specific container ID to close (if known)\n */\n close(fallbackRoute?: string[], containerId?: string): void {\n // First, try to close floating container if containerId is provided\n if (containerId) {\n const containers = this.floatingContainerService.visibleContainers();\n const container = containers.find(c => c.id === containerId);\n if (container) {\n console.log('🔒 [ComponentContext] Closing floating container:', containerId);\n this.floatingContainerService.hide(containerId);\n return;\n }\n }\n\n // Try to find and close any floating container that might contain this component\n // We check if there are any visible containers\n const visibleContainers = this.floatingContainerService.visibleContainers();\n if (visibleContainers.length > 0) {\n // Close the topmost container (last in array is typically the most recent)\n const topContainer = visibleContainers[visibleContainers.length - 1];\n console.log('🔒 [ComponentContext] Closing topmost floating container:', topContainer.id);\n this.floatingContainerService.hide(topContainer.id);\n return;\n }\n\n // Check if we're in a tab\n const activeTab = this.requestService.activeTab();\n if (activeTab) {\n // Get current route to match with tab\n const currentUrl = this.router.url.split('?')[0]; // Remove query params for comparison\n const tabRoute = activeTab.route.split('?')[0]; // Remove query params from tab route too\n \n // Normalize routes for comparison (remove leading/trailing slashes and convert to lowercase)\n const normalizeRoute = (route: string) => {\n return route.replace(/^\\/+|\\/+$/g, '').toLowerCase();\n };\n const normalizedCurrent = normalizeRoute(currentUrl);\n const normalizedTab = normalizeRoute(tabRoute);\n \n console.log('🔍 [ComponentContext] Route matching:', {\n currentUrl,\n tabRoute,\n normalizedCurrent,\n normalizedTab,\n activeTabId: activeTab.id,\n activeTabTitle: activeTab.title\n });\n \n // Check if current route matches the active tab route (exact or starts with)\n // Also check if routes end with the same path segment\n const currentSegments = normalizedCurrent.split('/');\n const tabSegments = normalizedTab.split('/');\n const lastCurrentSegment = currentSegments[currentSegments.length - 1];\n const lastTabSegment = tabSegments[tabSegments.length - 1];\n \n const routesMatch = normalizedCurrent === normalizedTab || \n normalizedCurrent.startsWith(normalizedTab + '/') ||\n normalizedTab.startsWith(normalizedCurrent + '/') ||\n (lastCurrentSegment && lastTabSegment && lastCurrentSegment === lastTabSegment);\n \n if (routesMatch) {\n console.log('🔒 [ComponentContext] Closing active tab:', activeTab.id);\n this.requestService.closeTab(activeTab.id);\n return;\n }\n\n // Check all tabs to find a match\n const allTabs = this.requestService.tabs();\n const matchingTab = allTabs.find(tab => {\n const tabRoutePath = tab.route.split('?')[0];\n const normalizedTabPath = normalizeRoute(tabRoutePath);\n const tabSegments = normalizedTabPath.split('/');\n const lastTabSegment = tabSegments[tabSegments.length - 1];\n \n return normalizedCurrent === normalizedTabPath || \n normalizedCurrent.startsWith(normalizedTabPath + '/') ||\n normalizedTabPath.startsWith(normalizedCurrent + '/') ||\n (lastCurrentSegment && lastTabSegment && lastCurrentSegment === lastTabSegment);\n });\n\n if (matchingTab) {\n console.log('🔒 [ComponentContext] Closing matching tab:', matchingTab.id);\n this.requestService.closeTab(matchingTab.id);\n return;\n }\n \n // If no match found but we have an active tab, close it anyway\n // This handles cases where route format might differ slightly\n console.log('🔒 [ComponentContext] No route match found, but closing active tab anyway:', activeTab.id);\n this.requestService.closeTab(activeTab.id);\n return;\n }\n\n // If neither tab nor floating container, navigate to fallback route\n if (fallbackRoute && fallbackRoute.length > 0) {\n console.log('🔒 [ComponentContext] Not in tab or container, navigating to fallback:', fallbackRoute);\n this.router.navigate(fallbackRoute, { relativeTo: this.route });\n } else {\n console.warn('⚠️ [ComponentContext] No context found to close and no fallback route provided');\n }\n }\n\n /**\n * Check if component is in a tab\n */\n isInTab(): boolean {\n const activeTab = this.requestService.activeTab();\n if (!activeTab) return false;\n\n const currentUrl = this.router.url.split('?')[0];\n const tabRoute = activeTab.route.split('?')[0];\n \n return currentUrl === tabRoute || currentUrl.startsWith(tabRoute + '/');\n }\n\n /**\n * Check if component is in a floating container\n */\n isInFloatingContainer(): boolean {\n return this.floatingContainerService.visibleContainers().length > 0;\n }\n\n /**\n * Get the current context type\n */\n getContextType(): 'tab' | 'floating-container' | 'none' {\n if (this.isInFloatingContainer()) {\n return 'floating-container';\n }\n if (this.isInTab()) {\n return 'tab';\n }\n return 'none';\n }\n}\n\n","import { Component, OnInit, viewChild, inject, ChangeDetectionStrategy, input, signal, computed, effect } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { CideLytSharedService } from '../shared.service';\nimport { designConfigControllerResponse, designConfigResponseData, MDesignConfig } from 'cloud-ide-lms-model';\nimport { CideLytSidedrawerService } from '../../sidedrawer/sidedrawer.service';\nimport { AppStateHelperService } from '../../../services/app-state/app-state-helper.service';\nimport { CideEleBreadcrumbComponent } from 'cloud-ide-element';\nimport { ComponentContextService } from '../component-context.service';\n\n@Component({\n selector: 'cide-lyt-shared-wrapper',\n imports: [CideEleBreadcrumbComponent],\n templateUrl: './shared-wrapper.component.html',\n styleUrl: './shared-wrapper.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CideLytSharedWrapperComponent implements OnInit {\n breadcrumb = viewChild(CideEleBreadcrumbComponent);\n public shared_wrapper_setup_param = input<Partial<CideLytSharedWrapperSetupParam>>({});\n public breadcrumb_data = input<BreadcrumbItem[]>([]);\n // Convert page_data to signal so breadcrumb updates reactively when page data loads\n public page_data = signal<designConfigResponseData>({});\n private sharedService = inject(CideLytSharedService);\n private sidedrawerService = inject(CideLytSidedrawerService);\n protected router = inject(Router);\n protected appState = inject(AppStateHelperService);\n private componentContextService = inject(ComponentContextService);\n\n // Signal for additional breadcrumb items that will be appended after Module > Current Page\n private additionalBreadcrumbItems = signal<BreadcrumbItem[]>([]);\n \n // Computed signal that combines default breadcrumb with additional items\n private fullBreadcrumbItems = computed(() => {\n const moduleInfo = this.appState.getActiveModuleInfo();\n const pageCode = this.shared_wrapper_setup_param()?.sypg_page_code;\n const pageData = this.page_data(); // Get current value from signal\n \n // Default breadcrumb items\n const defaultItems: BreadcrumbItem[] = [];\n \n // Add module if available\n if (moduleInfo?.title) {\n defaultItems.push({\n id: moduleInfo.id || 'module',\n label: moduleInfo.title,\n icon: moduleInfo.icon || undefined,\n url: moduleInfo.path || undefined\n });\n }\n \n // Add current page - use title from page data if available, otherwise fallback to page code\n const currentPageTitle = pageData?.page?.sypg_title || pageCode || 'Current';\n defaultItems.push({\n id: 'current-page',\n label: currentPageTitle,\n icon: undefined,\n url: undefined\n });\n \n // Append additional items from input signal, filtering out duplicates\n const inputBreadcrumbData = this.breadcrumb_data();\n if (inputBreadcrumbData.length > 0) {\n // Filter out items that duplicate the current page title or are \"Home\" (already shown as icon)\n const filteredItems = inputBreadcrumbData.filter(item => {\n // Skip \"Home\" items as they're already shown as an icon by the breadcrumb component\n const isHome = item.id === 'home' || item.label?.toLowerCase() === 'home';\n // Skip items that match the current page title (already in defaultItems)\n const matchesCurrentPage = item.label?.toLowerCase() === currentPageTitle.toLowerCase();\n // Skip items that match the module title\n const matchesModule = moduleInfo?.title && item.label?.toLowerCase() === moduleInfo.title.toLowerCase();\n return !isHome && !matchesCurrentPage && !matchesModule;\n });\n return [...defaultItems, ...filteredItems];\n }\n \n // Append additional items from internal signal (for backward compatibility)\n const additionalItems = this.additionalBreadcrumbItems();\n if (additionalItems.length > 0) {\n // Filter out duplicates here too\n const filteredAdditional = additionalItems.filter(item => {\n const isHome = item.id === 'home' || item.label?.toLowerCase() === 'home';\n const matchesCurrentPage = item.label?.toLowerCase() === currentPageTitle.toLowerCase();\n const matchesModule = moduleInfo?.title && item.label?.toLowerCase() === moduleInfo.title.toLowerCase();\n return !isHome && !matchesCurrentPage && !matchesModule;\n });\n return [...defaultItems, ...filteredAdditional];\n }\n \n return defaultItems;\n });\n\n constructor() {\n // Watch for changes in breadcrumb data and update breadcrumb component\n effect(() => {\n const breadcrumbRef = this.breadcrumb();\n const items = this.fullBreadcrumbItems();\n \n console.log('🍞 Shared wrapper breadcrumb effect triggered:', items);\n \n if (breadcrumbRef && items.length > 0) {\n breadcrumbRef.updateItems(items);\n console.log('🍞 Breadcrumb updated with items:', items);\n }\n });\n }\n\n ngOnInit() {\n // Load and process page data using modern approach\n if (this.shared_wrapper_setup_param()?.sypg_page_code) {\n const entityId = this.appState.getActiveEntityId();\n const page_data_payload: MDesignConfig = { \n sypg_page_code: this.shared_wrapper_setup_param()?.sypg_page_code, \n sytm_entity_id_syen: entityId || undefined \n };\n console.log('🔍 Page data payload:', page_data_payload);\n \n this.sharedService.loadAndProcessPageData(page_data_payload, {\n setTitle: true,\n setSidebarContext: true,\n updateLayout: true\n }).subscribe({\n next: (page_data_response: designConfigControllerResponse) => {\n console.log('✅ SHARED WRAPPER: Page data loaded and processed for:', page_data_payload.sypg_page_code);\n // Update page_data signal - this will trigger breadcrumb recomputation\n this.page_data.set(page_data_response?.data || {});\n \n // Sidebar context is automatically set by loadAndProcessPageData when setSidebarContext: true\n const pageId = page_data_response?.data?.page?._id || '';\n const themeId = page_data_response?.data?.theme?._id || '';\n this.sidedrawerService.setContext(pageId, themeId);\n\n // Breadcrumb will be updated automatically by the effect when fullBreadcrumbItems changes\n // Now that page_data is a signal, the computed signal will react to changes\n },\n error: (err) => {\n console.error('❌ SHARED WRAPPER: Error loading page data:', err);\n }\n });\n }\n }\n\n /**\n * Add additional breadcrumb items that will be appended after the default Module > Current Page path\n * @param items Array of breadcrumb items to append\n */\n addBreadcrumbItems(items: BreadcrumbItem[]): void {\n this.additionalBreadcrumbItems.set(items);\n // Update breadcrumb immediately\n const breadcrumbRef = this.breadcrumb();\n if (breadcrumbRef) {\n const fullItems = this.fullBreadcrumbItems();\n breadcrumbRef.updateItems(fullItems);\n }\n }\n\n /**\n * Clear additional breadcrumb items (keeps only default Module > Current Page)\n */\n clearAdditionalBreadcrumbItems(): void {\n this.additionalBreadcrumbItems.set([]);\n // Update breadcrumb immediately\n const breadcrumbRef = this.breadcrumb();\n if (breadcrumbRef) {\n const fullItems = this.fullBreadcrumbItems();\n breadcrumbRef.updateItems(fullItems);\n }\n }\n\n /**\n * Set additional breadcrumb items (replaces any existing additional items)\n * @param items Array of breadcrumb items to set\n */\n setBreadcrumbItems(items: BreadcrumbItem[]): void {\n this.additionalBreadcrumbItems.set(items);\n // Update breadcrumb immediately\n const breadcrumbRef = this.breadcrumb();\n if (breadcrumbRef) {\n const fullItems = this.fullBreadcrumbItems();\n breadcrumbRef.updateItems(fullItems);\n }\n }\n\n /**\n * Handle breadcrumb home button click - navigate to control panel home\n */\n onBreadcrumbHomeClick(): void {\n this.router.navigate(['/control-panel']);\n }\n\n /**\n * Close the current component context\n * - If in a tab: closes the tab\n * - If in a floating container: closes the floating container\n * - If neither: navigates to fallback route (optional)\n * \n * This method can be called from child components to close themselves\n * without needing to know their context (tab vs floating container)\n * \n * @param fallbackRoute Optional route to navigate to if not in tab or floating container\n * @param containerId Optional specific container ID to close (if known)\n */\n close(fallbackRoute?: string[], containerId?: string): void {\n this.componentContextService.close(fallbackRoute, containerId);\n }\n\n}\n\nexport interface CideLytSharedWrapperSetupParam {\n sypg_page_code: string\n}\n\nexport interface BreadcrumbItem {\n id: string;\n label: string;\n icon?: string;\n url?: string;\n}","<div class=\"tw-w-full tw-h-full tw-flex tw-flex-col tw-max-w-full tw-overflow-hidden\">\n <div\n class=\"tw-sticky tw-w-full tw-max-w-full tw-top-0 tw-z-50 tw-bg-white tw-border-b tw-border-gray-200 tw-shadow-sm\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-gap-2 tw-px-3 sm:tw-px-4 tw-py-2 sm:tw-py-0.5 tw-min-w-0 tw-overflow-hidden tw-flex-wrap sm:tw-flex-nowrap\">\n <div class=\"tw-flex-1 tw-min-w-0 tw-overflow-hidden tw-order-1\">\n <cide-ele-breadcrumb style=\"modern\" [compact]=\"true\" (homeClick)=\"onBreadcrumbHomeClick()\"></cide-ele-breadcrumb>\n </div>\n <div class=\"tw-flex-shrink-0 tw-ml-2 sm:tw-ml-4 tw-order-2\">\n <ng-content select=\"[breadcrumb-actions]\"></ng-content>\n </div>\n </div>\n </div>\n\n <div class=\"tw-flex-1 tw-w-full tw-max-w-full tw-overflow-y-auto tw-overflow-x-hidden tw-min-h-0\">\n <ng-content></ng-content>\n </div>\n</div>","import { Injectable, inject, computed, signal, effect } from '@angular/core';\nimport { CideLytSharedService } from './shared.service';\nimport { designConfigResponseData } from 'cloud-ide-lms-model';\nimport { AppStateHelperService } from '../../services/app-state/app-state-helper.service';\n\n/**\n * Common Rights Service\n * Provides a centralized way to check user permissions based on page rights\n * \n * Usage:\n * ```typescript\n * private rightsService = inject(RightsService);\n * \n * ngOnInit() {\n * this.rightsService.initializeRights('fdsk_lead_config');\n * }\n * \n * // Check if user has a specific right\n * if (this.rightsService.hasRight('CREATE')) {\n * // Show create button\n * }\n * \n * // Get all rights for current page\n * const rights = this.rightsService.getRights();\n * ```\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class RightsService {\n private sharedService = inject(CideLytSharedService);\n private appState = inject(AppStateHelperService);\n \n // Current page code signal\n private currentPageCode = signal<string>('');\n \n // Separate signal for rights-only data (when fetched via rights-only endpoint)\n private rightsOnlyCache = signal<{ [pageCode: string]: { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } } }>({});\n \n constructor() {\n // Auto-fetch rights when page code changes and rights are not loaded\n effect(() => {\n const pageCode = this.currentPageCode();\n if (pageCode) {\n const rightsLoaded = this.areRightsLoaded();\n const rightsOnlyLoaded = !!this.rightsOnlyCache()[pageCode];\n \n // Auto-fetch rights-only if not loaded\n if (!rightsLoaded && !rightsOnlyLoaded) {\n // Small delay to avoid race conditions and allow component to set up\n setTimeout(() => {\n // Double-check after delay to avoid duplicate requests\n if (!this.rightsOnlyCache()[pageCode] && !this.areRightsLoaded()) {\n this.loadRightsOnly(pageCode);\n }\n }, 100);\n }\n }\n });\n }\n \n // Computed signal that automatically updates when page data cache changes\n private rightsComputed = computed(() => {\n const pageCode = this.currentPageCode();\n if (!pageCode) {\n return {};\n }\n\n // First check rights-only cache\n const rightsOnlyData = this.rightsOnlyCache()[pageCode];\n if (rightsOnlyData) {\n return rightsOnlyData;\n }\n\n // Fallback to full page config cache\n const cache = this.sharedService.pageDataCache();\n const cached = cache[pageCode];\n \n if (cached?.response?.data?.rights) {\n return cached.response.data.rights;\n }\n\n // Fallback to direct cache lookup\n const cachedData = this.sharedService.getCachedPageData(pageCode);\n return cachedData?.data?.rights || {};\n });\n\n /**\n * Initialize rights for a specific page\n * Call this in component ngOnInit with the page code\n * @param pageCode - Page code to initialize rights for\n * @param forceRefresh - If true, invalidates cache and forces refresh\n * @param fetchRightsOnly - If true, uses the lightweight rights-only endpoint instead of full page config. \n * If 'auto', automatically fetches rights-only if not already loaded.\n */\n initializeRights(pageCode: string, forceRefresh: boolean = false, fetchRightsOnly: boolean | 'auto' = 'auto'): void {\n this.currentPageCode.set(pageCode);\n \n if (forceRefresh) {\n // Invalidate cache to force fresh data from API\n this.sharedService.invalidateCache(pageCode);\n // Also clear rights-only cache\n const currentCache = this.rightsOnlyCache();\n const updatedCache = { ...currentCache };\n delete updatedCache[pageCode];\n this.rightsOnlyCache.set(updatedCache);\n console.log('🔄 RightsService: Cache invalidated, forcing refresh for page:', pageCode);\n }\n \n // Check if rights are already loaded\n const rightsLoaded = this.areRightsLoaded();\n const rightsOnlyLoaded = !!this.rightsOnlyCache()[pageCode];\n \n // Auto-fetch if rights are not loaded and fetchRightsOnly is 'auto' or true\n if (fetchRightsOnly === 'auto' && !rightsLoaded && !rightsOnlyLoaded) {\n // Automatically fetch rights-only if not loaded\n this.loadRightsOnly(pageCode);\n console.log('🔐 RightsService: Auto-fetching rights-only for page:', pageCode);\n } else if (fetchRightsOnly === true && (forceRefresh || !rightsOnlyLoaded)) {\n // Explicitly fetch rights-only\n this.loadRightsOnly(pageCode);\n console.log('🔐 RightsService: Fetching rights-only for page:', pageCode);\n } else if (rightsLoaded || rightsOnlyLoaded) {\n console.log('🔐 RightsService initialized for page:', pageCode, '(rights already loaded)');\n } else {\n console.log('🔐 RightsService initialized for page:', pageCode);\n }\n }\n\n /**\n * Load rights only using the lightweight endpoint\n * This is useful when you only need rights without full page config\n * @param pageCode - Page code to load rights for\n */\n loadRightsOnly(pageCode: string): void {\n this.sharedService.getPageRights(pageCode).subscribe({\n next: (response) => {\n if (response.success && response.data) {\n // Update rights-only cache\n const currentCache = this.rightsOnlyCache();\n this.rightsOnlyCache.set({\n ...currentCache,\n [pageCode]: response.data!.rights\n });\n console.log('🔐 RightsService: Rights fetched via rights-only endpoint for page:', pageCode, response.data.rights);\n }\n },\n error: (error) => {\n console.error('❌ RightsService: Error fetching rights:', error);\n }\n });\n }\n\n /**\n * Get current rights (reactive)\n */\n private getCurrentRights(): { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } } {\n return this.rightsComputed();\n }\n\n /**\n * Check if user has a specific right\n * @param rightCode - The right code to check (e.g., 'CREATE', 'EDIT', 'DELETE', 'VIEW')\n * @returns true if the user has the right, false otherwise\n */\n hasRight(rightCode: string): boolean {\n const rights = this.getCurrentRights();\n const right = rights[rightCode];\n const hasAccess = right?.allowed === true;\n console.log(`🔐 Checking right '${rightCode}' for page '${this.currentPageCode()}':`, hasAccess);\n return hasAccess;\n }\n\n /**\n * Check if user has any of the specified rights\n * @param rightCodes - Array of right codes to check\n * @returns true if user has at least one of the rights\n */\n hasAnyRight(rightCodes: string[]): boolean {\n return rightCodes.some(code => this.hasRight(code));\n }\n\n /**\n * Check if user has all of the specified rights\n * @param rightCodes - Array of right codes to check\n * @returns true if user has all of the rights\n */\n hasAllRights(rightCodes: string[]): boolean {\n return rightCodes.every(code => this.hasRight(code));\n }\n\n /**\n * Get the source of a right (role or exception)\n * @param rightCode - The right code\n * @returns 'role' | 'exception' | null\n */\n getRightSource(rightCode: string): 'role' | 'exception' | null {\n const rights = this.getCurrentRights();\n const right = rights[rightCode];\n return right?.source || null;\n }\n\n /**\n * Get all rights for the current page\n * @returns Object containing all rights with their allowed status and source\n */\n getRights(): { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } } {\n return this.getCurrentRights();\n }\n\n /**\n * Get all allowed rights\n * @returns Array of right codes that are allowed\n */\n getAllowedRights(): string[] {\n const rights = this.getCurrentRights();\n return Object.keys(rights).filter(code => rights[code]?.allowed === true);\n }\n\n /**\n * Get rights as a computed signal (for reactive templates)\n * @returns Computed signal that updates when rights change\n */\n getRightsSignal() {\n return this.rightsComputed;\n }\n\n /**\n * Check rights for a specific page code (without initializing)\n * Useful for checking rights of other pages\n */\n checkRightsForPage(pageCode: string): { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } } {\n // First check rights-only cache\n const rightsOnlyData = this.rightsOnlyCache()[pageCode];\n if (rightsOnlyData) {\n return rightsOnlyData;\n }\n \n // Fallback to full page config cache\n const cachedData = this.sharedService.getCachedPageData(pageCode);\n return cachedData?.data?.rights || {};\n }\n\n /**\n * Check if user has a specific right for a specific page\n */\n hasRightForPage(pageCode: string, rightCode: string): boolean {\n const rights = this.checkRightsForPage(pageCode);\n return rights[rightCode]?.allowed === true;\n }\n\n /**\n * Check if rights are loaded for the current page\n * @returns true if rights have been loaded (even if empty)\n */\n areRightsLoaded(): boolean {\n const pageCode = this.currentPageCode();\n if (!pageCode) return false;\n \n const cache = this.sharedService.pageDataCache();\n const cached = cache[pageCode];\n return !!cached?.response?.data;\n }\n\n /**\n * Get current page code\n */\n getCurrentPageCode(): string {\n return this.currentPageCode();\n }\n\n /**\n * Force refresh rights by invalidating cache\n * Call this after rights are updated in the database\n * @param useRightsOnlyEndpoint - If true, uses the lightweight rights-only endpoint\n */\n refreshRights(useRightsOnlyEndpoint: boolean = false): void {\n const pageCode = this.currentPageCode();\n if (pageCode) {\n // Clear rights-only cache\n const currentCache = this.rightsOnlyCache();\n const updatedCache = { ...currentCache };\n delete updatedCache[pageCode];\n this.rightsOnlyCache.set(updatedCache);\n \n // Invalidate full page config cache\n this.sharedService.invalidateCache(pageCode);\n \n // If using rights-only endpoint, fetch immediately\n if (useRightsOnlyEndpoint) {\n this.loadRightsOnly(pageCode);\n }\n \n console.log('🔄 RightsService: Cache invalidated for page:', pageCode);\n }\n }\n}\n\n","import { Route } from '@angular/router';\nimport { authGuard } from 'cloud-ide-shared';\n\nexport const layoutRoutes: Route = {\n path: \"control-panel\",\n loadComponent: () => import('./cloud-ide-layout.component').then(c => c.CloudIdeLayoutComponent),\n canActivate: [authGuard]\n};\n\nexport const layoutControlPannelChildRoutes: Route[] = [{\n path: \"\",\n pathMatch: \"full\",\n redirectTo: \"home\"\n},\n{\n path: \"home\",\n loadComponent: () => import('./layout/home/home-wrapper/home-wrapper.component').then(c => c.CideLytHomeWrapperComponent),\n canActivate: [authGuard],\n data: {\n sypg_page_code: \"cide_lyt_home\" // Used by RequestService to fetch tab properties\n }\n},\n{\n path: \"dashboard-manager\",\n loadComponent: () => import('./components/dashboard-manager/dashboard-manager.component').then(c => c.DashboardManagerComponent),\n canActivate: [authGuard],\n data: {\n sypg_page_code: \"cide_lyt_dashboard_manager\"\n }\n}\n]; ","\r\nimport { Injectable, PLATFORM_ID, InjectionToken, signal, inject } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { tap } from 'rxjs/operators';\r\nimport { Observable, of } from 'rxjs';\r\nimport {\r\n cidePath, designConfigRoutesUrl, hostManagerRoutesUrl,\r\n SystemThemeControllerRespoonse, SystemThemesListControllerRespoonse,\r\n IEnvironmentConfig, SystemThemeUserPreferencesControllerRespoonse,\r\n MSystemThemeUserPreferencesRequest, SystemThemeControllerRespoonseData\r\n} from 'cloud-ide-lms-model';\r\nimport { isPlatformBrowser } from '@angular/common';\r\n\r\n// Define an InjectionToken for the environment configuration\r\n// This is needed to inject environment variables into services provided in 'root'\r\nexport const ENVIRONMENT_CONFIG = new InjectionToken<IEnvironmentConfig>('ENVIRONMENT_CONFIG');\r\n\r\n// Define an interface for your theme for type safety\r\nexport interface Theme {\r\n [key: string]: string; // Allows any string key, e.g., 'color-text-body'\r\n}\r\n\r\n/**\r\n * Utility function to convert database format keys to CSS format and handle units\r\n * @param key - The database format key (e.g., 'font_size_xxxl')\r\n * @param value - The value to be set\r\n * @returns Object with cssVarName and processed value\r\n */\r\nexport function processThemeVariable(key: string, value: string): { cssVarName: string; processedValue: string } {\r\n // 1. Convert the key from the DB format to the CSS format.\r\n const cssVarName = `${key.replace(/_/g, '-')}`;\r\n\r\n // 2. Append the font_size and line_height value to rem\r\n let processedValue = value;\r\n if (cssVarName.includes('font-size') || cssVarName.includes('line-height')) {\r\n processedValue = parseFloat(value) + 'rem';\r\n }\r\n\r\n return { cssVarName, processedValue: processedValue };\r\n}\r\n\r\n/**\r\n * Sets a single CSS variable on the document root element\r\n * @param key - The database format key (e.g., 'font_size_xxxl')\r\n * @param value - The value to be set\r\n * @param platformId - Platform ID for browser check\r\n */\r\nexport function setCSSVariable(key: string, value: string, platformId: object): void {\r\n if (isPlatformBrowser(platformId)) {\r\n const { cssVarName, processedValue } = processThemeVariable(key, value);\r\n const root = document.documentElement;\r\n root.style.setProperty(cssVarName, processedValue);\r\n }\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytThemeService {\r\n // Modern Angular signals for reactive state management\r\n private selectedThemeSignal = signal<string>(\"\");\r\n public selectedTheme = this.selectedThemeSignal.asReadonly();\r\n\r\n // Modern dependency injection\r\n private http = inject(HttpClient);\r\n private platformId = inject(PLATFORM_ID);\r\n private environment = inject(ENVIRONMENT_CONFIG);\r\n\r\n /**\r\n * Fetches the theme from the API and applies it to the document.\r\n * This method is intended to be called when the theme should actually be applied.\r\n */\r\n public fetchAndApplyTheme(): Observable<SystemThemeControllerRespoonse> {\r\n console.log('Fetching and applying theme via CideLytThemeService...');\r\n return this.loadTheme(); // Use the existing loadTheme logic\r\n }\r\n\r\n /**\r\n * Fetches the list of system themes from the API.\r\n */\r\n public fetchSystemThemesList(): Observable<SystemThemesListControllerRespoonse> {\r\n return this.http.get<SystemThemesListControllerRespoonse>(\r\n cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n designConfigRoutesUrl?.module,\r\n designConfigRoutesUrl?.getSystemThemesList\r\n ]));\r\n }\r\n\r\n /**\r\n * Internal method to fetch the theme from the API and apply it.\r\n */\r\n loadTheme() {\r\n return this.http.post<SystemThemeControllerRespoonse>(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, designConfigRoutesUrl?.module, designConfigRoutesUrl?.getSystemTheme]), { syupth_user_id_user: \"659a7ea0a1f0e08246661766\" }).pipe(\r\n tap(theme => {\r\n console.log(\"Applying theme:\", theme);\r\n this.applyTheme(theme?.data as SystemThemeControllerRespoonseData);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Sets the CSS variables on the root element.\r\n * @param theme - An object where keys are CSS variable names (e.g., '--color-text-body')\r\n * and values are the color strings (e.g., '#ffffff').\r\n */\r\n private applyTheme(theme: SystemThemeControllerRespoonseData): void {\r\n console.log(\"Applying theme:\", theme);\r\n let merged = {};\r\n if (theme?.core_system_themes?.syth_properties) {\r\n merged = { ...merged, ...theme.core_system_themes.syth_properties };\r\n this.selectedThemeSignal.set(theme.core_system_themes._id as string);\r\n }\r\n if (theme?.core_system_organization_themes?.syoth_overrides) {\r\n merged = { ...merged, ...theme.core_system_organization_themes.syoth_overrides };\r\n }\r\n if (theme?.core_system_theme_user_preferences?.syupth_overrides) {\r\n merged = { ...merged, ...theme.core_system_theme_user_preferences.syupth_overrides };\r\n }\r\n console.log(\"Merged theme:\", merged);\r\n // Check if the code is running in a browser environment.\r\n if (isPlatformBrowser(this.platformId)) {\r\n const root = document.documentElement;\r\n\r\n for (const [key, value] of Object.entries(merged)) {\r\n const { cssVarName, processedValue } = processThemeVariable(key, value as string);\r\n // Set the CSS custom property on the root element.\r\n root.style.setProperty(cssVarName, processedValue);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Saves the system theme user preferences.\r\n * @param themeVars - The theme variables to save.\r\n * @returns An observable of the system theme user preferences.\r\n */\r\n saveSystemThemeUserPreferences(themeVars: MSystemThemeUserPreferencesRequest): Observable<SystemThemeUserPreferencesControllerRespoonse> {\r\n return this.http.post<SystemThemeUserPreferencesControllerRespoonse>(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, designConfigRoutesUrl?.module, designConfigRoutesUrl?.systemThemeUserPreferences]), themeVars);\r\n }\r\n\r\n /**\r\n * Updates a single CSS variable using the utility function\r\n * @param key - The database format key (e.g., 'font_size_xxxl')\r\n * @param value - The value to be set\r\n */\r\n updateCSSVariable(key: string, value: string): void {\r\n setCSSVariable(key, value, this.platformId);\r\n }\r\n}\r\n\r\n/**\r\n * Factory function for APP_INITIALIZER.\r\n * This function is used in your app.config.ts.\r\n * It conditionally triggers theme loading based on the environment setting.\r\n */\r\nexport function themeFactory(themeService: CideLytThemeService, environmentConfig: IEnvironmentConfig): () => Observable<SystemThemeControllerRespoonse | undefined> {\r\n return () => {\r\n if (!environmentConfig.applyThemeOnLogin) {\r\n // If theme should be applied on app initialize, fetch and apply it.\r\n console.log('APP_INITIALIZER: Applying theme...');\r\n return themeService.fetchAndApplyTheme();\r\n } else {\r\n // If theme should be applied on login, APP_INITIALIZER does nothing for the theme.\r\n // We return an observable that immediately completes.\r\n console.log('APP_INITIALIZER: Theme application deferred to after login (per environment config).');\r\n return of(undefined); // Return an observable that completes immediately\r\n }\r\n };\r\n}","import { Injectable, inject, computed } from '@angular/core';\r\nimport { CideLytSharedService } from '../../layout/shared/shared.service';\r\nimport { Observable } from 'rxjs';\r\nimport { designConfigControllerResponse } from 'cloud-ide-lms-model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CacheManagerService {\r\n private sharedService = inject(CideLytSharedService);\r\n\r\n // Computed cache statistics\r\n public readonly cacheStats = computed(() => {\r\n const info = this.sharedService.cacheInfo();\r\n return {\r\n ...info,\r\n hitRatio: info.totalCached > 0 ? (info.validCached / info.totalCached) * 100 : 0,\r\n memoryEstimate: this.estimateCacheMemoryUsage()\r\n };\r\n });\r\n\r\n // Public access to cache state\r\n public readonly isLoading = (pageCode: string) => this.sharedService.isLoading(pageCode);\r\n public readonly getCachedData = (pageCode: string) => this.sharedService.getCachedPageData(pageCode);\r\n\r\n /**\r\n * Get page data with caching - this is the main method components should use\r\n */\r\n getPageData(pageCode: string, forceRefresh: boolean = false): Observable<designConfigControllerResponse> {\r\n return this.sharedService.loadAndProcessPageData(\r\n { sypg_page_code: pageCode },\r\n { forceRefresh, setTitle: true, setSidebarContext: true, updateLayout: true }\r\n );\r\n }\r\n\r\n /**\r\n * Preload multiple pages for better performance\r\n */\r\n preloadPages(pageCodes: string[]): void {\r\n console.log(`🚀 PRELOADING: Starting preload for ${pageCodes.length} pages`);\r\n this.sharedService.preloadPageData(pageCodes);\r\n }\r\n\r\n /**\r\n * Invalidate specific page cache\r\n */\r\n invalidatePage(pageCode: string): void {\r\n this.sharedService.invalidateCache(pageCode);\r\n }\r\n\r\n /**\r\n * Clear all cache\r\n */\r\n clearCache(): void {\r\n this.sharedService.clearAllCache();\r\n }\r\n\r\n /**\r\n * Get cache status for debugging\r\n */\r\n getCacheStatus(): { pageCode: string; cached: boolean; expired: boolean; loading: boolean }[] {\r\n const cache = this.sharedService.pageDataCache();\r\n const loadingStates = this.sharedService.loadingStates();\r\n \r\n const allPageCodes = new Set([\r\n ...Object.keys(cache),\r\n ...Object.keys(loadingStates)\r\n ]);\r\n\r\n return Array.from(allPageCodes).map(pageCode => ({\r\n pageCode,\r\n cached: !!cache[pageCode],\r\n expired: cache[pageCode] ? !this.isCacheValid(cache[pageCode]) : false,\r\n loading: !!loadingStates[pageCode]\r\n }));\r\n }\r\n\r\n /**\r\n * Estimate memory usage of cache (rough estimate)\r\n */\r\n private estimateCacheMemoryUsage(): string {\r\n const cache = this.sharedService.pageDataCache();\r\n const jsonString = JSON.stringify(cache);\r\n const bytes = new Blob([jsonString]).size;\r\n \r\n if (bytes < 1024) return `${bytes} B`;\r\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\r\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\r\n }\r\n\r\n /**\r\n * Check if cache entry is valid\r\n */\r\n private isCacheValid(cached: { timestamp: number; ttl: number } | undefined): boolean {\r\n if (!cached) return false;\r\n return Date.now() - cached.timestamp < cached.ttl;\r\n }\r\n\r\n /**\r\n * Export cache data for debugging or backup\r\n */\r\n exportCacheData(): string {\r\n return JSON.stringify(this.sharedService.pageDataCache(), null, 2);\r\n }\r\n\r\n /**\r\n * Get performance metrics\r\n */\r\n getPerformanceMetrics(): {\r\n totalPages: number;\r\n cachedPages: number;\r\n loadingPages: number;\r\n cacheHitRatio: number;\r\n averageResponseTime?: number;\r\n } {\r\n const stats = this.cacheStats();\r\n const loadingStates = this.sharedService.loadingStates();\r\n \r\n return {\r\n totalPages: stats.totalCached,\r\n cachedPages: stats.validCached,\r\n loadingPages: Object.keys(loadingStates).length,\r\n cacheHitRatio: stats.hitRatio,\r\n // averageResponseTime could be implemented with timing tracking\r\n };\r\n }\r\n} ","import { Injectable, Signal, inject } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable, throwError, BehaviorSubject } from 'rxjs';\r\nimport { catchError, tap } from 'rxjs/operators';\r\nimport { CideEleFloatingContainerService, FloatingContainerConfig } from 'cloud-ide-element';\r\nimport { \r\n cidePath, \r\n coreRoutesUrl, \r\n generateStringFromObject, \r\n hostManagerRoutesUrl,\r\n CoreEntityAccessPassManagement,\r\n MCoreEntityAccessPassManagement,\r\n MCoreEntityAccessPassManagementInsertUpdate,\r\n MCoreEntityAccessPassManagementDeletePayload,\r\n MCoreEntityAccessPassManagementGetByIdPayload,\r\n MCoreEntityAccessPassManagementToggleStatusPayload,\r\n CoreEntityAccessPassManagementControllerResponse,\r\n CoreEntityAccessPassManagementByIdControllerResponse,\r\n CoreEntityAccessPassManagementInsertUpdateControllerResponse,\r\n CoreEntityAccessPassManagementDeleteControllerResponse,\r\n CoreEntityAccessPassManagementToggleStatusControllerResponse\r\n} from 'cloud-ide-lms-model';\r\n\r\nexport interface EntityRightsSharingData {\r\n syepm_access_passs_to: string;\r\n core_entity_access_pass_management: string;\r\n syepm_user_id_user: string;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytFloatingEntityRightsSharingService {\r\n private containerService = inject(CideEleFloatingContainerService);\r\n private http = inject(HttpClient);\r\n private entityAccessPassListSubject = new BehaviorSubject<CoreEntityAccessPassManagement[]>([]);\r\n public entityAccessPassList$ = this.entityAccessPassListSubject.asObservable();\r\n\r\n constructor() {\r\n console.log('CideLytFloatingEntityRightsSharingService initialized with entity access pass management');\r\n }\r\n\r\n /**\r\n * Show entity rights sharing in floating container\r\n */\r\n async show(data?: Signal<EntityRightsSharingData>): Promise<string> {\r\n console.log('🚀 Showing entity rights sharing...');\r\n console.log('📋 Current registered components:', this.containerService.getRegisteredComponentIds());\r\n \r\n // Lazy registration - only register if not already registered\r\n if (!this.containerService.isComponentRegistered('entity-rights-sharing')) {\r\n console.log('📝 Registering entity rights sharing component...');\r\n await this.registerEntityRightsSharingComponent();\r\n console.log('📋 Components after registration:', this.containerService.getRegisteredComponentIds());\r\n } else {\r\n console.log('✅ Entity rights sharing component already registered');\r\n }\r\n\r\n const config: FloatingContainerConfig = {\r\n id: 'entity-rights-sharing-main',\r\n title: 'Entity Rights Sharing',\r\n icon: 'share',\r\n width: '450px',\r\n height: '500px',\r\n minWidth: '400px',\r\n minHeight: '400px',\r\n resizable: true,\r\n draggable: true,\r\n closable: true,\r\n minimizable: true,\r\n maximizable: true,\r\n componentId: 'entity-rights-sharing',\r\n componentConfig: {\r\n inputs: data ? { data } : undefined\r\n }\r\n };\r\n\r\n const containerId = this.containerService.show(config);\r\n console.log('✅ Container created with ID:', containerId);\r\n return containerId;\r\n }\r\n\r\n /**\r\n * Hide entity rights sharing\r\n */\r\n hide(): void {\r\n this.containerService.hide('entity-rights-sharing-main');\r\n }\r\n\r\n /**\r\n * Register the entity rights sharing component\r\n */\r\n private async registerEntityRightsSharingComponent(): Promise<void> {\r\n try {\r\n console.log('📦 Importing entity rights sharing component...');\r\n const module = await import('./floating-entity-rights-sharing.component');\r\n console.log('📦 Module imported:', module);\r\n console.log('📦 Component class:', module.CideLytFloatingEntityRightsSharingComponent);\r\n \r\n if (!module.CideLytFloatingEntityRightsSharingComponent) {\r\n throw new Error('Component class not found in module');\r\n }\r\n \r\n this.containerService.registerComponent('entity-rights-sharing', module.CideLytFloatingEntityRightsSharingComponent);\r\n console.log('✅ Entity rights sharing component registered successfully');\r\n console.log('📋 Available components after registration:', this.containerService.getRegisteredComponentIds());\r\n } catch (error) {\r\n console.error('❌ Failed to register entity rights sharing component:', error);\r\n console.error('❌ Error details:', error);\r\n }\r\n }\r\n\r\n // ============================================================================\r\n // ENTITY ACCESS PASS MANAGEMENT METHODS\r\n // ============================================================================\r\n\r\n /**\r\n * Get entity access pass management list from API\r\n */\r\n getEntityAccessPassList(body: MCoreEntityAccessPassManagement): Observable<CoreEntityAccessPassManagementControllerResponse> {\r\n const query = generateStringFromObject(body);\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl?.coreEntityAccessPassManagement,\r\n query\r\n ]);\r\n\r\n console.log('🔍 ENTITY ACCESS PASS SERVICE: Making API call to:', url);\r\n console.log('🔍 ENTITY ACCESS PASS SERVICE: Payload:', body);\r\n\r\n return this.http.get<CoreEntityAccessPassManagementControllerResponse>(url).pipe(\r\n tap(response => {\r\n if (response.success && response.data) {\r\n this.entityAccessPassListSubject.next(response.data);\r\n }\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n /**\r\n * Get entity access pass management by ID\r\n */\r\n getEntityAccessPassById(payload: MCoreEntityAccessPassManagementGetByIdPayload): Observable<CoreEntityAccessPassManagementByIdControllerResponse> {\r\n const query = generateStringFromObject(payload);\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl?.coreEntityAccessPassManagement,\r\n 'byId',\r\n query\r\n ]);\r\n\r\n console.log('🔍 ENTITY ACCESS PASS SERVICE: Getting by ID from:', url);\r\n console.log('🔍 ENTITY ACCESS PASS SERVICE: Payload:', payload);\r\n\r\n return this.http.get<CoreEntityAccessPassManagementByIdControllerResponse>(url).pipe(\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n /**\r\n * Insert or update entity access pass management\r\n */\r\n insertUpdateEntityAccessPass(payload: MCoreEntityAccessPassManagementInsertUpdate): Observable<CoreEntityAccessPassManagementInsertUpdateControllerResponse> {\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl?.coreEntityAccessPassManagement\r\n ]);\r\n\r\n console.log('💾 ENTITY ACCESS PASS SERVICE: Making POST request to:', url);\r\n console.log('💾 ENTITY ACCESS PASS SERVICE: Data payload:', payload);\r\n\r\n return this.http.post<CoreEntityAccessPassManagementInsertUpdateControllerResponse>(url, payload).pipe(\r\n tap(response => {\r\n if (response.success && response.data) {\r\n // Refresh the list after successful insert/update\r\n this.refreshEntityAccessPassList();\r\n }\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n /**\r\n * Delete entity access pass management\r\n */\r\n deleteEntityAccessPass(payload: MCoreEntityAccessPassManagementDeletePayload): Observable<CoreEntityAccessPassManagementDeleteControllerResponse> {\r\n const query = generateStringFromObject(payload);\r\n\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl?.coreEntityAccessPassManagement,\r\n query\r\n ]);\r\n\r\n console.log('🗑️ ENTITY ACCESS PASS SERVICE: Making DELETE request to:', url);\r\n console.log('🗑️ ENTITY ACCESS PASS SERVICE: Payload:', payload);\r\n\r\n return this.http.delete<CoreEntityAccessPassManagementDeleteControllerResponse>(url).pipe(\r\n tap(response => {\r\n if (response.success) {\r\n // Refresh the list after successful deletion\r\n this.refreshEntityAccessPassList();\r\n }\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n /**\r\n * Toggle entity access pass management status\r\n */\r\n toggleEntityAccessPassStatus(payload: MCoreEntityAccessPassManagementToggleStatusPayload): Observable<CoreEntityAccessPassManagementToggleStatusControllerResponse> {\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl?.coreEntityAccessPassManagement,\r\n 'toggle-status'\r\n ]);\r\n\r\n console.log('🔄 ENTITY ACCESS PASS SERVICE: Making POST request to:', url);\r\n console.log('🔄 ENTITY ACCESS PASS SERVICE: Payload:', payload);\r\n\r\n return this.http.post<CoreEntityAccessPassManagementToggleStatusControllerResponse>(url, payload).pipe(\r\n tap(response => {\r\n if (response.success) {\r\n // Refresh the list after successful status toggle\r\n this.refreshEntityAccessPassList();\r\n }\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n /**\r\n * Get entity access pass management for specific user and entity\r\n * @param userId - User ID\r\n * @param entityId - Entity ID (the entity context)\r\n * @param coreEntityAccessPassManagement - The table name (e.g., 'core_entity_access_pass_management_sycad')\r\n * @param accessPassTo - Optional: The primary _id of the specific record whose access is being managed\r\n */\r\n getEntityAccessPassForUserAndEntity(\r\n userId: string, \r\n entityId: string, \r\n coreEntityAccessPassManagement: string,\r\n accessPassTo?: string\r\n ): Observable<CoreEntityAccessPassManagementControllerResponse> {\r\n const payload: MCoreEntityAccessPassManagement = {\r\n syepm_access_passs_to: accessPassTo,\r\n core_entity_access_pass_management: coreEntityAccessPassManagement\r\n };\r\n\r\n return this.getEntityAccessPassList(payload);\r\n }\r\n\r\n /**\r\n * Create or update entity access pass for user and entity\r\n * @param userId - User ID\r\n * @param entityId - Entity ID (the entity context)\r\n * @param accessPassTo - The primary _id of the specific record whose access is being managed (e.g., address _id from core_user_contact_addresses)\r\n * @param coreEntityAccessPassManagement - The table name (e.g., 'core_entity_access_pass_management_sycad')\r\n * @param rights - The access rights to be granted\r\n * @param existingId - Optional: Existing access pass ID for updates\r\n */\r\n saveEntityAccessPassForUserAndEntity(\r\n userId: string,\r\n entityId: string,\r\n accessPassTo: string,\r\n coreEntityAccessPassManagement: string,\r\n rights: {\r\n can_view?: boolean;\r\n can_edit?: boolean;\r\n is_owner?: boolean;\r\n syepm_isactive?: boolean;\r\n },\r\n existingId?: string\r\n ): Observable<CoreEntityAccessPassManagementInsertUpdateControllerResponse> {\r\n const payload: MCoreEntityAccessPassManagementInsertUpdate = {\r\n _id: existingId || '',\r\n syepm_user_id_user: userId,\r\n syepm_entity_id_syen: entityId,\r\n syepm_access_passs_to: accessPassTo,\r\n core_entity_access_pass_management: coreEntityAccessPassManagement,\r\n syepm_can_view: rights.can_view || false,\r\n syepm_can_edit: rights.can_edit || false,\r\n syepm_is_owner: rights.is_owner || false,\r\n syepm_isactive: rights.syepm_isactive !== undefined ? rights.syepm_isactive : true\r\n };\r\n\r\n return this.insertUpdateEntityAccessPass(payload);\r\n }\r\n\r\n /**\r\n * Refresh the entity access pass list\r\n */\r\n private refreshEntityAccessPassList(): void {\r\n // This would typically reload the list with current filters\r\n // For now, we'll just emit the current list\r\n const currentList = this.entityAccessPassListSubject.value;\r\n this.entityAccessPassListSubject.next([...currentList]);\r\n }\r\n\r\n /**\r\n * Handle HTTP errors\r\n */\r\n private handleError = (error: any): Observable<never> => {\r\n console.error('❌ ENTITY ACCESS PASS SERVICE ERROR:', error);\r\n return throwError(() => error);\r\n };\r\n\r\n /**\r\n * Get current entity access pass list\r\n */\r\n getCurrentEntityAccessPassList(): CoreEntityAccessPassManagement[] {\r\n return this.entityAccessPassListSubject.value;\r\n }\r\n\r\n /**\r\n * Clear entity access pass list\r\n */\r\n clearEntityAccessPassList(): void {\r\n this.entityAccessPassListSubject.next([]);\r\n }\r\n}\r\n","import { Component, inject, signal, input, output, OnInit, effect, computed, ChangeDetectionStrategy } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormBuilder, FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { CideEleButtonComponent, CideInputComponent, CideIconComponent, CideSpinnerComponent } from 'cloud-ide-element';\r\nimport { CoreSystemEntity, entityControllerResponse, MEntity } from 'cloud-ide-lms-model';\r\nimport { ENTITY_SERVICE_TOKEN, IEntityService } from 'cloud-ide-shared';\r\nimport { \r\n CoreEntityAccessPassManagement,\r\n CoreEntityAccessPassManagementControllerResponse,\r\n CoreEntityAccessPassManagementInsertUpdateControllerResponse\r\n} from 'cloud-ide-lms-model';\r\nimport { AppStateService } from '../../services/app-state/app-state.service';\r\nimport { CideLytFloatingEntityRightsSharingService } from './floating-entity-rights-sharing.service';\r\nimport { firstValueFrom, forkJoin, Observable } from 'rxjs';\r\n\r\n// Enhanced entity type with permission data\r\ninterface EntityWithPermissions extends CoreSystemEntity {\r\n permissions: CoreEntityAccessPassManagement | null;\r\n canView: boolean;\r\n canEdit: boolean;\r\n isOwner: boolean;\r\n isActive: boolean;\r\n}\r\n\r\n@Component({\r\n selector: 'cide-lyt-floating-entity-rights-sharing',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n CideEleButtonComponent,\r\n CideInputComponent,\r\n CideIconComponent,\r\n CideSpinnerComponent\r\n ],\r\n template: `\r\n <!-- Entity Rights Sharing Content -->\r\n <div class=\"tw-flex tw-flex-col tw-h-full\">\r\n <!-- Main Content Area -->\r\n <div class=\"tw-flex-1 tw-p-4 tw-overflow-y-auto tw-scrollbar-thin tw-scrollbar-thumb-gray-300 tw-scrollbar-track-transparent tw-select-none\">\r\n <!-- Tabs / Pills -->\r\n <div class=\"tw-mb-3 tw-flex tw-items-center tw-gap-2\">\r\n <button type=\"button\"\r\n class=\"tw-text-xs tw-font-medium tw-rounded-full tw-px-3 tw-py-1 tw-transition-colors\"\r\n [class.tw-bg-blue-600]=\"selectedTab() === 'user'\"\r\n [class.tw-text-white]=\"selectedTab() === 'user'\"\r\n [class.tw-bg-gray-100]=\"selectedTab() !== 'user'\"\r\n [class.tw-text-gray-700]=\"selectedTab() !== 'user'\"\r\n (click)=\"selectTab('user')\">\r\n User Linked\r\n </button>\r\n <button type=\"button\"\r\n class=\"tw-text-xs tw-font-medium tw-rounded-full tw-px-3 tw-py-1 tw-transition-colors\"\r\n [class.tw-bg-blue-600]=\"selectedTab() === 'hierarchy'\"\r\n [class.tw-text-white]=\"selectedTab() === 'hierarchy'\"\r\n [class.tw-bg-gray-100]=\"selectedTab() !== 'hierarchy'\"\r\n [class.tw-text-gray-700]=\"selectedTab() !== 'hierarchy'\"\r\n (click)=\"selectTab('hierarchy')\">\r\n Entity Hierarchy\r\n </button>\r\n </div>\r\n\r\n <!-- User Linked Entities -->\r\n @if (selectedTab() === 'user') {\r\n <div class=\"tw-mb-4\">\r\n \r\n @if (entitiesLoading()) {\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-py-6\">\r\n <cide-ele-spinner size=\"sm\"></cide-ele-spinner>\r\n <span class=\"tw-ml-3 tw-text-gray-600 tw-text-sm\">Loading entities...</span>\r\n </div>\r\n } @else if (entities().length === 0) {\r\n <div class=\"tw-text-center tw-py-6\">\r\n <div class=\"tw-w-10 tw-h-10 tw-bg-gray-100 tw-rounded-xl tw-flex tw-items-center tw-justify-center tw-mx-auto tw-mb-2\">\r\n <cide-ele-icon class=\"tw-w-5 tw-h-5 tw-text-gray-400\">business</cide-ele-icon>\r\n </div>\r\n <p class=\"tw-text-gray-500 tw-text-sm\">No entities available</p>\r\n </div>\r\n } @else {\r\n <div class=\"tw-space-y-2\">\r\n @defer (when entitiesWithPermissions().length > 0) {\r\n @for (entity of entitiesWithPermissions(); track entity._id || entity.syen_name) {\r\n <div class=\"tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-border tw-border-gray-200 tw-border-opacity-50 tw-rounded-xl tw-p-3 tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-shadow-md hover:tw-border-blue-300 hover:tw-border-opacity-50 hover:tw-scale-[1.01] tw-group tw-select-none\"\r\n [class.tw-border-blue-500]=\"selectedEntityId() === entity._id\"\r\n [class.tw-bg-blue-50]=\"selectedEntityId() === entity._id\"\r\n [class.tw-opacity-50]=\"!entity.isActive\"\r\n [class.tw-bg-gray-100]=\"!entity.isActive\"\r\n [class.tw-border-gray-300]=\"!entity.isActive\"\r\n (click)=\"selectEntity(entity._id || '')\">\r\n <div class=\"tw-flex tw-items-start tw-space-x-3\">\r\n <div class=\"tw-w-6 tw-h-6 tw-rounded-lg tw-flex tw-items-center tw-justify-center tw-flex-shrink-0\"\r\n [class.tw-bg-gray-100]=\"entity.isActive\"\r\n [class.tw-bg-gray-200]=\"!entity.isActive\">\r\n <cide-ele-icon [class.tw-text-gray-600]=\"entity.isActive\" [class.tw-text-gray-400]=\"!entity.isActive\">person</cide-ele-icon>\r\n </div>\r\n <div class=\"tw-flex-1 tw-min-w-0\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2 tw-mb-1\">\r\n <h4 class=\"tw-text-sm tw-font-semibold tw-truncate\"\r\n [class.tw-text-gray-900]=\"entity.isActive\"\r\n [class.tw-text-gray-500]=\"!entity.isActive\">{{ entity.syen_name }}</h4>\r\n @if (hasPendingChanges(entity._id || '')) {\r\n <div class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-orange-100 tw-text-orange-800\">\r\n <cide-ele-icon>edit</cide-ele-icon>\r\n <span>Modified</span>\r\n </div>\r\n }\r\n @if (entity.isOwner) {\r\n <div class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-space-x-1\">\r\n <cide-ele-icon>admin_panel_settings</cide-ele-icon>\r\n <span>Owner</span>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\r\n @if (entity.canView) {\r\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\r\n <cide-ele-icon [class.tw-text-green-500]=\"entity.isActive\" [class.tw-text-gray-400]=\"!entity.isActive\">visibility</cide-ele-icon>\r\n <span class=\"tw-text-xs\" [class.tw-text-green-600]=\"entity.isActive\" [class.tw-text-gray-500]=\"!entity.isActive\">View</span>\r\n </div>\r\n }\r\n @if (entity.canEdit) {\r\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\r\n <cide-ele-icon [class.tw-text-blue-500]=\"entity.isActive\" [class.tw-text-gray-400]=\"!entity.isActive\">edit</cide-ele-icon>\r\n <span class=\"tw-text-xs\" [class.tw-text-blue-600]=\"entity.isActive\" [class.tw-text-gray-500]=\"!entity.isActive\">Edit</span>\r\n </div>\r\n }\r\n @if (entity.isOwner) {\r\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\r\n <cide-ele-icon [class.tw-text-purple-500]=\"entity.isActive\" [class.tw-text-gray-400]=\"!entity.isActive\">admin_panel_settings</cide-ele-icon>\r\n <span class=\"tw-text-xs\" [class.tw-text-purple-600]=\"entity.isActive\" [class.tw-text-gray-500]=\"!entity.isActive\">Owner</span>\r\n </div>\r\n }\r\n @if (!entity.isActive) {\r\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\r\n <cide-ele-icon class=\"tw-text-red-400\">block</cide-ele-icon>\r\n <span class=\"tw-text-xs tw-text-red-500\">Inactive</span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n @if (selectedEntityId() === entity._id) {\r\n <div class=\"tw-w-4 tw-h-4 tw-bg-green-500 tw-rounded-full tw-flex tw-items-center tw-justify-center tw-flex-shrink-0\">\r\n <cide-ele-icon class=\"tw-text-white\">done</cide-ele-icon>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n } @placeholder {\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-py-4\">\r\n <cide-ele-spinner size=\"sm\"></cide-ele-spinner>\r\n <span class=\"tw-ml-2 tw-text-sm tw-text-gray-600\">Loading entities...</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Entity Hierarchy -->\r\n @if (selectedTab() === 'hierarchy') {\r\n <div class=\"tw-mb-4\">\r\n @if (hierarchyLoading()) {\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-py-6\">\r\n <cide-ele-spinner size=\"sm\"></cide-ele-spinner>\r\n <span class=\"tw-ml-3 tw-text-gray-600 tw-text-sm\">Loading hierarchy...</span>\r\n </div>\r\n } @else {\r\n <div class=\"tw-space-y-2\">\r\n @for (node of hierarchy(); track node._id) {\r\n <div class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-p-3\">\r\n <div class=\"tw-flex tw-items-center tw-justify-between\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <cide-ele-icon class=\"tw-text-gray-500\">account_tree</cide-ele-icon>\r\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-800\">{{ node.syen_name }}</span>\r\n </div>\r\n <span class=\"tw-text-xs tw-text-gray-500\">Code: {{ node.syen_entity_code }}</span>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Rights Management -->\r\n @if (selectedEntityId()) {\r\n <div class=\"tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-border tw-border-gray-200 tw-border-opacity-50 tw-rounded-xl tw-p-3 tw-shadow-sm\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2 tw-mb-3\">\r\n <cide-ele-icon class=\"tw-text-green-600\">security</cide-ele-icon>\r\n <h3 class=\"tw-text-sm tw-font-semibold tw-text-gray-900\">Manage Rights</h3>\r\n </div>\r\n \r\n @if (accessPassLoading()) {\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-min-h-[80px]\">\r\n <cide-ele-spinner size=\"sm\"></cide-ele-spinner>\r\n <span class=\"tw-ml-3 tw-text-gray-600 tw-text-sm\">Loading...</span>\r\n </div>\r\n } @else {\r\n @defer (when !accessPassLoading()) {\r\n <form [formGroup]=\"rightsForm\" (ngSubmit)=\"saveRights()\">\r\n <div class=\"tw-flex tw-flex-wrap tw-gap-3 tw-min-h-[80px] tw-items-center\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input \r\n type=\"checkbox\" \r\n formControlName=\"can_view\" \r\n label=\"View\">\r\n </cide-ele-input>\r\n </div>\r\n \r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input \r\n type=\"checkbox\" \r\n formControlName=\"can_edit\" \r\n label=\"Edit\">\r\n </cide-ele-input>\r\n </div>\r\n \r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input \r\n type=\"checkbox\" \r\n formControlName=\"is_owner\" \r\n label=\"Is Owner\">\r\n </cide-ele-input>\r\n </div>\r\n \r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input \r\n type=\"checkbox\" \r\n formControlName=\"syepm_isactive\" \r\n label=\"Is Active\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n </form>\r\n } @placeholder {\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-min-h-[80px]\">\r\n <cide-ele-spinner size=\"sm\"></cide-ele-spinner>\r\n <span class=\"tw-ml-2 tw-text-sm tw-text-gray-600\">Loading rights...</span>\r\n </div>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n \r\n <!-- Fixed Footer -->\r\n <div class=\"tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-px-4 tw-py-3 tw-border-t tw-border-gray-200 tw-border-opacity-30 tw-flex tw-justify-end tw-space-x-2 tw-flex-shrink-0\">\r\n <button cideEleButton variant=\"secondary\" size=\"xs\" type=\"button\" (click)=\"onCancel()\">\r\n Cancel\r\n </button>\r\n @if (selectedEntityId()) {\r\n <button cideEleButton variant=\"primary\" size=\"xs\" type=\"button\" (click)=\"saveRights()\" \r\n [disabled]=\"rightsForm.invalid || saving()\" [loading]=\"saving()\">\r\n @if (pendingChangesCount() > 0) {\r\n Save {{ pendingChangesCount() }} Change{{ pendingChangesCount() > 1 ? 's' : '' }}\r\n } @else {\r\n {{ saving() ? 'Saving...' : 'Save' }}\r\n }\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n `,\r\n styles: []\r\n})\r\nexport class CideLytFloatingEntityRightsSharingComponent implements OnInit {\r\n // Signal-based inputs\r\n data = input<any>();\r\n \r\n // Signal-based outputs\r\n close = output<void>();\r\n save = output<any>();\r\n\r\n // Batch update tracking\r\n private pendingUpdates = new Map<string, {\r\n entityId: string;\r\n formValue: any;\r\n existingId: string;\r\n timestamp: number;\r\n }>();\r\n pendingChangesCount = signal(0);\r\n\r\n // Entity data caching\r\n private entityDataCache = new Map<string, {\r\n data: CoreEntityAccessPassManagement | null;\r\n timestamp: number;\r\n entityId: string;\r\n }>();\r\n private readonly CACHE_DURATION = 5 * 60 * 1000; // 5 minutes cache duration\r\n\r\n private fb = inject(FormBuilder);\r\n private entityService = inject(ENTITY_SERVICE_TOKEN) as IEntityService;\r\n // Inject the merged service that now includes entity access pass management\r\n private entityAccessPassService = inject(CideLytFloatingEntityRightsSharingService);\r\n private appState = inject(AppStateService);\r\n\r\n // Tabs\r\n selectedTab = signal<'user' | 'hierarchy'>('user');\r\n\r\n // State signals\r\n entities = signal<CoreSystemEntity[]>([]);\r\n selectedEntityId = signal<string>('');\r\n entitiesLoading = signal(false);\r\n accessPassLoading = signal(false);\r\n saving = signal(false);\r\n currentAccessPass = signal<CoreEntityAccessPassManagement | null>(null);\r\n accessPassList = signal<CoreEntityAccessPassManagement[]>([]);\r\n\r\n // Hierarchy state (mock)\r\n hierarchy = signal<CoreSystemEntity[]>([]);\r\n hierarchyLoading = signal(false);\r\n\r\n // Computed signals for performance optimization\r\n entityPermissionsMap = computed(() => {\r\n const map = new Map<string, CoreEntityAccessPassManagement>();\r\n this.accessPassList().forEach(accessPass => {\r\n if (accessPass.syepm_entity_id_syen) {\r\n map.set(accessPass.syepm_entity_id_syen, accessPass);\r\n }\r\n });\r\n return map;\r\n });\r\n\r\n // Enhanced entities with permission data for template performance\r\n entitiesWithPermissions = computed((): EntityWithPermissions[] => {\r\n const permissionsMap = this.entityPermissionsMap();\r\n return this.entities().map(entity => ({\r\n ...entity,\r\n permissions: permissionsMap.get(entity._id || '') || null,\r\n canView: permissionsMap.get(entity._id || '')?.syepm_can_view || false,\r\n canEdit: permissionsMap.get(entity._id || '')?.syepm_can_edit || false,\r\n isOwner: permissionsMap.get(entity._id || '')?.syepm_is_owner || false,\r\n isActive: permissionsMap.get(entity._id || '')?.syepm_isactive !== false // Default to true if no permissions\r\n }));\r\n });\r\n\r\n // Form\r\n rightsForm!: FormGroup;\r\n\r\n ngOnInit() {\r\n this.initializeForm();\r\n this.loadEntities();\r\n this.loadAccessPassData();\r\n \r\n // Track form changes for batch updates\r\n this.rightsForm.valueChanges.subscribe(() => {\r\n this.trackPendingChanges();\r\n });\r\n }\r\n\r\n /**\r\n * Track pending changes for batch update\r\n */\r\n private trackPendingChanges(): void {\r\n if (!this.selectedEntityId()) return;\r\n \r\n const formValue = this.rightsForm.value;\r\n const entityId = this.selectedEntityId();\r\n \r\n // Get original values for comparison\r\n const originalValues = this.getOriginalValuesForEntity(entityId);\r\n \r\n // Check if there are actual changes\r\n const hasChanges = this.hasActualChanges(formValue, originalValues);\r\n \r\n const updateKey = `${entityId}`;\r\n \r\n if (hasChanges) {\r\n // Store the pending update with complete form data and entity's _id\r\n this.pendingUpdates.set(updateKey, {\r\n entityId,\r\n formValue: { ...formValue }, // Deep copy to prevent reference issues\r\n existingId: this.currentAccessPass()?._id || '', // Store the entity's specific _id\r\n timestamp: Date.now()\r\n });\r\n \r\n console.log('📝 Tracked changes for entity:', entityId, 'Total pending:', this.pendingUpdates.size);\r\n } else {\r\n // Remove from pending updates if no changes\r\n this.pendingUpdates.delete(updateKey);\r\n console.log('📝 No changes detected for entity:', entityId, 'Removed from pending');\r\n }\r\n \r\n // Update pending changes count\r\n this.pendingChangesCount.set(this.pendingUpdates.size);\r\n }\r\n\r\n /**\r\n * Get original values for an entity\r\n */\r\n private getOriginalValuesForEntity(entityId: string): any {\r\n const cachedData = this.entityDataCache.get(entityId);\r\n if (!cachedData) {\r\n return {\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n };\r\n }\r\n \r\n if (cachedData.data) {\r\n return {\r\n can_view: cachedData.data.syepm_can_view || false,\r\n can_edit: cachedData.data.syepm_can_edit || false,\r\n is_owner: cachedData.data.syepm_is_owner || false,\r\n syepm_isactive: cachedData.data.syepm_isactive !== undefined ? cachedData.data.syepm_isactive : true\r\n };\r\n }\r\n \r\n return {\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n };\r\n }\r\n\r\n /**\r\n * Check if there are actual changes between current and original values\r\n */\r\n private hasActualChanges(currentValues: any, originalValues: any): boolean {\r\n return !!(\r\n currentValues.can_view !== originalValues.can_view ||\r\n currentValues.can_edit !== originalValues.can_edit ||\r\n currentValues.is_owner !== originalValues.is_owner ||\r\n currentValues.syepm_isactive !== originalValues.syepm_isactive\r\n );\r\n }\r\n\r\n /**\r\n * Clear pending changes for a specific entity\r\n */\r\n private clearPendingChanges(entityId: string): void {\r\n const updateKey = `${entityId}`;\r\n this.pendingUpdates.delete(updateKey);\r\n this.pendingChangesCount.set(this.pendingUpdates.size);\r\n }\r\n\r\n /**\r\n * Clear all pending changes\r\n */\r\n private clearAllPendingChanges(): void {\r\n this.pendingUpdates.clear();\r\n this.pendingChangesCount.set(0);\r\n }\r\n\r\n /**\r\n * Check if cached data exists and is still valid\r\n */\r\n private getCachedEntityData(entityId: string): CoreEntityAccessPassManagement | null | undefined {\r\n const cached = this.entityDataCache.get(entityId);\r\n if (!cached) return undefined;\r\n\r\n const now = Date.now();\r\n const isExpired = (now - cached.timestamp) > this.CACHE_DURATION;\r\n \r\n if (isExpired) {\r\n // Remove expired cache entry\r\n this.entityDataCache.delete(entityId);\r\n return undefined;\r\n }\r\n\r\n console.log('📦 Using cached data for entity:', entityId);\r\n return cached.data;\r\n }\r\n\r\n /**\r\n * Cache entity data\r\n */\r\n private setCachedEntityData(entityId: string, data: CoreEntityAccessPassManagement | null): void {\r\n this.entityDataCache.set(entityId, {\r\n data,\r\n timestamp: Date.now(),\r\n entityId\r\n });\r\n console.log('💾 Cached data for entity:', entityId);\r\n }\r\n\r\n /**\r\n * Clear cache for specific entity (useful after updates)\r\n */\r\n private clearEntityCache(entityId: string): void {\r\n this.entityDataCache.delete(entityId);\r\n console.log('🗑️ Cleared cache for entity:', entityId);\r\n }\r\n\r\n /**\r\n * Clear all cached data\r\n */\r\n private clearAllCache(): void {\r\n this.entityDataCache.clear();\r\n console.log('🗑️ Cleared all cached data');\r\n }\r\n\r\n /**\r\n * Check if entity has pending changes\r\n */\r\n hasPendingChanges(entityId: string): boolean {\r\n const pendingChange = this.pendingUpdates.get(entityId);\r\n if (!pendingChange) return false;\r\n \r\n // Get the original cached data for this entity\r\n const cachedData = this.entityDataCache.get(entityId);\r\n if (!cachedData) return true; // If no cached data, consider it changed\r\n \r\n // Compare current form values with original cached values\r\n const currentValues = pendingChange.formValue;\r\n const originalValues = cachedData.data ? {\r\n can_view: cachedData.data.syepm_can_view || false,\r\n can_edit: cachedData.data.syepm_can_edit || false,\r\n is_owner: cachedData.data.syepm_is_owner || false,\r\n syepm_isactive: cachedData.data.syepm_isactive !== undefined ? cachedData.data.syepm_isactive : true\r\n } : {\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n };\r\n \r\n // Check if any values have actually changed\r\n const hasChanges = \r\n currentValues.can_view !== originalValues.can_view ||\r\n currentValues.can_edit !== originalValues.can_edit ||\r\n currentValues.is_owner !== originalValues.is_owner ||\r\n currentValues.syepm_isactive !== originalValues.syepm_isactive;\r\n \r\n return hasChanges;\r\n }\r\n\r\n constructor() {\r\n // Watch for changes in data input and reload access pass data\r\n // Only run when essential data changes to prevent unnecessary re-renders\r\n effect(() => {\r\n const data = this.data();\r\n if (data?.syepm_access_passs_to && data?.core_entity_access_pass_management) {\r\n // Use setTimeout to prevent synchronous execution during change detection\r\n setTimeout(() => this.loadAccessPassData(), 0);\r\n }\r\n });\r\n }\r\n\r\n\r\n selectTab(tab: 'user' | 'hierarchy') {\r\n this.selectedTab.set(tab);\r\n }\r\n\r\n private initializeForm() {\r\n this.rightsForm = this.fb.group({\r\n can_view: [false],\r\n can_edit: [false],\r\n is_owner: [false],\r\n syepm_isactive: [true]\r\n });\r\n }\r\n\r\n async loadEntities() {\r\n this.entitiesLoading.set(true);\r\n try {\r\n const payload: MEntity = { \r\n syen_id: \"\" \r\n // Note here list of entity is got from loggied in user id to which he is mapped\r\n };\r\n const resp: entityControllerResponse = await firstValueFrom(this.entityService.getEntityList(payload));\r\n const list: CoreSystemEntity[] = resp?.data || [];\r\n this.entities.set(list);\r\n } catch (error) {\r\n console.error('Error loading entities:', error);\r\n } finally {\r\n this.entitiesLoading.set(false);\r\n }\r\n }\r\n\r\n selectEntity(entityId: string) {\r\n // Allow selection of any entity to manage rights\r\n this.selectedEntityId.set(entityId);\r\n \r\n // Check cache first before making API call\r\n const cachedData = this.getCachedEntityData(entityId);\r\n if (cachedData !== undefined) {\r\n // Use cached data\r\n this.currentAccessPass.set(cachedData);\r\n this.populateFormWithCachedData(cachedData);\r\n return;\r\n }\r\n \r\n // Load rights for the selected entity (will cache the result)\r\n this.loadRightsForSelectedEntity(entityId);\r\n }\r\n\r\n /**\r\n * Populate form with cached data\r\n */\r\n private populateFormWithCachedData(data: CoreEntityAccessPassManagement | null): void {\r\n const entityId = this.selectedEntityId();\r\n \r\n // Check if there are pending changes for this entity first\r\n const pendingChange = this.pendingUpdates.get(entityId);\r\n if (pendingChange) {\r\n console.log('📝 Restoring pending changes for entity:', entityId);\r\n this.rightsForm.patchValue(pendingChange.formValue);\r\n return;\r\n }\r\n \r\n // No pending changes, use cached data\r\n this.setFormValues(data);\r\n }\r\n\r\n /**\r\n * Set form values based on data or defaults\r\n */\r\n private setFormValues(data: CoreEntityAccessPassManagement | null): void {\r\n if (data) {\r\n this.rightsForm.patchValue({\r\n can_view: data.syepm_can_view || false,\r\n can_edit: data.syepm_can_edit || false,\r\n is_owner: data.syepm_is_owner || false,\r\n syepm_isactive: data.syepm_isactive !== undefined ? data.syepm_isactive : true\r\n });\r\n } else {\r\n this.rightsForm.patchValue({\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n });\r\n }\r\n }\r\n\r\n async loadRightsForSelectedEntity(entityId: string) {\r\n if (!entityId) {\r\n // Reset form to blank values if no entity selected\r\n this.rightsForm.patchValue({\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n });\r\n this.currentAccessPass.set(null);\r\n return;\r\n }\r\n\r\n this.accessPassLoading.set(true);\r\n try {\r\n const currentUser = this.appState.currentUser();\r\n if (!currentUser) {\r\n console.error('No current user found');\r\n return;\r\n }\r\n\r\n // Get the core_entity_access_pass_management value from the data input\r\n const coreEntityAccessPassManagement = this.data()?.core_entity_access_pass_management || 'core_entity_access_pass_management_sycad';\r\n \r\n // Get the access pass to value - this is the primary _id of the specific table record \r\n // (like core_user_contact_addresses) whose access we are managing\r\n const accessPassTo = this.data()?.syepm_access_passs_to;\r\n \r\n if (!accessPassTo) {\r\n console.error('No accessPassTo provided - this should be the primary _id of the record whose access is being managed');\r\n return;\r\n }\r\n\r\n // Check if we have an existing _id for this entity in our access pass list\r\n const existingAccessPass = this.accessPassList().find(accessPass => \r\n accessPass.syepm_entity_id_syen === entityId\r\n );\r\n\r\n if (existingAccessPass && existingAccessPass._id) {\r\n // We have an existing _id, make targeted getById API call\r\n console.log('🎯 Making targeted getById API call for entity:', entityId, 'with _id:', existingAccessPass._id);\r\n \r\n const response = await firstValueFrom(\r\n this.entityAccessPassService.getEntityAccessPassById({\r\n syepm_id: existingAccessPass._id,\r\n core_entity_access_pass_management: coreEntityAccessPassManagement\r\n })\r\n );\r\n\r\n if (response.success && response.data) {\r\n // Entity has existing permissions, load them\r\n this.currentAccessPass.set(response.data);\r\n \r\n // Check for pending changes first, otherwise use API data\r\n const pendingChange = this.pendingUpdates.get(entityId);\r\n if (pendingChange) {\r\n console.log('📝 Restoring pending changes for entity:', entityId);\r\n this.rightsForm.patchValue(pendingChange.formValue);\r\n } else {\r\n this.setFormValues(response.data);\r\n }\r\n \r\n // Cache the data\r\n this.setCachedEntityData(entityId, response.data);\r\n } else {\r\n // API call failed, use default values\r\n this.currentAccessPass.set(null);\r\n this.setFormValues(null);\r\n this.setCachedEntityData(entityId, null);\r\n }\r\n } else {\r\n // No existing _id found, no API call needed - entity has no permissions\r\n console.log('🚫 No existing _id found for entity:', entityId, '- skipping API call');\r\n \r\n this.currentAccessPass.set(null);\r\n this.setFormValues(null);\r\n this.setCachedEntityData(entityId, null);\r\n }\r\n } catch (error) {\r\n console.error('Error loading rights for selected entity:', error);\r\n // Set default values on error\r\n this.currentAccessPass.set(null);\r\n \r\n // Check for pending changes first, otherwise use default values\r\n const pendingChange = this.pendingUpdates.get(entityId);\r\n if (pendingChange) {\r\n console.log('📝 Restoring pending changes for entity:', entityId);\r\n this.rightsForm.patchValue(pendingChange.formValue);\r\n } else {\r\n this.setFormValues(null);\r\n }\r\n \r\n // Cache null data on error\r\n this.setCachedEntityData(entityId, null);\r\n } finally {\r\n this.accessPassLoading.set(false);\r\n }\r\n }\r\n\r\n async loadAccessPassData() {\r\n // Prevent multiple simultaneous calls\r\n if (this.accessPassLoading()) {\r\n return;\r\n }\r\n\r\n this.accessPassLoading.set(true);\r\n try {\r\n const currentUser = this.appState.currentUser();\r\n if (!currentUser) {\r\n console.error('No current user found');\r\n return;\r\n }\r\n\r\n // Get the core_entity_access_pass_management value from the data input\r\n const coreEntityAccessPassManagement = this.data()?.core_entity_access_pass_management || 'core_entity_access_pass_management_sycad';\r\n \r\n // Get the access pass to value - this is the primary _id of the specific table record \r\n // (like core_user_contact_addresses) whose access we are managing\r\n const accessPassTo = this.data()?.syepm_access_passs_to;\r\n \r\n if (!accessPassTo) {\r\n console.error('No accessPassTo provided - this should be the primary _id of the record whose access is being managed');\r\n this.accessPassLoading.set(false);\r\n return;\r\n }\r\n \r\n // Load existing access pass data using the received data\r\n const response: CoreEntityAccessPassManagementControllerResponse = await firstValueFrom(\r\n this.entityAccessPassService.getEntityAccessPassList({\r\n syepm_access_passs_to: accessPassTo,\r\n core_entity_access_pass_management: coreEntityAccessPassManagement,\r\n syepm_entity_id_syen: this.appState.activeEntity()?._id || ''\r\n })\r\n );\r\n\r\n if (response.success && response.data) {\r\n // Store the full access pass list for dynamic entity permissions\r\n this.accessPassList.set(response.data);\r\n \r\n // Don't automatically set any access pass as current\r\n // Let the user explicitly select which access pass to edit\r\n this.currentAccessPass.set(null);\r\n \r\n // Set default form values\r\n this.rightsForm.patchValue({\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n });\r\n } else {\r\n // No existing access pass, set default values\r\n this.accessPassList.set([]);\r\n this.currentAccessPass.set(null);\r\n this.rightsForm.patchValue({\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n });\r\n }\r\n } catch (error) {\r\n console.error('Error loading access pass data:', error);\r\n // Set default values on error\r\n this.rightsForm.patchValue({\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n });\r\n } finally {\r\n this.accessPassLoading.set(false);\r\n }\r\n }\r\n\r\n async saveRights() {\r\n if (this.rightsForm.invalid) return;\r\n\r\n this.saving.set(true);\r\n try {\r\n // Get all pending updates\r\n const updates = Array.from(this.pendingUpdates.values());\r\n \r\n if (updates.length === 0) {\r\n console.log('No pending changes to save');\r\n return;\r\n }\r\n\r\n console.log('Saving merged API calls for updates:', updates);\r\n\r\n const currentUser = this.appState.currentUser();\r\n \r\n if (!currentUser) {\r\n console.error('No current user found');\r\n return;\r\n }\r\n\r\n // Get the core_entity_access_pass_management value from the data input\r\n const coreEntityAccessPassManagement = this.data()?.core_entity_access_pass_management || 'core_entity_access_pass_management_sycad';\r\n \r\n // Get the access pass to value - this is the primary _id of the specific table record \r\n // (like core_user_contact_addresses) whose access we are managing\r\n const accessPassTo = this.data()?.syepm_access_passs_to;\r\n \r\n if (!accessPassTo) {\r\n console.error('No accessPassTo provided - this should be the primary _id of the record whose access is being managed');\r\n return;\r\n }\r\n\r\n // Create array of Observable API calls\r\n const apiCalls: Observable<CoreEntityAccessPassManagementInsertUpdateControllerResponse>[] = updates.map(update => {\r\n const formValue = update.formValue;\r\n \r\n console.log(`🔄 Creating API call for entity ${update.entityId} with existingId: ${update.existingId}`);\r\n \r\n return this.entityAccessPassService.saveEntityAccessPassForUserAndEntity(\r\n currentUser._id || '',\r\n update.entityId,\r\n accessPassTo,\r\n coreEntityAccessPassManagement,\r\n {\r\n can_view: formValue.can_view || false,\r\n can_edit: formValue.can_edit || false,\r\n is_owner: formValue.is_owner || false,\r\n syepm_isactive: formValue.syepm_isactive !== undefined ? formValue.syepm_isactive : true\r\n },\r\n update.existingId // Use the entity-specific existingId\r\n );\r\n });\r\n\r\n // Execute all API calls and wait for all to complete\r\n const responses = await Promise.all(apiCalls.map(apiCall => firstValueFrom(apiCall)));\r\n\r\n // Check if all responses were successful\r\n const allSuccessful = responses.every(response => response.success);\r\n \r\n if (allSuccessful) {\r\n console.log('All rights saved successfully via merged API calls');\r\n \r\n // Update cache and accessPassList with new saved data\r\n const updatedAccessPassList = [...this.accessPassList()];\r\n \r\n // Loop through each updated entity and find its corresponding response\r\n updates.forEach(update => {\r\n // Find the response that matches this entity's ID\r\n const response = responses.find(response => {\r\n // Check if this response corresponds to the current update\r\n // We can match by checking if the response data has the same entity ID\r\n return response.data && response.data.syepm_entity_id_syen === update.entityId;\r\n });\r\n \r\n if (response && response.success && response.data) {\r\n // Update cache with the new saved data\r\n this.setCachedEntityData(update.entityId, response.data);\r\n console.log('💾 Updated cache with new data for entity:', update.entityId);\r\n \r\n // Find and update the existing access pass in the list\r\n const existingIndex = updatedAccessPassList.findIndex(\r\n accessPass => accessPass.syepm_entity_id_syen === update.entityId\r\n );\r\n if (existingIndex !== -1) {\r\n updatedAccessPassList[existingIndex] = response.data;\r\n } else {\r\n // Add new access pass if it didn't exist before\r\n updatedAccessPassList.push(response.data);\r\n }\r\n }\r\n });\r\n \r\n // Update the access pass list\r\n this.accessPassList.set(updatedAccessPassList);\r\n \r\n // Clear all pending changes\r\n this.clearAllPendingChanges();\r\n \r\n // Close the manage rights section by clearing selected entity\r\n this.selectedEntityId.set('');\r\n \r\n this.save.emit({\r\n responses,\r\n success: true,\r\n totalUpdates: updates.length\r\n });\r\n } else {\r\n // Handle partial failures\r\n const failedResponses = responses.filter(response => !response.success);\r\n console.error('Some rights failed to save:', failedResponses);\r\n \r\n // You can choose to either:\r\n // 1. Clear all pending changes (optimistic)\r\n // 2. Keep failed changes in pending (conservative)\r\n this.clearAllPendingChanges(); // Optimistic approach\r\n \r\n this.save.emit({\r\n responses,\r\n success: false,\r\n failedCount: failedResponses.length,\r\n totalUpdates: updates.length\r\n });\r\n }\r\n } catch (error) {\r\n console.error('Error saving merged rights:', error);\r\n \r\n // Clear pending changes on error (you can modify this behavior)\r\n this.clearAllPendingChanges();\r\n } finally {\r\n this.saving.set(false);\r\n }\r\n }\r\n\r\n onCancel() {\r\n // Clear all pending changes when canceling\r\n this.clearAllPendingChanges();\r\n // Clear all cached data when canceling\r\n this.clearAllCache();\r\n // Close the floating container\r\n this.entityAccessPassService.hide();\r\n // Also emit close event for any parent components\r\n this.close.emit();\r\n }\r\n}\r\n\r\n","/*\n * Public API Surface of cloud-ide-layout\n */\n\nexport * from './lib/cloud-ide-layout.service';\nexport * from './lib/cloud-ide-layout.component';\nexport * from './lib/layout/shared/shared-wrapper/shared-wrapper.component';\nexport * from './lib/layout/shared/shared.service';\nexport * from './lib/layout/shared/component-context.service';\nexport * from './lib/layout/shared/rights.service';\nexport * from './lib/cloud-ide-layout.routes';\nexport * from './lib/utils';\nexport * from './lib/utils/custom-route-reuse-strategy';\n\n// App State Management\nexport * from './lib/services/app-state/app-state.service';\nexport * from './lib/services/app-state';\nexport * from './lib/services/user-status/user-status.service';\nexport * from './lib/services/theme/theme.service';\n\n// Modern Page Data Management (Legacy code removed)\nexport * from './lib/services/cache-manager/cache-manager.service';\n\n// File Manager Management\nexport * from './lib/services';\n\n// Floating Entity Rights Sharing\nexport * from './lib/components/floating-entity-rights-sharing';\n\n// Floating Container (moved to cloud-ide-element)\n// export * from './lib/components/floating-container';\n\n// Layout Components","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","take","i1.CideLytRequestService"],"mappings":";;;;;;;;;;;;;;;;;;;MAKa,qBAAqB,CAAA;AAEhC,IAAA,WAAA,GAAA;uGAFW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAArB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cAFpB,MAAM,EAAA,CAAA;;2FAEP,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCCY,oBAAoB,CAAA;IACxB,aAAa,GAAY,KAAK;AAErC,IAAA,WAAA,GAAA;;IAGA,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,aAAa,GAAG,KAAK;AAC1B,QAAA,QAAQ,CAAC,aAAa,CAAC,CAAA,wBA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A,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACjB,oBAAoB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,sBAAA,EAAA,CAAA,MAAA,CADpB,iBAAiB,CAAA,EAAA,MAAA,CAAA,EAAA,CAAA,aAAA,EAAA,EAAA,CAAA,eAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,EAAA,CAAA,eAAA,EADjB,kBAAkB,CAAA,CAAA,EAAA,CAAA;;2FA2OT,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBAlPvD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yCAAyC,EAAA,eAAA,EAClC,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,sBAAsB;wBACtB,kBAAkB;wBAClB,iBAAiB;wBACjB;qBACD,EAAA,QAAA,EACS,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoOT,EAAA,CAAA,EAAA;;;;;;;;ACvQH;;AAEG;AA2BH;AACA;AAEA;;AChCA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cloud-ide-layout-cloud-ide-layout-CkYksc6R.mjs","sources":["../../../projects/cloud-ide-layout/src/lib/cloud-ide-layout.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/header/header.service.ts","../../../projects/cloud-ide-layout/src/lib/services/file-manager/file-manager.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidebar/sidebar.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/footer/footer.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/console/console.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidedrawer/sidedrawer.service.ts","../../../projects/cloud-ide-layout/src/lib/services/app-state/app-state.service.ts","../../../projects/cloud-ide-layout/src/lib/services/app-state/app-state-helper.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/shared/shared.service.ts","../../../projects/cloud-ide-layout/src/lib/components/floating-entity-selection/floating-entity-selection.service.ts","../../../projects/cloud-ide-layout/src/lib/services/notification-settings/notification-settings.service.ts","../../../projects/cloud-ide-layout/src/lib/components/notification-settings/notification-settings.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/header/header-wrapper/header-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/header/header-wrapper/header-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/services/user-status/user-status.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidebar/sidebar-wrapper/sidebar-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidebar/sidebar-wrapper/sidebar-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/utils/custom-route-reuse-strategy.ts","../../../projects/cloud-ide-layout/src/lib/services/tab-state.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/request/request.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidedrawer/sidedrawer-wrapper/sidedrawer-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidedrawer/sidedrawer-wrapper/sidedrawer-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/components/shortcuts-panel/shortcuts-panel.component.ts","../../../projects/cloud-ide-layout/src/lib/components/settings-container/settings-container.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/footer/footer-wrapper/footer-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/footer/footer-wrapper/footer-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/layout/console/console-wrapper/console-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/console/console-wrapper/console-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/layout/request/request-wrapper/request-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/request/request-wrapper/request-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/layout/request/tab-content/tab-content.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/layout/layout-wrapper/layout-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/layout/layout-wrapper/layout-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/cloud-ide-layout.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/shared/component-context.service.ts","../../../projects/cloud-ide-layout/src/lib/layout/shared/shared-wrapper/shared-wrapper.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/shared/shared-wrapper/shared-wrapper.component.html","../../../projects/cloud-ide-layout/src/lib/layout/shared/rights.service.ts","../../../projects/cloud-ide-layout/src/lib/cloud-ide-layout.routes.ts","../../../projects/cloud-ide-layout/src/lib/services/theme/theme.service.ts","../../../projects/cloud-ide-layout/src/lib/services/cache-manager/cache-manager.service.ts","../../../projects/cloud-ide-layout/src/lib/components/floating-entity-rights-sharing/floating-entity-rights-sharing.service.ts","../../../projects/cloud-ide-layout/src/lib/components/floating-entity-rights-sharing/floating-entity-rights-sharing.component.ts","../../../projects/cloud-ide-layout/src/public-api.ts","../../../projects/cloud-ide-layout/src/cloud-ide-layout.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CloudIdeLayoutService {\r\n\r\n constructor() { }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytHeaderService {\r\n public headerVisible: boolean = false;\r\n\r\n constructor() { }\r\n\r\n // Hide Header\r\n hideHeader() {\r\n this.headerVisible = false;\r\n document.querySelector(`#cide-lyt-header-wrapper`)?.classList.add('cide-lyt-header-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-header-exist');\r\n }\r\n\r\n // Show Header\r\n showHeader() {\r\n this.headerVisible = true;\r\n document.querySelector(`#cide-lyt-header-wrapper`)?.classList.remove('cide-lyt-header-wrapper-hide');\r\n document.querySelector(`body`)?.classList.add('cide-lyt-header-exist');\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { cidePath, coreRoutesUrl, hostManagerRoutesUrl, MFileManager, fileManagerControllerResponse } from 'cloud-ide-lms-model';\r\nimport { Observable } from 'rxjs';\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytFileManagerService {\r\n private http = inject(HttpClient);\r\n\r\n getFileDetails(body: MFileManager): Observable<fileManagerControllerResponse> {\r\n return this.http.post(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, coreRoutesUrl?.module, coreRoutesUrl?.fileManager]), body) as Observable<fileManagerControllerResponse>;\r\n }\r\n\r\n uploadFile(file: File, additionalData?: any): Observable<any> {\r\n // Convert file to base64\r\n return new Observable(observer => {\r\n const reader = new FileReader();\r\n reader.onload = () => {\r\n const base64String = reader.result as string;\r\n const base64Data = base64String.split(',')[1]; // Remove data:image/jpeg;base64, prefix\r\n \r\n const payload = {\r\n cyfm_name: file.name,\r\n cyfm_alt_text: additionalData?.altText || file.name,\r\n cyfm_path: '', // Will be set by backend\r\n cyfm_size_in_byte: file.size,\r\n cyfm_type: file.type,\r\n cyfm_creation_dt: new Date().toISOString(),\r\n cyfm_id_user: additionalData?.userId || '',\r\n cyfm_permissions: additionalData?.permissions || [],\r\n cyfm_tags: additionalData?.tags || [],\r\n cyfm_version: 1,\r\n cyfm_file_status_sygmt: additionalData?.fileStatus || 'active',\r\n cyfm_isactive: true,\r\n fileData: base64Data, // Base64 file data\r\n ...additionalData\r\n };\r\n\r\n this.http.post(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, coreRoutesUrl?.module, 'upload']), payload)\r\n .subscribe({\r\n next: (response) => observer.next(response),\r\n error: (error) => observer.error(error)\r\n });\r\n };\r\n reader.onerror = () => observer.error('Failed to read file');\r\n reader.readAsDataURL(file);\r\n });\r\n }\r\n}\r\n","import { HttpClient } from '@angular/common/http';\r\nimport { Injectable, inject } from '@angular/core';\r\nimport { cidePath, coreRoutesUrl, hostManagerRoutesUrl, menuControllerResponse, MMenu } from 'cloud-ide-lms-model';\r\nimport { Observable } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytSidebarService {\r\n public sidebarMenueVisible: boolean = false;\r\n private http = inject(HttpClient);\r\n\r\n // method to get sidebar menues\r\n getSidebarMenues(body: MMenu): Observable<menuControllerResponse> {\r\n return this.http?.post(cidePath?.join([hostManagerRoutesUrl?.cideSuiteHost, coreRoutesUrl?.module, coreRoutesUrl?.getSidebarMenues]), body);\r\n }\r\n\r\n // Hide Sidebar\r\n hideSidebar() {\r\n this.sidebarMenueVisible = false;\r\n document.querySelector(`#cide-lyt-sidebar-page`)?.classList.add('cide-lyt-sidebar-page-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-sidebar-exist');\r\n }\r\n\r\n // Show Sidebar\r\n showSidebar() {\r\n this.sidebarMenueVisible = true;\r\n document.querySelector(`#cide-lyt-sidebar-page`)?.classList.remove('cide-lyt-sidebar-page-hide');\r\n document.querySelector(`body`)?.classList.add('cide-lyt-sidebar-exist');\r\n }\r\n}\r\n\r\n//#ff5700\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytFooterService {\r\n public footerVisible: boolean = false;\r\n\r\n constructor() { }\r\n\r\n // Hide Footer\r\n hideFooter() {\r\n this.footerVisible = false;\r\n document.querySelector(`#cide-lyt-footer-console-wrapper`)?.classList.add('cide-lyt-footer-console-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-footer-exist');\r\n }\r\n\r\n // Show Footer\r\n showFooter() {\r\n this.footerVisible = true;\r\n document.querySelector(`#cide-lyt-footer-console-wrapper`)?.classList.remove('cide-lyt-footer-console-wrapper-hide');\r\n document.querySelector(`body`)?.classList.add('cide-lyt-footer-exist');\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytConsoleService {\r\n public headerVisible: boolean = false;\r\n\r\n constructor() { }\r\n\r\n // Hide Console\r\n hideConsole() {\r\n this.headerVisible = false;\r\n document.querySelector(`#cide-lyt-console-wrapper`)?.classList.add('cide-lyt-console-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-console-exist');\r\n }\r\n\r\n // Show Console\r\n showConsole() {\r\n this.headerVisible = true;\r\n document.querySelector(`#cide-lyt-console-wrapper`)?.classList.remove('cide-lyt-console-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-console-exist');\r\n }\r\n}\r\n","import { Injectable, signal } from '@angular/core';\r\nimport { ISytmLayout } from 'cloud-ide-lms-model';\r\n\r\n// It's good practice to define an interface for the data you're working with.\r\nexport interface SidedrawerItem {\r\n status: boolean;\r\n configFor: string;\r\n title: string;\r\n icon: string;\r\n description: string;\r\n isActive: boolean;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytSidedrawerService {\r\n public sidedrawerVisible: boolean = false;\r\n \r\n // Modern Angular signals for reactive state management\r\n private drawerItemsSignal = signal<SidedrawerItem[]>([]);\r\n public drawerItems = this.drawerItemsSignal.asReadonly();\r\n \r\n private notesVisibleSignal = signal<boolean>(false);\r\n public notesVisible = this.notesVisibleSignal.asReadonly();\r\n \r\n private activeComponentSignal = signal<string | null>(null);\r\n public activeComponent = this.activeComponentSignal.asReadonly();\r\n \r\n private _pageId: string | null = null;\r\n private _themeId: string | null = null;\r\n\r\n setContext(pageId: string, themeId: string) {\r\n this._pageId = pageId;\r\n this._themeId = themeId;\r\n }\r\n\r\n get pageId(): string | null {\r\n return this._pageId;\r\n }\r\n\r\n get themeId(): string | null {\r\n return this._themeId;\r\n }\r\n\r\n // Hide Sidedrawer\r\n hideSidedrawer() {\r\n this.sidedrawerVisible = false;\r\n document.querySelector(`#cide-lyt-sidedrawer-wrapper`)?.classList.add('cide-lyt-sidedrawer-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-sidedrawer-exist');\r\n }\r\n\r\n // Show Sidedrawer \r\n showSidedrawer() {\r\n this.sidedrawerVisible = true;\r\n document.querySelector(`#cide-lyt-sidedrawer-wrapper`)?.classList.remove('cide-lyt-sidedrawer-wrapper-hide');\r\n document.querySelector(`body`)?.classList.remove('cide-lyt-sidedrawer-exist');\r\n }\r\n\r\n // Method to update drawer items from layout data\r\n updateDrawerItems(layout: ISytmLayout | undefined) {\r\n if (layout?.sytm_layout_drawer && layout.sytm_layout_drawer.length > 0) {\r\n const items: SidedrawerItem[] = layout.sytm_layout_drawer\r\n .filter((item) => item.syth_status && item?.core_system_config?.syco_isactive) // Only show active items\r\n .map(item => ({\r\n status: item.syth_status,\r\n configFor: item.syth_config_syco_for,\r\n title: item.core_system_config?.syco_title as string,\r\n icon: item.core_system_config?.syco_configuration.syco_icon,\r\n description: item.core_system_config?.syco_desc || \"\",\r\n isActive: item.core_system_config?.syco_isactive || false\r\n }));\r\n this.drawerItemsSignal.set(items);\r\n } else {\r\n this.drawerItemsSignal.set([]); // Clear items if no drawer data\r\n }\r\n }\r\n\r\n // Set the active component to display in the side drawer\r\n setActiveComponent(configFor: string | null) {\r\n this.activeComponentSignal.set(configFor);\r\n }\r\n}\r\n","import { Injectable, signal, computed, effect, inject } from '@angular/core';\nimport { AuthUserMst, menuResponseData, CoreSystemEntity, hostManagerRoutesUrl, cidePath, coreRoutesUrl, commonRoutesUrl } from 'cloud-ide-lms-model';\nimport { CideEleFileManagerService } from 'cloud-ide-element';\n\nexport interface AppState {\n currentUser: AuthUserMst | null;\n activeModule: menuResponseData | null;\n activeEntity: CoreSystemEntity | null;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AppStateService {\n // Inject services\n private fileManagerService = inject(CideEleFileManagerService);\n\n // Private signal for current user\n private currentUserSignal = signal<AuthUserMst | null>(null);\n\n // Private signal for active module\n private activeModuleSignal = signal<menuResponseData | null>(null);\n\n // Private signal for active entity\n private activeEntitySignal = signal<CoreSystemEntity | null>(null);\n \n // Track if entity change handler is initialized (to prevent triggering on initial load)\n private entityChangeHandlerInitialized = false;\n \n // Callback registration for entity change handlers (to avoid circular dependencies)\n private entityChangeCallbacks: Array<(entity: CoreSystemEntity | null) => void> = [];\n\n // Public computed signal for current user, for other services to get the user value\n public readonly currentUser = computed(() => this.currentUserSignal());\n\n // Public computed signal for active module\n public readonly activeModule = computed(() => this.activeModuleSignal());\n\n // Public computed signal for active entity\n public readonly activeEntity = computed(() => this.activeEntitySignal());\n\n // Computed signals for derived state\n public readonly isAuthenticated = computed(() => !!this.currentUserSignal());\n public readonly userInfo = computed(() => {\n const user = this.currentUserSignal();\n if (!user) return null;\n \n return {\n id: user._id,\n name: user.user_fullname || `${user.user_firstname} ${user.user_lastname}`,\n email: user.user_emailid,\n role: \"\" // user.user_id_role\n };\n });\n\n // Computed signal for active module info\n public readonly activeModuleInfo = computed(() => {\n const module = this.activeModuleSignal();\n if (!module) return null;\n \n return {\n id: module._id,\n title: module.syme_title,\n icon: module.syme_icon,\n path: module.syme_path,\n type: module.syme_type\n };\n });\n\n constructor() {\n // Initialize file manager base URL on app startup\n this.fileManagerService.setBaseUrl(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, coreRoutesUrl?.module, coreRoutesUrl?.fileManager]));\n this.fileManagerService.setObjectIdEndpoint(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, commonRoutesUrl?.module, commonRoutesUrl?.generateObjectId]));\n\n // Load initial state from localStorage\n this.loadFromLocalStorage();\n \n // Save to localStorage whenever state changes\n effect(() => {\n const currentUser = this.currentUserSignal();\n const activeModule = this.activeModuleSignal();\n const activeEntity = this.activeEntitySignal();\n this.saveToLocalStorage({\n user: currentUser,\n activeModule: activeModule,\n activeEntity: activeEntity\n });\n });\n\n // Automatically update file manager user ID whenever user changes\n effect(() => {\n const currentUser = this.currentUserSignal();\n console.log('🔍 [AppStateService] User changed, updating file manager user ID:', currentUser);\n if (currentUser?._id) {\n this.fileManagerService.setUserId(currentUser._id);\n } else {\n this.fileManagerService.setUserId('');\n }\n });\n\n // GLOBAL ENTITY CHANGE HANDLER: When entity changes, close all tabs and navigate to home\n // This ensures all components are destroyed and data is refreshed for the new entity\n // No need to inject this service in any component - it works globally\n let previousEntityId: string | null = null;\n effect(() => {\n const currentEntity = this.activeEntitySignal();\n const currentEntityId = currentEntity?._id || null;\n \n // Mark handler as initialized after first run (to skip initial load from localStorage)\n if (!this.entityChangeHandlerInitialized) {\n previousEntityId = currentEntityId;\n this.entityChangeHandlerInitialized = true;\n console.log('🏢 [AppStateService] Entity change handler initialized with initial entity:', currentEntityId);\n return; // Skip on initial load\n }\n \n // Only trigger if entity actually changed (not on initial load)\n if (previousEntityId !== null && currentEntityId !== previousEntityId && currentEntityId !== null) {\n console.log('🏢 [AppStateService] Entity changed - notifying registered handlers', {\n previousEntityId,\n newEntityId: currentEntityId,\n newEntityName: currentEntity?.syen_name\n });\n \n // Notify all registered entity change callbacks (e.g., close tabs, refresh components)\n this.entityChangeCallbacks.forEach(callback => {\n try {\n callback(currentEntity);\n } catch (error) {\n console.error('Error in entity change callback:', error);\n }\n });\n } else if (previousEntityId !== null && currentEntityId === null) {\n // Entity was cleared - also notify callbacks\n console.log('🏢 [AppStateService] Entity cleared - notifying registered handlers');\n this.entityChangeCallbacks.forEach(callback => {\n try {\n callback(null);\n } catch (error) {\n console.error('Error in entity change callback:', error);\n }\n });\n }\n \n // Update previous entity ID for next comparison\n previousEntityId = currentEntityId;\n });\n\n // Listen for localStorage changes from other tabs/windows\n this.setupStorageListener();\n }\n\n /**\n * Set the current user\n */\n setUser(user: AuthUserMst | null): void {\n this.currentUserSignal.set(user);\n // Note: File manager user ID is automatically updated via effect() in constructor\n }\n\n /**\n * Update user data (partial update)\n */\n updateUser(updates: Partial<AuthUserMst>): void {\n const currentUser = this.currentUserSignal();\n if (currentUser) {\n this.currentUserSignal.set({ ...currentUser, ...updates });\n }\n }\n\n /**\n * Clear user data\n */\n clearUser(): void {\n this.currentUserSignal.set(null);\n }\n\n /**\n * Get current user value (non-reactive)\n */\n getUserValue(): AuthUserMst | null {\n return this.currentUserSignal();\n }\n\n /**\n * Set the active module\n */\n setActiveModule(module: menuResponseData | null): void {\n this.activeModuleSignal.set(module);\n }\n\n /**\n * Get active module value (non-reactive)\n */\n getActiveModuleValue(): menuResponseData | null {\n return this.activeModuleSignal();\n }\n\n /**\n * Set the active entity\n */\n setActiveEntity(entity: CoreSystemEntity | null): void {\n this.activeEntitySignal.set(entity);\n }\n\n /**\n * Get active entity value (non-reactive)\n */\n getActiveEntityValue(): CoreSystemEntity | null {\n return this.activeEntitySignal();\n }\n\n /**\n * Register a callback to be called when entity changes\n * This allows other services to react to entity changes without creating circular dependencies\n * @param callback Function to call when entity changes, receives the new entity (or null if cleared)\n */\n registerEntityChangeHandler(callback: (entity: CoreSystemEntity | null) => void): void {\n this.entityChangeCallbacks.push(callback);\n console.log('📝 [AppStateService] Registered entity change handler, total handlers:', this.entityChangeCallbacks.length);\n }\n\n /**\n * Unregister an entity change callback\n * @param callback The callback function to remove\n */\n unregisterEntityChangeHandler(callback: (entity: CoreSystemEntity | null) => void): void {\n const index = this.entityChangeCallbacks.indexOf(callback);\n if (index > -1) {\n this.entityChangeCallbacks.splice(index, 1);\n console.log('📝 [AppStateService] Unregistered entity change handler, remaining handlers:', this.entityChangeCallbacks.length);\n }\n }\n\n /**\n * Manually refresh state from localStorage\n * Call this method when you need to sync with external localStorage changes\n */\n refreshFromLocalStorage(): void {\n this.loadFromLocalStorage();\n // Note: File manager user ID is automatically updated via effect() when user signal changes\n }\n\n /**\n * Check if localStorage is available (browser environment)\n */\n private isLocalStorageAvailable(): boolean {\n try {\n return typeof window !== 'undefined' && typeof localStorage !== 'undefined';\n } catch {\n return false;\n }\n }\n\n /**\n * Save state to localStorage\n */\n private saveToLocalStorage(data: {\n user?: AuthUserMst | null;\n activeModule?: menuResponseData | null;\n activeEntity?: CoreSystemEntity | null;\n }): void {\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n\n try {\n if (data.user !== undefined) {\n if (data.user) {\n localStorage.setItem('cide_auth_user', JSON.stringify(data.user));\n } else {\n localStorage.removeItem('cide_auth_user');\n }\n }\n\n if (data.activeModule !== undefined) {\n if (data.activeModule) {\n localStorage.setItem('cide_active_module', JSON.stringify(data.activeModule));\n } else {\n localStorage.removeItem('cide_active_module');\n }\n }\n\n if (data.activeEntity !== undefined) {\n if (data.activeEntity) {\n localStorage.setItem('cide_active_entity', JSON.stringify(data.activeEntity));\n } else {\n localStorage.removeItem('cide_active_entity');\n }\n }\n } catch (error) {\n console.error('Error saving to localStorage:', error);\n }\n }\n\n /**\n * Load state from localStorage\n */\n private loadFromLocalStorage(): void {\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n\n try {\n const userData = localStorage.getItem('cide_auth_user');\n if (userData) {\n const user = JSON.parse(userData) as AuthUserMst;\n this.currentUserSignal.set(user);\n }\n\n const moduleData = localStorage.getItem('cide_active_module');\n if (moduleData) {\n const module = JSON.parse(moduleData) as menuResponseData;\n this.activeModuleSignal.set(module);\n }\n\n const entityData = localStorage.getItem('cide_active_entity');\n if (entityData) {\n const entity = JSON.parse(entityData) as CoreSystemEntity;\n this.activeEntitySignal.set(entity);\n }\n } catch (error) {\n console.error('Error loading from localStorage:', error);\n // Clear corrupted data\n if (this.isLocalStorageAvailable()) {\n localStorage.removeItem('cide_auth_user');\n localStorage.removeItem('cide_active_module');\n localStorage.removeItem('cide_active_entity');\n }\n }\n }\n\n /**\n * Setup storage event listener to handle external localStorage changes\n */\n private setupStorageListener(): void {\n if (!this.isLocalStorageAvailable()) {\n return;\n }\n\n // Listen for storage events (triggered when localStorage is modified from other tabs/windows)\n window.addEventListener('storage', (event) => {\n if (!event.key) return;\n\n try {\n // Handle user data changes\n if (event.key === 'cide_auth_user') {\n if (event.newValue) {\n const user = JSON.parse(event.newValue) as AuthUserMst;\n this.currentUserSignal.set(user);\n } else {\n this.currentUserSignal.set(null);\n }\n }\n\n // Handle active module changes\n if (event.key === 'cide_active_module') {\n if (event.newValue) {\n const module = JSON.parse(event.newValue) as menuResponseData;\n this.activeModuleSignal.set(module);\n } else {\n this.activeModuleSignal.set(null);\n }\n }\n\n // Handle active entity changes\n if (event.key === 'cide_active_entity') {\n if (event.newValue) {\n const entity = JSON.parse(event.newValue) as CoreSystemEntity;\n this.activeEntitySignal.set(entity);\n } else {\n this.activeEntitySignal.set(null);\n }\n }\n } catch (error) {\n console.error('Error parsing localStorage update:', error);\n }\n });\n }\n} ","import { Injectable, inject } from '@angular/core';\r\nimport { AppStateService } from './app-state.service';\r\nimport { AuthUserMst, CoreSystemEntity, menuResponseData } from 'cloud-ide-lms-model';\r\nimport { CideLytSidebarService } from '../../layout/sidebar/sidebar.service';\r\nimport { Observable } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AppStateHelperService {\r\n private appStateService = inject(AppStateService);\r\n private sidebarService = inject(CideLytSidebarService);\r\n\r\n // Computed signals for derived state\r\n public readonly currentUser = this.appStateService.currentUser;\r\n public readonly isAuthenticated = this.appStateService.isAuthenticated;\r\n public readonly userInfo = this.appStateService.userInfo;\r\n public readonly activeModule = this.appStateService.activeModule;\r\n public readonly activeModuleInfo = this.appStateService.activeModuleInfo;\r\n public readonly activeEntity = this.appStateService.activeEntity;\r\n\r\n /**\r\n * Get current user value (non-reactive)\r\n */\r\n getCurrentUser(): AuthUserMst | null {\r\n return this.appStateService.getUserValue();\r\n }\r\n\r\n /**\r\n * Set user data\r\n */\r\n setUser(user: AuthUserMst | null): void {\r\n this.appStateService.setUser(user);\r\n }\r\n\r\n /**\r\n * Update user data (partial update)\r\n */\r\n updateUser(updates: Partial<AuthUserMst>): void {\r\n this.appStateService.updateUser(updates);\r\n }\r\n\r\n /**\r\n * Clear user data\r\n */\r\n clearUser(): void {\r\n this.appStateService.clearUser();\r\n }\r\n\r\n /**\r\n * Check if user is authenticated\r\n */\r\n isUserAuthenticated(): boolean {\r\n return this.appStateService.isAuthenticated();\r\n }\r\n\r\n /**\r\n * Get user info object\r\n */\r\n getUserInfo() {\r\n return this.appStateService.userInfo();\r\n }\r\n\r\n /**\r\n * Get user ID\r\n */\r\n getUserId(): string | null {\r\n const user = this.getCurrentUser();\r\n return user?._id || null;\r\n }\r\n\r\n /**\r\n * Get user name\r\n */\r\n getUserName(): string | null {\r\n const userInfo = this.getUserInfo();\r\n return userInfo?.name || null;\r\n }\r\n\r\n /**\r\n * Get user email\r\n */\r\n getUserEmail(): string | null {\r\n const userInfo = this.getUserInfo();\r\n return userInfo?.email || null;\r\n }\r\n\r\n\r\n\r\n /**\r\n * Get user username\r\n */\r\n getUserUsername(): string | null {\r\n const user = this.getCurrentUser();\r\n return user?.user_username || null;\r\n }\r\n\r\n /**\r\n * Get user full name\r\n */\r\n getUserFullName(): string | null {\r\n const user = this.getCurrentUser();\r\n return user?.user_fullname || null;\r\n }\r\n\r\n /**\r\n * Get user first name\r\n */\r\n getUserFirstName(): string | null {\r\n const user = this.getCurrentUser();\r\n return user?.user_firstname || null;\r\n }\r\n\r\n /**\r\n * Get user last name\r\n */\r\n getUserLastName(): string | null {\r\n const user = this.getCurrentUser();\r\n return user?.user_lastname || null;\r\n }\r\n\r\n /**\r\n * Get user mobile number\r\n */\r\n getUserMobile(): number | null {\r\n const user = this.getCurrentUser();\r\n return user?.user_mobileno || null;\r\n }\r\n\r\n /**\r\n * Set the active module\r\n */\r\n setActiveModule(module: menuResponseData | null): void {\r\n this.appStateService.setActiveModule(module);\r\n }\r\n\r\n /**\r\n * Get active module value (non-reactive)\r\n */\r\n getActiveModule(): menuResponseData | null {\r\n return this.appStateService.getActiveModuleValue();\r\n }\r\n\r\n /**\r\n * Get active module info\r\n */\r\n getActiveModuleInfo() {\r\n return this.appStateService.activeModuleInfo();\r\n }\r\n\r\n /**\r\n * Get active module ID\r\n */\r\n getActiveModuleId(): string | null {\r\n const module = this.getActiveModule();\r\n return module?._id || null;\r\n }\r\n\r\n /**\r\n * Get active module title\r\n */\r\n getActiveModuleTitle(): string | null {\r\n const moduleInfo = this.getActiveModuleInfo();\r\n return moduleInfo?.title || null;\r\n }\r\n\r\n /**\r\n * Get active module icon\r\n */\r\n getActiveModuleIcon(): string | null {\r\n const moduleInfo = this.getActiveModuleInfo();\r\n return moduleInfo?.icon || null;\r\n }\r\n\r\n /**\r\n * Set a module as active by its ID\r\n * This replaces the previous isModuleActive method to use setActiveModule instead of getActiveModuleId\r\n */\r\n setActiveModuleById(moduleId: string): Observable<boolean> {\r\n return this.sidebarService.getSidebarMenues({ syme_type: \"module\", sort: 'asc', syme_title: \"\" }).pipe(\r\n map(response => {\r\n const modules = response?.data || [];\r\n const targetModule = modules.find(module => module._id === moduleId);\r\n \r\n if (targetModule) {\r\n this.setActiveModule(targetModule);\r\n return true;\r\n } else {\r\n console.warn(`Module with ID \"${moduleId}\" not found`);\r\n return false;\r\n }\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Check if a module is active (keeping the original functionality for backward compatibility)\r\n */\r\n isModuleActive(moduleId: string): boolean {\r\n const activeModuleId = this.getActiveModuleId();\r\n return activeModuleId === moduleId;\r\n }\r\n\r\n /**\r\n * Set the active entity\r\n */\r\n setActiveEntity(entity: CoreSystemEntity | null): void {\r\n this.appStateService.setActiveEntity(entity);\r\n }\r\n\r\n /**\r\n * Get active entity value (non-reactive)\r\n */\r\n getActiveEntity(): CoreSystemEntity | null {\r\n return this.appStateService.getActiveEntityValue();\r\n }\r\n\r\n /**\r\n * Get active entity ID\r\n */\r\n getActiveEntityId(): string {\r\n const entity = this.getActiveEntity();\r\n return entity?._id || '';\r\n }\r\n\r\n /**\r\n * Get active entity name\r\n */\r\n getActiveEntityName(): string | null {\r\n const entity = this.getActiveEntity();\r\n return entity?.syen_name || null;\r\n }\r\n\r\n /**\r\n * Get active entity code\r\n */\r\n getActiveEntityCode(): string | null {\r\n const entity = this.getActiveEntity();\r\n return entity?.syen_entity_code || null;\r\n }\r\n\r\n /**\r\n * Manually refresh state from localStorage\r\n */\r\n refreshFromLocalStorage(): void {\r\n this.appStateService.refreshFromLocalStorage();\r\n }\r\n} ","import { Injectable, inject, signal, computed } from '@angular/core';\nimport { cidePath, designConfigControllerResponse, designConfigRoutesUrl, hostManagerRoutesUrl, ISytmLayout, MDesignConfig } from 'cloud-ide-lms-model';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable, of, throwError, Subscription } from 'rxjs';\nimport { tap, catchError, shareReplay, filter, take, map } from 'rxjs/operators';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { Title } from '@angular/platform-browser';\nimport { CideElementsService } from 'cloud-ide-element';\nimport { CideLytSidebarService } from '../sidebar/sidebar.service';\nimport { CideLytSharedWrapperSetupParam } from './shared-wrapper/shared-wrapper.component';\nimport { CideLytHeaderService } from '../header/header.service';\nimport { CideLytFooterService } from '../footer/footer.service';\nimport { CideLytConsoleService } from '../console/console.service';\nimport { CideLytSidedrawerService } from '../sidedrawer/sidedrawer.service';\nimport { AppStateHelperService } from '../../services/app-state/app-state-helper.service';\n\n// Enhanced cache interface with TTL support\ninterface CachedPageData {\n request: Partial<CideLytSharedWrapperSetupParam>;\n response: designConfigControllerResponse;\n timestamp: number;\n ttl: number; // Time to live in milliseconds\n}\n\n// Loading state tracking\ntype LoadingState = { [key: string]: Observable<designConfigControllerResponse> };\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CideLytSharedService {\n // Enhanced reactive cache with signals\n private pageDataCacheSignal = signal<{ [key: string]: CachedPageData }>({});\n private loadingStateSignal = signal<{ [key: string]: boolean }>({});\n \n // Public readonly access to cache\n public readonly pageDataCache = this.pageDataCacheSignal.asReadonly();\n public readonly loadingStates = this.loadingStateSignal.asReadonly();\n \n // Computed signal for cache status\n public readonly cacheInfo = computed(() => {\n const cache = this.pageDataCacheSignal();\n return {\n totalCached: Object.keys(cache).length,\n validCached: Object.values(cache).filter(item => this.isCacheValid(item)).length,\n expiredCached: Object.values(cache).filter(item => !this.isCacheValid(item)).length\n };\n });\n \n // In-flight requests to prevent duplicate API calls\n private inflightRequests: LoadingState = {};\n \n // Default cache TTL (5 minutes)\n private readonly DEFAULT_CACHE_TTL = 5 * 60 * 1000;\n \n // Modern Angular v20 dependency injection pattern\n private elementService = inject(CideElementsService);\n private http = inject(HttpClient);\n public titleService = inject(Title);\n private sidebarService = inject(CideLytSidebarService);\n private headerService = inject(CideLytHeaderService);\n private footerService = inject(CideLytFooterService);\n private consoleService = inject(CideLytConsoleService);\n private sidedrawerService = inject(CideLytSidedrawerService);\n private router = inject(Router);\n \n // Import AppStateHelperService for sidebar sync\n private appState = inject(AppStateHelperService);\n \n // Route change subscription for cleanup\n private routeSubscription?: Subscription;\n private pageDataSubscription?: Subscription;\n \n // Tab management callback - to avoid circular dependency\n private tabManagementCallback?: (\n currentRoutePath: string,\n queryParams: Record<string, unknown>,\n layout: ISytmLayout,\n pageData: designConfigControllerResponse,\n pageCode: string\n ) => void;\n \n // Request visibility callback\n private requestVisibilityCallback?: (show: boolean) => void;\n\n constructor() {\n // Clean up expired cache entries every minute\n // setInterval(() => this.cleanExpiredCache(), 60000);\n \n // Listen to route changes - moved from request service\n this.routeSubscription = this.router.events.pipe(\n filter(event => event instanceof NavigationEnd)\n ).subscribe(() => {\n // Cancel any ongoing page data fetching\n this.pageDataSubscription?.unsubscribe();\n this.handleRouteChange();\n });\n }\n\n /**\n * Register tab management callback from request service\n * This allows shared service to call request service without circular dependency\n */\n registerTabManagement(callback: (\n currentRoutePath: string,\n queryParams: Record<string, unknown>,\n layout: ISytmLayout,\n pageData: designConfigControllerResponse,\n pageCode: string\n ) => void) {\n this.tabManagementCallback = callback;\n console.log('✅ Tab management callback registered');\n }\n\n /**\n * Fetch breadcrumb navigation items for a page code from backend\n * Expected response shape: data.path: Array<{ id|_id|code, title|name|sypg_title, icon?, url|path|sypg_path }>\n */\n getBreadcrumbNavigation(pageCode: string): Observable<Array<{ id: string; label: string; icon?: string; path?: string }>> {\n return this.http.post<any>(\n cidePath.join([hostManagerRoutesUrl.cideSuiteHost, designConfigRoutesUrl?.module, 'getBreadcrumbNavigation']),\n { sypg_page_code: pageCode }\n ).pipe(\n map(res => (res?.data?.path || []).map((p: any) => ({\n id: p._id || p.id || p.code,\n label: p.sypg_title || p.title || p.name,\n icon: p.icon || undefined,\n path: p.sypg_path || p.url || undefined\n })))\n );\n }\n\n /**\n * Register request visibility callback from request service\n * This allows shared service to control request wrapper visibility\n */\n registerRequestVisibility(callback: (show: boolean) => void) {\n this.requestVisibilityCallback = callback;\n console.log('✅ Request visibility callback registered');\n }\n\n /**\n * Enhanced loadPageData with caching and deduplication\n * @param body - Request payload\n * @param forceRefresh - Force API call even if cached data exists\n * @param customTTL - Custom cache TTL in milliseconds\n */\n loadPageData(\n body: MDesignConfig, \n forceRefresh: boolean = false, \n customTTL: number = this.DEFAULT_CACHE_TTL\n ): Observable<designConfigControllerResponse> {\n const pageCode = body.sypg_page_code?.toString() || '';\n const sytm_entity_id_syen = body.sytm_entity_id_syen?.toString() || this.appState.getActiveEntityId();\n console.log(sytm_entity_id_syen, \"sytm_entity_id_syen\");\n if(!body.sytm_entity_id_syen){\n body.sytm_entity_id_syen = sytm_entity_id_syen;\n }\n \n if (!pageCode) {\n return throwError(() => new Error('Page code is required'));\n }\n\n // Check if we have valid cached data and not forcing refresh\n if (!forceRefresh && this.hasValidCache(pageCode)) {\n console.log(`🔄 CACHE HIT: Using cached data for page code: ${pageCode}`);\n const cachedData = this.pageDataCacheSignal()[pageCode];\n return of(cachedData.response);\n }\n\n // Check if there's already an in-flight request for this page code\n if (this.inflightRequests[pageCode]) {\n console.log(`🔄 INFLIGHT REQUEST: Returning existing request for page code: ${pageCode}`);\n return this.inflightRequests[pageCode];\n }\n\n // Set loading state\n this.setLoadingState(pageCode, true);\n\n console.log(`🌐 API CALL: Loading fresh data for page code: ${pageCode}`);\n \n // Create new API request\n const request$ = this.http.post(\n cidePath.join([hostManagerRoutesUrl.cideSuiteHost, designConfigRoutesUrl?.module, designConfigRoutesUrl?.getPageData]), \n body\n ) as Observable<designConfigControllerResponse>;\n\n // Cache the observable to prevent duplicate requests\n this.inflightRequests[pageCode] = request$.pipe(\n tap(response => {\n console.log(`✅ API SUCCESS: Caching data for page code: ${pageCode}`);\n this.cachePageData(pageCode, body, response, customTTL);\n this.setLoadingState(pageCode, false);\n }),\n catchError(error => {\n console.error(`❌ API ERROR: Failed to load data for page code: ${pageCode}`, error);\n this.setLoadingState(pageCode, false);\n return throwError(() => error);\n }),\n shareReplay(1) // Share the result with multiple subscribers\n );\n\n // Clean up inflight request after completion\n this.inflightRequests[pageCode].subscribe({\n complete: () => {\n delete this.inflightRequests[pageCode];\n },\n error: () => {\n delete this.inflightRequests[pageCode];\n }\n });\n\n return this.inflightRequests[pageCode];\n }\n\n /**\n * Consolidated method to load and process page data\n * This replaces the separate calls in request service and shared wrapper\n */\n loadAndProcessPageData(\n body: MDesignConfig, \n options: {\n forceRefresh?: boolean;\n customTTL?: number;\n setTitle?: boolean;\n setSidebarContext?: boolean;\n updateLayout?: boolean;\n } = {}\n ): Observable<designConfigControllerResponse> {\n const {\n forceRefresh = false,\n customTTL = this.DEFAULT_CACHE_TTL,\n setTitle = true,\n setSidebarContext = true,\n updateLayout = true\n } = options;\n\n return this.loadPageData(body, forceRefresh, customTTL).pipe(\n tap(response => {\n if (response) {\n console.log('🔍 SHARED SERVICE: loadAndProcessPageData', response);\n // Process the response\n if (updateLayout) {\n this.setPageData(response, body);\n }\n \n // Set page title\n if (setTitle && response.data?.page?.sypg_title) {\n this.titleService.setTitle(response.data.page.sypg_title);\n }\n \n // Set sidebar context\n if (setSidebarContext) {\n // This will be handled by the component that needs the context\n // as it's specific to the sidedrawer service\n }\n }\n })\n );\n }\n\n /**\n * Get cached page data without making API call\n */\n getCachedPageData(pageCode: string): designConfigControllerResponse | null {\n const cached = this.pageDataCacheSignal()[pageCode];\n return this.isCacheValid(cached) ? cached.response : null;\n }\n\n /**\n * Get page rights only (without loading full page config)\n * This is a lightweight endpoint that only fetches rights\n * @param pageCode - Page code to get rights for\n * @returns Observable with rights data\n */\n getPageRights(pageCode: string): Observable<{\n success: boolean;\n code: number;\n data?: {\n rights: { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } };\n pageCode: string;\n };\n message: string;\n }> {\n const url = cidePath.join([\n hostManagerRoutesUrl.cideSuiteHost,\n designConfigRoutesUrl?.module,\n (designConfigRoutesUrl as any)?.getPageRights || 'page-rights',\n pageCode\n ]);\n \n return this.http.get(url) as Observable<{\n success: boolean;\n code: number;\n data?: {\n rights: { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } };\n pageCode: string;\n };\n message: string;\n }>;\n }\n\n /**\n * Check if loading for a specific page code\n */\n isLoading(pageCode: string): boolean {\n return this.loadingStates()[pageCode] || false;\n }\n\n /**\n * Invalidate cache for specific page code\n */\n invalidateCache(pageCode: string): void {\n const cache = { ...this.pageDataCacheSignal() };\n delete cache[pageCode];\n this.pageDataCacheSignal.set(cache);\n console.log(`🗑️ CACHE INVALIDATED: Removed cache for page code: ${pageCode}`);\n }\n\n /**\n * Clear all cached data\n */\n clearAllCache(): void {\n this.pageDataCacheSignal.set({});\n this.loadingStateSignal.set({});\n console.log('🗑️ CACHE CLEARED: All cached data removed');\n }\n\n /**\n * Preload page data for better performance\n */\n preloadPageData(pageCodes: string[]): void {\n pageCodes.forEach(pageCode => {\n if (!this.hasValidCache(pageCode) && !this.isLoading(pageCode)) {\n this.loadPageData({ sypg_page_code: pageCode }).subscribe({\n next: () => console.log(`🚀 PRELOADED: Page data for ${pageCode}`),\n error: (err) => console.warn(`⚠️ PRELOAD FAILED: Could not preload ${pageCode}`, err)\n });\n }\n });\n }\n\n // Private helper methods\n private hasValidCache(pageCode: string): boolean {\n const cached = this.pageDataCacheSignal()[pageCode];\n return cached && this.isCacheValid(cached);\n }\n\n private isCacheValid(cached: CachedPageData | undefined): boolean {\n if (!cached) return false;\n return Date.now() - cached.timestamp < cached.ttl;\n }\n\n private cachePageData(\n pageCode: string, \n request: MDesignConfig, \n response: designConfigControllerResponse, \n ttl: number\n ): void {\n const cache = { ...this.pageDataCacheSignal() };\n cache[pageCode] = {\n request,\n response,\n timestamp: Date.now(),\n ttl\n };\n this.pageDataCacheSignal.set(cache);\n }\n\n private setLoadingState(pageCode: string, loading: boolean): void {\n const loadingStates = { ...this.loadingStateSignal() };\n if (loading) {\n loadingStates[pageCode] = true;\n } else {\n delete loadingStates[pageCode];\n }\n this.loadingStateSignal.set(loadingStates);\n }\n\n private cleanExpiredCache(): void {\n const cache = { ...this.pageDataCacheSignal() };\n let cleaned = false;\n \n Object.keys(cache).forEach(pageCode => {\n if (!this.isCacheValid(cache[pageCode])) {\n delete cache[pageCode];\n cleaned = true;\n }\n });\n \n if (cleaned) {\n this.pageDataCacheSignal.set(cache);\n console.log('🧹 CACHE CLEANUP: Removed expired cache entries');\n }\n }\n\n setPageData(page_data_response: designConfigControllerResponse, page_data_payload: Partial<CideLytSharedWrapperSetupParam>): void {\n // to set the controls data to the element service\n console.log('🔍 SHARED SERVICE: setPageData', page_data_response, page_data_payload);\n if (page_data_response?.data?.controls) {\n // Set controls here\n this.elementService.cide_element_data = { ...this.elementService.cide_element_data, ...page_data_response?.data?.controls };\n this.elementService.is_cide_element_data_updated?.next(true);\n }\n\n // while doing this we need to think about not to touch if this page is not pening in the popup or drower insted of main window\n // Set the layout data\n console.log('🔍 Layout data:', page_data_response);\n if (page_data_response?.data?.theme?.sytm_layout) {\n console.log('🔍 SIDEBAR DEBUG - Layout data:', page_data_response?.data?.theme?.sytm_layout, page_data_payload);\n // check is sidebar is hiden or not (default is visible)\n if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_sidebar) {\n const sidebarStatus = page_data_response?.data?.theme?.sytm_layout?.sytm_layout_sidebar?.status;\n console.log('🔍 SIDEBAR DEBUG - Sidebar status found:', sidebarStatus);\n if (!sidebarStatus) {\n console.log('🚫 SIDEBAR DEBUG - Hiding sidebar because status is false');\n this.sidebarService.hideSidebar();\n } else {\n console.log('✅ SIDEBAR DEBUG - Showing sidebar because status is true');\n this.sidebarService.showSidebar();\n }\n } else {\n console.log('⚠️ SIDEBAR DEBUG - No sidebar config found, hiding sidebar');\n this.sidebarService.hideSidebar();\n }\n\n // check header visible or not\n console.log('🔍 HEADER DEBUG - Header config found:', page_data_response?.data?.theme?.sytm_layout?.sytm_layout_header);\n if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_header) {\n if (!page_data_response?.data?.theme?.sytm_layout?.sytm_layout_header?.status) {\n this.headerService.hideHeader();\n } else {\n this.headerService.showHeader();\n }\n } else {\n this.headerService.hideHeader();\n }\n\n // check footer visible or not \n if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_footer) {\n if (!page_data_response?.data?.theme?.sytm_layout?.sytm_layout_footer?.status) {\n this.footerService.hideFooter();\n } else {\n this.footerService.showFooter();\n }\n } else {\n this.footerService.hideFooter();\n }\n\n // check console visible or not\n if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_console) {\n if (!page_data_response?.data?.theme?.sytm_layout?.sytm_layout_console?.status) {\n this.consoleService.hideConsole();\n } else {\n this.consoleService.showConsole();\n }\n } else {\n this.consoleService.hideConsole();\n }\n\n // check for the request status and log it for debugging\n console.log('🔍 REQUEST DEBUG - Request config found:', page_data_response?.data?.theme?.sytm_layout?.sytm_layout_request);\n if (page_data_response?.data?.theme?.sytm_layout?.sytm_layout_request) {\n const requestStatus = page_data_response?.data?.theme?.sytm_layout?.sytm_layout_request?.status;\n console.log('🔍 REQUEST DEBUG - Request status:', requestStatus, 'Type:', typeof requestStatus);\n \n // The request status controls whether this page should support tabs\n // This is used by the request service to determine if tabs should be created\n if (requestStatus === true) {\n console.log('✅ REQUEST DEBUG - Request is enabled for tabbing');\n // Show request wrapper when request is enabled\n if (this.requestVisibilityCallback) {\n this.requestVisibilityCallback(true);\n console.log('📋 REQUEST VISIBILITY - Showing request wrapper');\n }\n } else if (requestStatus === false) {\n console.log('🚫 REQUEST DEBUG - Request is disabled for tabbing');\n // Hide request wrapper when request is disabled\n if (this.requestVisibilityCallback) {\n this.requestVisibilityCallback(false);\n console.log('📋 REQUEST VISIBILITY - Hiding request wrapper');\n }\n } else {\n console.log('⚠️ REQUEST DEBUG - Unexpected request status value:', requestStatus);\n // Default to hiding request wrapper for unexpected values\n if (this.requestVisibilityCallback) {\n this.requestVisibilityCallback(false);\n console.log('📋 REQUEST VISIBILITY - Hiding request wrapper (unexpected value)');\n }\n }\n } else {\n console.log('⚠️ REQUEST DEBUG - No request config found, tabs will not be created');\n // Hide request wrapper when no request config found\n if (this.requestVisibilityCallback) {\n this.requestVisibilityCallback(false);\n console.log('📋 REQUEST VISIBILITY - Hiding request wrapper (no config)');\n }\n }\n }\n\n }\n\n /**\n * Handle route changes - moved from request service for better architecture\n * This method loads page data and calls request service to manage tabs\n */\n private handleRouteChange() {\n const parsedUrl = this.router.parseUrl(this.router.url);\n const currentRoutePath = '/' + (parsedUrl.root.children['primary']?.segments.map(s => s.path).join('/') || '');\n const queryParams = parsedUrl.queryParams;\n\n console.log('🔍 Route change:', {\n currentRoutePath,\n queryParams\n });\n\n // Get page code from route data\n let route = this.router.routerState.snapshot.root;\n while (route.firstChild) {\n route = route.firstChild;\n }\n\n const pageCode = route.data && route.data['sypg_page_code'];\n console.log('📄 Processing route with page code:', pageCode);\n\n if (pageCode) {\n const entityId = this.appState.getActiveEntityId();\n console.log(`📡 Loading and processing page data for pageCode: ${pageCode}`);\n this.pageDataSubscription = this.loadAndProcessPageData(\n { sypg_page_code: pageCode, sytm_entity_id_syen: entityId || undefined },\n {\n forceRefresh: false,\n setTitle: true,\n setSidebarContext: true,\n updateLayout: true\n }\n ).pipe(take(1))\n .subscribe({\n next: (page_data_response) => {\n const layout = page_data_response?.data?.theme?.sytm_layout;\n \n // Update sidedrawer with processed layout\n this.sidedrawerService.updateDrawerItems(layout);\n \n // Sync sidebar active menu with loaded page\n this.syncSidebarActiveMenu(page_data_response, pageCode);\n \n if (layout?.sytm_layout_request?.status === true) {\n console.log('✅ Layout processed - calling request service to manage tabs');\n // Call request service to handle tab creation\n this.handleTabRequest(currentRoutePath, queryParams, layout, page_data_response, pageCode);\n } else {\n console.log('❌ Layout request disabled - tab not created');\n }\n },\n error: (err) => {\n console.error(`❌ Error loading page data for sypg_page_code '${pageCode}':`, err);\n this.sidedrawerService.updateDrawerItems(undefined);\n }\n });\n } else {\n console.log('⚠️ No page code found in route data - clearing drawer');\n this.sidedrawerService.updateDrawerItems(undefined);\n }\n }\n\n /**\n * Handle tab request by calling request service\n */\n private handleTabRequest(\n currentRoutePath: string, \n queryParams: Record<string, unknown>, \n layout: ISytmLayout, \n pageData: designConfigControllerResponse, \n pageCode: string\n ) {\n if (this.tabManagementCallback) {\n console.log('🔄 Calling registered tab management callback');\n this.tabManagementCallback(currentRoutePath, queryParams, layout, pageData, pageCode);\n } else {\n console.log('⚠️ No tab management callback registered');\n }\n }\n\n /**\n * Sync the active menu in the sidebar based on the loaded page data.\n * This ensures the correct module is highlighted in the sidebar.\n */\n private syncSidebarActiveMenu(page_data_response: designConfigControllerResponse, pageCode: string): void {\n console.log('🔍 SIDEBAR SYNC: Starting sidebar active menu sync for:', pageCode);\n \n // Try to extract module information from route\n const currentRoute = this.router.url;\n const routeParts = currentRoute.split('/').filter(part => part);\n let routeModuleName = '';\n \n // Look for control-panel or module identifier in route\n if (routeParts.includes('control-panel') && routeParts.length > 1) {\n const moduleIndex = routeParts.indexOf('control-panel') + 1;\n routeModuleName = routeParts[moduleIndex] || '';\n } else if (routeParts.length > 0) {\n routeModuleName = routeParts[0];\n }\n \n console.log('🔍 SIDEBAR SYNC: Route module name:', routeModuleName);\n console.log('🔍 SIDEBAR SYNC: Current route:', currentRoute);\n console.log('🔍 SIDEBAR SYNC: Page code:', pageCode);\n \n // Load sidebar modules and find the matching one\n this.sidebarService.getSidebarMenues({ syme_type: \"module\", sort: 'asc', syme_title: \"\" })\n .subscribe({\n next: (modulesResponse) => {\n const modules = modulesResponse?.data || [];\n console.log('🔍 SIDEBAR SYNC: Available modules:', modules.map(m => ({ id: m._id, title: m.syme_title, path: m.syme_path })));\n \n let matchedModule = null;\n \n // Try to match by route path\n if (routeModuleName) {\n matchedModule = modules.find(m => \n m.syme_path?.includes(routeModuleName) || \n m.syme_title?.toLowerCase().includes(routeModuleName.toLowerCase()) ||\n routeModuleName.includes(m.syme_path || '') ||\n m.syme_path === routeModuleName\n );\n if (matchedModule) {\n console.log('✅ SIDEBAR SYNC: Matched module by route:', matchedModule.syme_title);\n }\n }\n \n // If not found, try to match by page code pattern\n if (!matchedModule && pageCode) {\n matchedModule = modules.find(m => \n pageCode.includes(m.syme_path || '') ||\n (m.syme_path && pageCode.toLowerCase().includes(m.syme_path.toLowerCase())) ||\n m.syme_path === pageCode\n );\n if (matchedModule) {\n console.log('✅ SIDEBAR SYNC: Matched module by page code:', matchedModule.syme_title);\n }\n }\n \n // If still not found, try partial matching for common patterns\n if (!matchedModule) {\n // Try to match common patterns like 'admin', 'dashboard', etc.\n const searchTerms = [routeModuleName, pageCode].filter(Boolean);\n for (const term of searchTerms) {\n matchedModule = modules.find(m => \n m.syme_title?.toLowerCase().includes(term.toLowerCase()) ||\n term.toLowerCase().includes(m.syme_title?.toLowerCase() || '') ||\n m.syme_path?.toLowerCase().includes(term.toLowerCase()) ||\n term.toLowerCase().includes(m.syme_path?.toLowerCase() || '')\n );\n if (matchedModule) {\n console.log('✅ SIDEBAR SYNC: Matched module by pattern:', matchedModule.syme_title, 'for term:', term);\n break;\n }\n }\n }\n \n // Check if we should set the matched module as active\n if (matchedModule) {\n const currentActiveModule = this.appState.getActiveModule();\n \n // Always update the active module if the route suggests a different module\n // The route is the source of truth when navigating\n const isDifferentModule = !currentActiveModule || \n currentActiveModule._id !== matchedModule._id ||\n currentActiveModule.syme_path !== matchedModule.syme_path;\n \n if (isDifferentModule) {\n console.log('🎯 SIDEBAR SYNC: Updating active module to match route:', matchedModule.syme_title, matchedModule._id);\n console.log('🔍 SIDEBAR SYNC: Previous active module:', currentActiveModule?.syme_title || 'none');\n this.appState.setActiveModule(matchedModule);\n } else {\n console.log('✅ SIDEBAR SYNC: Active module already matches route:', currentActiveModule?.syme_title);\n }\n } else {\n console.log('⚠️ SIDEBAR SYNC: No matching module found for page:', pageCode);\n console.log('🔍 SIDEBAR SYNC: Available modules:', modules.map(m => m.syme_title).join(', '));\n console.log('🔍 SIDEBAR SYNC: Searched for route:', routeModuleName, 'and page code:', pageCode);\n }\n },\n error: (err) => {\n console.error('❌ SIDEBAR SYNC: Error loading modules for sync:', err);\n }\n });\n }\n\n}\n","import { Injectable, inject } from '@angular/core';\r\nimport { CideEleFloatingContainerService, FloatingContainerConfig } from 'cloud-ide-element';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytFloatingEntitySelectionService {\r\n private containerService = inject(CideEleFloatingContainerService)\r\n\r\n constructor() {\r\n console.log('CideLytFloatingEntitySelectionService initialized');\r\n // Auto-register entity selection component on service initialization\r\n this.initializeEntitySelection();\r\n }\r\n\r\n private async initializeEntitySelection(): Promise<void> {\r\n // Check if already registered to avoid duplicate registration\r\n if (this.containerService.isComponentRegistered('entity-selection-header')) {\r\n console.log('✅ Entity selection component already registered');\r\n return;\r\n }\r\n\r\n try {\r\n // Use relative import to avoid circular dependency\r\n const module = await import('./floating-entity-selection.component');\r\n if (module.CideLytFloatingEntitySelectionComponent) {\r\n this.containerService.registerComponent('entity-selection-header', module.CideLytFloatingEntitySelectionComponent);\r\n console.log('✅ Entity selection component registered successfully');\r\n }\r\n } catch (error) {\r\n console.error('❌ Failed to register entity selection component:', error);\r\n }\r\n }\r\n\r\n /**\r\n * Show entity selection in floating container\r\n */\r\n async show(): Promise<string> {\r\n console.log('🏢 Showing entity selection...');\r\n console.log('📋 Current registered components:', this.containerService.getRegisteredComponentIds());\r\n\r\n // Ensure component is registered before showing\r\n if (!this.containerService.isComponentRegistered('entity-selection-header')) {\r\n console.log('📝 Entity selection component not registered, registering now...');\r\n await this.initializeEntitySelection();\r\n console.log('📋 Components after registration:', this.containerService.getRegisteredComponentIds());\r\n } else {\r\n console.log('✅ Entity selection component already registered');\r\n }\r\n \r\n try {\r\n const config: FloatingContainerConfig = {\r\n id: 'entity-selection-header',\r\n title: 'Switch Entity',\r\n icon: 'business',\r\n width: '800px',\r\n height: '600px',\r\n minWidth: '600px',\r\n minHeight: '500px',\r\n resizable: true,\r\n draggable: true,\r\n closable: true,\r\n minimizable: true,\r\n maximizable: true,\r\n componentId: 'entity-selection-header'\r\n };\r\n\r\n const containerId = this.containerService.show(config);\r\n\r\n console.log('✅ Entity selection container opened with ID:', containerId);\r\n return containerId;\r\n } catch (error) {\r\n console.error('❌ Error opening entity selection container:', error);\r\n throw error;\r\n }\r\n }\r\n\r\n /**\r\n * Hide entity selection container\r\n */\r\n hide(containerId?: string): void {\r\n if (containerId) {\r\n this.containerService.hide(containerId);\r\n } else {\r\n // Hide the main entity selection container\r\n this.containerService.hide('entity-selection-header');\r\n }\r\n }\r\n\r\n /**\r\n * Check if entity selection is currently visible\r\n */\r\n isVisible(): boolean {\r\n const visibleContainers = this.containerService.visibleContainers();\r\n return visibleContainers.some(container => container.id === 'entity-selection-header');\r\n }\r\n}\r\n","import { Injectable, signal, computed, effect } from '@angular/core';\n\n/**\n * Notification Settings Interface\n */\nexport interface NotificationSettings {\n // Sound settings\n soundEnabled: boolean;\n soundVolume: number; // 0-100\n soundType: 'default' | 'gentle' | 'alert' | 'chime' | 'none';\n \n // Snooze settings\n snoozeEnabled: boolean;\n snoozeDuration: number; // minutes\n \n // Notification hours (quiet hours)\n quietHoursEnabled: boolean;\n quietHoursStart: string; // HH:mm format (e.g., \"22:00\")\n quietHoursEnd: string; // HH:mm format (e.g., \"08:00\")\n \n // Other settings\n desktopNotifications: boolean;\n showPreview: boolean;\n groupNotifications: boolean;\n}\n\n/**\n * Default Notification Settings\n */\nconst DEFAULT_SETTINGS: NotificationSettings = {\n soundEnabled: true,\n soundVolume: 70,\n soundType: 'default',\n snoozeEnabled: false,\n snoozeDuration: 30,\n quietHoursEnabled: false,\n quietHoursStart: '22:00',\n quietHoursEnd: '08:00',\n desktopNotifications: true,\n showPreview: true,\n groupNotifications: true\n};\n\n/**\n * Notification Settings Service\n * Manages user notification preferences with localStorage persistence\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class NotificationSettingsService {\n private readonly settingsSignal = signal<NotificationSettings>({ ...DEFAULT_SETTINGS });\n \n // Public computed signal\n readonly settings = computed(() => this.settingsSignal());\n \n // Individual computed signals for convenience\n readonly soundEnabled = computed(() => this.settings().soundEnabled);\n readonly soundVolume = computed(() => this.settings().soundVolume);\n readonly soundType = computed(() => this.settings().soundType);\n readonly quietHoursEnabled = computed(() => this.settings().quietHoursEnabled);\n readonly isQuietHours = computed(() => this.isCurrentlyQuietHours());\n\n constructor() {\n // Load from localStorage on initialization\n this.loadFromLocalStorage();\n \n // Save to localStorage whenever settings change\n effect(() => {\n const settings = this.settingsSignal();\n this.saveToLocalStorage(settings);\n });\n }\n\n /**\n * Update notification settings\n */\n updateSettings(updates: Partial<NotificationSettings>): void {\n this.settingsSignal.update(current => ({ ...current, ...updates }));\n }\n\n /**\n * Reset to default settings\n */\n reset(): void {\n this.settingsSignal.set({ ...DEFAULT_SETTINGS });\n }\n\n /**\n * Check if currently in quiet hours\n */\n isCurrentlyQuietHours(): boolean {\n const settings = this.settings();\n if (!settings.quietHoursEnabled) {\n return false;\n }\n\n const now = new Date();\n const currentTime = now.getHours() * 60 + now.getMinutes(); // minutes since midnight\n \n const startTime = this.timeToMinutes(settings.quietHoursStart);\n const endTime = this.timeToMinutes(settings.quietHoursEnd);\n \n // Handle quiet hours that span midnight\n if (startTime > endTime) {\n // Quiet hours span midnight (e.g., 22:00 to 08:00)\n return currentTime >= startTime || currentTime < endTime;\n } else {\n // Quiet hours within same day\n return currentTime >= startTime && currentTime < endTime;\n }\n }\n\n /**\n * Convert time string (HH:mm) to minutes since midnight\n */\n private timeToMinutes(time: string): number {\n const [hours, minutes] = time.split(':').map(Number);\n return hours * 60 + minutes;\n }\n\n /**\n * Play notification sound based on settings\n */\n playNotificationSound(): void {\n const settings = this.settings();\n \n if (!settings.soundEnabled || settings.soundType === 'none') {\n return;\n }\n\n if (this.isCurrentlyQuietHours()) {\n return; // Don't play sound during quiet hours\n }\n\n try {\n // Create audio context for sound generation\n // Handle browser autoplay policy - resume if suspended\n const AudioContextClass = window.AudioContext || (window as any).webkitAudioContext;\n let audioContext: AudioContext;\n \n // Try to get existing audio context or create new one\n if (!(this as any)._audioContext) {\n audioContext = new AudioContextClass();\n (this as any)._audioContext = audioContext;\n } else {\n audioContext = (this as any)._audioContext;\n }\n \n // Resume audio context if suspended (required for browser autoplay policy)\n if (audioContext.state === 'suspended') {\n audioContext.resume().then(() => {\n this.playSoundWithContext(audioContext, settings);\n }).catch((error) => {\n console.warn('Failed to resume audio context:', error);\n // Try creating a new context as fallback\n try {\n const newContext = new AudioContextClass();\n this.playSoundWithContext(newContext, settings);\n } catch (fallbackError) {\n console.warn('Failed to create fallback audio context:', fallbackError);\n }\n });\n } else {\n // Context is already running, play sound immediately\n this.playSoundWithContext(audioContext, settings);\n }\n } catch (error) {\n console.warn('Failed to play notification sound:', error);\n }\n }\n\n /**\n * Play sound with the given audio context\n */\n private playSoundWithContext(audioContext: AudioContext, settings: NotificationSettings): void {\n const volume = settings.soundVolume / 100;\n \n // Configure based on sound type\n switch (settings.soundType) {\n case 'gentle':\n this.playTone(audioContext, 800, 600, 0.15, volume, 'sine');\n break;\n case 'alert':\n this.playTone(audioContext, 1000, 800, 0.2, volume, 'square');\n break;\n case 'chime':\n // Play a chord (C-E-G)\n this.playTone(audioContext, 523.25, 523.25, 0.3, volume * 0.7, 'sine', 0); // C5\n this.playTone(audioContext, 659.25, 659.25, 0.3, volume * 0.7, 'sine', 0.05); // E5\n this.playTone(audioContext, 783.99, 783.99, 0.3, volume * 0.7, 'sine', 0.1); // G5\n break;\n case 'default':\n default:\n this.playTone(audioContext, 800, 600, 0.15, volume, 'sine');\n break;\n }\n }\n\n /**\n * Play a single tone\n */\n private playTone(\n audioContext: AudioContext,\n startFreq: number,\n endFreq: number,\n duration: number,\n volume: number,\n type: OscillatorType = 'sine',\n delay: number = 0\n ): void {\n const oscillator = audioContext.createOscillator();\n const gainNode = audioContext.createGain();\n \n oscillator.type = type;\n oscillator.connect(gainNode);\n gainNode.connect(audioContext.destination);\n \n const startTime = audioContext.currentTime + delay;\n \n // Set frequency\n if (startFreq === endFreq) {\n oscillator.frequency.setValueAtTime(startFreq, startTime);\n } else {\n oscillator.frequency.setValueAtTime(startFreq, startTime);\n oscillator.frequency.exponentialRampToValueAtTime(endFreq, startTime + duration);\n }\n \n // Set volume envelope (fade in/out)\n gainNode.gain.setValueAtTime(0, startTime);\n gainNode.gain.linearRampToValueAtTime(volume, startTime + 0.01);\n gainNode.gain.linearRampToValueAtTime(volume, startTime + duration - 0.05);\n gainNode.gain.linearRampToValueAtTime(0, startTime + duration);\n \n // Play sound\n oscillator.start(startTime);\n oscillator.stop(startTime + duration);\n }\n\n /**\n * Load settings from localStorage\n */\n private loadFromLocalStorage(): void {\n try {\n const stored = localStorage.getItem('cide_notification_settings');\n if (stored) {\n const settings = JSON.parse(stored) as NotificationSettings;\n this.settingsSignal.set({ ...DEFAULT_SETTINGS, ...settings });\n }\n } catch (error) {\n console.warn('Failed to load notification settings from localStorage:', error);\n }\n }\n\n /**\n * Save settings to localStorage\n */\n private saveToLocalStorage(settings: NotificationSettings): void {\n try {\n localStorage.setItem('cide_notification_settings', JSON.stringify(settings));\n } catch (error) {\n console.warn('Failed to save notification settings to localStorage:', error);\n }\n }\n}\n\n","import { Component, OnInit, inject, signal, computed } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { \n CideIconComponent, \n CideEleButtonComponent, \n CideInputComponent, \n CideSelectComponent,\n NotificationService\n} from 'cloud-ide-element';\nimport { NotificationSettingsService, type NotificationSettings } from '../../services/notification-settings/notification-settings.service';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DestroyRef } from '@angular/core';\n\n/**\n * Notification Settings Component\n * Allows users to configure notification preferences\n */\n@Component({\n selector: 'cide-lyt-notification-settings',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n CideIconComponent,\n CideEleButtonComponent,\n CideInputComponent,\n CideSelectComponent\n ],\n template: `\n <div class=\"notification-settings-container tw-p-6 tw-space-y-6 tw-bg-white dark:tw-bg-gray-900 tw-text-gray-900 dark:tw-text-gray-100\">\n <!-- Header -->\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-pb-3 tw-border-b tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-w-8 tw-h-8 tw-bg-blue-500 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-text-white\">settings</cide-ele-icon>\n </div>\n <div>\n <h3 class=\"tw-m-0 tw-text-sm tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100\">Notification Settings</h3>\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-600 dark:tw-text-gray-400\">Customize your notification preferences</p>\n </div>\n </div>\n\n <form [formGroup]=\"settingsForm\" class=\"tw-space-y-6\">\n <!-- Sound Settings -->\n <div class=\"tw-space-y-3\">\n <h4 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-uppercase tw-tracking-wide\">Sound Settings</h4>\n \n <!-- Enable Sound -->\n <div class=\"tw-flex tw-items-center tw-justify-between tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon class=\"tw-text-gray-600 dark:tw-text-gray-400\">volume_up</cide-ele-icon>\n <div>\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">Enable Sound</label>\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400\">Play sound when receiving notifications</p>\n </div>\n </div>\n <label class=\"tw-relative tw-inline-flex tw-items-center tw-cursor-pointer\">\n <input \n type=\"checkbox\" \n [checked]=\"settingsForm.get('soundEnabled')?.value\"\n (change)=\"settingsForm.get('soundEnabled')?.setValue($any($event.target).checked)\"\n class=\"tw-sr-only tw-peer\">\n <div class=\"tw-w-11 tw-h-6 tw-bg-gray-200 peer-focus:tw-outline-none peer-focus:tw-ring-4 peer-focus:tw-ring-blue-300 dark:peer-focus:tw-ring-blue-800 dark:peer-focus:tw-ring-offset-gray-800 tw-rounded-full peer dark:tw-bg-gray-700 peer-checked:after:tw-translate-x-full peer-checked:after:tw-border-white after:tw-content-[''] after:tw-absolute after:tw-top-[2px] after:tw-left-[2px] after:tw-bg-white after:tw-border-gray-300 after:tw-border after:tw-rounded-full after:tw-h-5 after:tw-w-5 after:tw-transition-all dark:tw-border-gray-600 peer-checked:tw-bg-blue-600\"></div>\n </label>\n </div>\n\n @if (settingsForm.get('soundEnabled')?.value) {\n <!-- Sound Type -->\n <div class=\"tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <label class=\"tw-block tw-text-xs tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2\">Sound Type</label>\n <cide-ele-select\n formControlName=\"soundType\"\n [options]=\"soundTypeOptions\"\n placeholder=\"Select sound type\">\n </cide-ele-select>\n </div>\n\n <!-- Sound Volume -->\n <div class=\"tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-2\">\n <label class=\"tw-text-xs tw-font-medium tw-text-gray-700 dark:tw-text-gray-300\">Volume</label>\n <span class=\"tw-text-xs tw-text-gray-600 dark:tw-text-gray-400\">{{ settingsForm.get('soundVolume')?.value }}%</span>\n </div>\n <div class=\"volume-slider-container\">\n <input \n type=\"range\" \n formControlName=\"soundVolume\"\n min=\"0\" \n max=\"100\" \n step=\"1\"\n (input)=\"onVolumeChange($event)\"\n class=\"volume-slider tw-w-full\">\n </div>\n <div class=\"tw-flex tw-justify-between tw-text-[10px] tw-text-gray-500 dark:tw-text-gray-400 tw-mt-1\">\n <span>0%</span>\n <span>100%</span>\n </div>\n </div>\n\n <!-- Test Sound Button -->\n <button\n type=\"button\"\n cideEleButton\n variant=\"outline\"\n size=\"sm\"\n (click)=\"testSound()\"\n class=\"tw-w-full\">\n <cide-ele-icon>play_arrow</cide-ele-icon>\n Test Sound\n </button>\n }\n </div>\n\n <!-- Quiet Hours -->\n <div class=\"tw-space-y-3\">\n <h4 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-uppercase tw-tracking-wide\">Quiet Hours</h4>\n \n <!-- Enable Quiet Hours -->\n <div class=\"tw-flex tw-items-center tw-justify-between tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon class=\"tw-text-gray-600 dark:tw-text-gray-400\">schedule</cide-ele-icon>\n <div>\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">Enable Quiet Hours</label>\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400\">Mute notifications during specified hours</p>\n </div>\n </div>\n <label class=\"tw-relative tw-inline-flex tw-items-center tw-cursor-pointer\">\n <input \n type=\"checkbox\" \n [checked]=\"settingsForm.get('quietHoursEnabled')?.value\"\n (change)=\"settingsForm.get('quietHoursEnabled')?.setValue($any($event.target).checked)\"\n class=\"tw-sr-only tw-peer\">\n <div class=\"tw-w-11 tw-h-6 tw-bg-gray-200 peer-focus:tw-outline-none peer-focus:tw-ring-4 peer-focus:tw-ring-blue-300 dark:peer-focus:tw-ring-blue-800 dark:peer-focus:tw-ring-offset-gray-800 tw-rounded-full peer dark:tw-bg-gray-700 peer-checked:after:tw-translate-x-full peer-checked:after:tw-border-white after:tw-content-[''] after:tw-absolute after:tw-top-[2px] after:tw-left-[2px] after:tw-bg-white after:tw-border-gray-300 after:tw-border after:tw-rounded-full after:tw-h-5 after:tw-w-5 after:tw-transition-all dark:tw-border-gray-600 peer-checked:tw-bg-blue-600\"></div>\n </label>\n </div>\n\n @if (settingsForm.get('quietHoursEnabled')?.value) {\n <div class=\"tw-grid tw-grid-cols-2 tw-gap-3 tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div>\n <label class=\"tw-block tw-text-xs tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2\">Start Time</label>\n <cide-ele-input\n type=\"time\"\n formControlName=\"quietHoursStart\"\n placeholder=\"22:00\">\n </cide-ele-input>\n </div>\n <div>\n <label class=\"tw-block tw-text-xs tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2\">End Time</label>\n <cide-ele-input\n type=\"time\"\n formControlName=\"quietHoursEnd\"\n placeholder=\"08:00\">\n </cide-ele-input>\n </div>\n </div>\n }\n </div>\n\n <!-- Snooze Settings -->\n <div class=\"tw-space-y-3\">\n <h4 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-uppercase tw-tracking-wide\">Snooze</h4>\n \n <!-- Enable Snooze -->\n <div class=\"tw-flex tw-items-center tw-justify-between tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon class=\"tw-text-gray-600 dark:tw-text-gray-400\">snooze</cide-ele-icon>\n <div>\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">Enable Snooze</label>\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400\">Temporarily pause notifications</p>\n </div>\n </div>\n <label class=\"tw-relative tw-inline-flex tw-items-center tw-cursor-pointer\">\n <input \n type=\"checkbox\" \n [checked]=\"settingsForm.get('snoozeEnabled')?.value\"\n (change)=\"settingsForm.get('snoozeEnabled')?.setValue($any($event.target).checked)\"\n class=\"tw-sr-only tw-peer\">\n <div class=\"tw-w-11 tw-h-6 tw-bg-gray-200 peer-focus:tw-outline-none peer-focus:tw-ring-4 peer-focus:tw-ring-blue-300 dark:peer-focus:tw-ring-blue-800 dark:peer-focus:tw-ring-offset-gray-800 tw-rounded-full peer dark:tw-bg-gray-700 peer-checked:after:tw-translate-x-full peer-checked:after:tw-border-white after:tw-content-[''] after:tw-absolute after:tw-top-[2px] after:tw-left-[2px] after:tw-bg-white after:tw-border-gray-300 after:tw-border after:tw-rounded-full after:tw-h-5 after:tw-w-5 after:tw-transition-all dark:tw-border-gray-600 peer-checked:tw-bg-blue-600\"></div>\n </label>\n </div>\n\n @if (settingsForm.get('snoozeEnabled')?.value) {\n <div class=\"tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <label class=\"tw-block tw-text-xs tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2\">Snooze Duration (minutes)</label>\n <cide-ele-input\n type=\"number\"\n formControlName=\"snoozeDuration\"\n min=\"5\"\n max=\"1440\"\n placeholder=\"30\">\n </cide-ele-input>\n </div>\n }\n </div>\n\n <!-- Other Settings -->\n <div class=\"tw-space-y-3\">\n <h4 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-uppercase tw-tracking-wide\">Other Settings</h4>\n \n <!-- Desktop Notifications -->\n <div class=\"tw-flex tw-items-center tw-justify-between tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon class=\"tw-text-gray-600 dark:tw-text-gray-400\">desktop_windows</cide-ele-icon>\n <div>\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">Desktop Notifications</label>\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400\">Show browser notifications</p>\n </div>\n </div>\n <label class=\"tw-relative tw-inline-flex tw-items-center tw-cursor-pointer\">\n <input \n type=\"checkbox\" \n [checked]=\"settingsForm.get('desktopNotifications')?.value\"\n (change)=\"settingsForm.get('desktopNotifications')?.setValue($any($event.target).checked)\"\n class=\"tw-sr-only tw-peer\">\n <div class=\"tw-w-11 tw-h-6 tw-bg-gray-200 peer-focus:tw-outline-none peer-focus:tw-ring-4 peer-focus:tw-ring-blue-300 dark:peer-focus:tw-ring-blue-800 dark:peer-focus:tw-ring-offset-gray-800 tw-rounded-full peer dark:tw-bg-gray-700 peer-checked:after:tw-translate-x-full peer-checked:after:tw-border-white after:tw-content-[''] after:tw-absolute after:tw-top-[2px] after:tw-left-[2px] after:tw-bg-white after:tw-border-gray-300 after:tw-border after:tw-rounded-full after:tw-h-5 after:tw-w-5 after:tw-transition-all dark:tw-border-gray-600 peer-checked:tw-bg-blue-600\"></div>\n </label>\n </div>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-gap-2 tw-pt-4 tw-border-t tw-border-gray-200 dark:tw-border-gray-700\">\n <button\n type=\"button\"\n cideEleButton\n variant=\"outline\"\n size=\"sm\"\n (click)=\"reset()\"\n class=\"tw-flex-1\">\n Reset\n </button>\n <button\n type=\"button\"\n cideEleButton\n variant=\"primary\"\n size=\"sm\"\n (click)=\"save()\"\n class=\"tw-flex-1\">\n Save Settings\n </button>\n </div>\n </form>\n </div>\n `,\n styles: [`\n :host {\n display: block;\n }\n\n .notification-settings-container {\n color: #111827;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container {\n background-color: #ffffff !important;\n color: #111827 !important;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container * {\n color: inherit;\n }\n\n /* Volume Slider Styling */\n .volume-slider-container {\n position: relative;\n width: 100%;\n }\n\n .volume-slider {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 6px;\n border-radius: 3px;\n background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 100%);\n outline: none;\n cursor: pointer;\n transition: background 0.3s ease;\n }\n\n /* Light mode slider track */\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .volume-slider {\n background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 100%);\n }\n\n /* Dark mode slider track */\n :root[data-theme=\"dark\"] .volume-slider,\n :root.dark-mode .volume-slider {\n background: linear-gradient(to right, #374151 0%, #374151 100%);\n }\n\n /* Webkit slider thumb */\n .volume-slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: #2563eb;\n cursor: pointer;\n border: 2px solid #ffffff;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n transition: all 0.2s ease;\n }\n\n .volume-slider::-webkit-slider-thumb:hover {\n background: #1d4ed8;\n transform: scale(1.1);\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);\n }\n\n .volume-slider::-webkit-slider-thumb:active {\n transform: scale(1.2);\n }\n\n /* Dark mode thumb */\n :root[data-theme=\"dark\"] .volume-slider::-webkit-slider-thumb,\n :root.dark-mode .volume-slider::-webkit-slider-thumb {\n background: #3b82f6;\n border-color: #1e293b;\n }\n\n /* Firefox slider thumb */\n .volume-slider::-moz-range-thumb {\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: #2563eb;\n cursor: pointer;\n border: 2px solid #ffffff;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n transition: all 0.2s ease;\n }\n\n .volume-slider::-moz-range-thumb:hover {\n background: #1d4ed8;\n transform: scale(1.1);\n box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);\n }\n\n .volume-slider::-moz-range-thumb:active {\n transform: scale(1.2);\n }\n\n /* Dark mode Firefox thumb */\n :root[data-theme=\"dark\"] .volume-slider::-moz-range-thumb,\n :root.dark-mode .volume-slider::-moz-range-thumb {\n background: #3b82f6;\n border-color: #1e293b;\n }\n\n /* Update slider track fill based on value */\n .volume-slider {\n background-size: var(--slider-value, 0%) 100%;\n background-repeat: no-repeat;\n }\n\n /* Light mode text colors */\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container .tw-text-gray-700 {\n color: #374151 !important;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container .tw-text-gray-600 {\n color: #4b5563 !important;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container .tw-text-gray-500 {\n color: #6b7280 !important;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container .tw-text-gray-900 {\n color: #111827 !important;\n }\n\n :root:not([data-theme=\"dark\"]):not(.dark-mode) .notification-settings-container .tw-bg-gray-50 {\n background-color: #f9fafb !important;\n }\n `]\n})\nexport class NotificationSettingsComponent implements OnInit {\n private fb = inject(FormBuilder);\n private settingsService = inject(NotificationSettingsService);\n private notificationService = inject(NotificationService);\n private destroyRef = inject(DestroyRef);\n\n settingsForm!: FormGroup;\n\n soundTypeOptions = [\n { value: 'default', label: 'Default' },\n { value: 'gentle', label: 'Gentle' },\n { value: 'alert', label: 'Alert' },\n { value: 'chime', label: 'Chime' },\n { value: 'none', label: 'None' }\n ];\n\n ngOnInit(): void {\n const settings = this.settingsService.settings();\n \n this.settingsForm = this.fb.group({\n soundEnabled: [settings.soundEnabled],\n soundVolume: [settings.soundVolume, [Validators.min(0), Validators.max(100)]],\n soundType: [settings.soundType],\n snoozeEnabled: [settings.snoozeEnabled],\n snoozeDuration: [settings.snoozeDuration, [Validators.min(5), Validators.max(1440)]],\n quietHoursEnabled: [settings.quietHoursEnabled],\n quietHoursStart: [settings.quietHoursStart],\n quietHoursEnd: [settings.quietHoursEnd],\n desktopNotifications: [settings.desktopNotifications],\n showPreview: [settings.showPreview],\n groupNotifications: [settings.groupNotifications]\n });\n\n // Update slider background on volume change\n this.settingsForm.get('soundVolume')?.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((value: number) => {\n this.updateSliderBackground(value);\n });\n\n // Initialize slider background\n setTimeout(() => {\n const initialValue = this.settingsForm.get('soundVolume')?.value || 70;\n this.updateSliderBackground(initialValue);\n }, 0);\n\n // Auto-save on form changes\n this.settingsForm.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.save();\n });\n }\n\n private updateSliderBackground(value: number): void {\n setTimeout(() => {\n const slider = document.querySelector('.volume-slider') as HTMLInputElement;\n if (slider) {\n const percentage = value;\n const isDark = document.documentElement.classList.contains('dark-mode') || \n document.documentElement.getAttribute('data-theme') === 'dark';\n \n if (isDark) {\n slider.style.background = `linear-gradient(to right, #3b82f6 0%, #3b82f6 ${percentage}%, #374151 ${percentage}%, #374151 100%)`;\n } else {\n slider.style.background = `linear-gradient(to right, #2563eb 0%, #2563eb ${percentage}%, #e5e7eb ${percentage}%, #e5e7eb 100%)`;\n }\n }\n }, 0);\n }\n\n onVolumeChange(event: Event): void {\n const value = parseInt((event.target as HTMLInputElement).value, 10);\n this.updateSliderBackground(value);\n }\n\n testSound(): void {\n this.settingsService.playNotificationSound();\n }\n\n save(): void {\n if (this.settingsForm.valid) {\n this.settingsService.updateSettings(this.settingsForm.value);\n this.notificationService.success('Notification settings saved');\n }\n }\n\n reset(): void {\n this.settingsService.reset();\n const settings = this.settingsService.settings();\n this.settingsForm.patchValue(settings, { emitEvent: false });\n this.notificationService.info('Settings reset to defaults');\n }\n}\n\n","import { AfterViewInit, Component, inject, signal, computed, OnInit, OnDestroy, ViewChild, TemplateRef } from '@angular/core';\nimport { CideLytHeaderService } from '../header.service';\nimport { CideLytFileManagerService } from '../../../services/file-manager/file-manager.service';\nimport { CideLytSharedService } from '../../shared/shared.service';\nimport { CommonModule } from '@angular/common';\nimport {\n CideIconComponent, CideInputComponent, CideEleDropdownComponent,\n DropdownItem, DropdownConfig, CideEleFileImageDirective,\n CideThemeService,\n CideEleFloatingContainerService,\n ConfirmationService\n} from 'cloud-ide-element';\nimport { \n WebSocketNotificationService, \n NotificationApiService\n} from 'cloud-ide-element';\nimport type { NotificationPayload } from 'cloud-ide-element';\nimport { Router } from '@angular/router';\nimport {\n IAuthService,\n AUTH_SERVICE_TOKEN,\n FINANCIAL_YEAR_SERVICE_TOKEN,\n ACADEMIC_YEAR_SERVICE_TOKEN,\n IFinancialYearService,\n IAcademicYearService\n} from 'cloud-ide-shared';\nimport { AppStateService } from '../../../services/app-state/app-state.service';\nimport { CideLytFloatingEntitySelectionService } from '../../../components/floating-entity-selection/floating-entity-selection.service';\nimport { NotificationSettingsService } from '../../../services/notification-settings/notification-settings.service';\nimport { NotificationSettingsComponent } from '../../../components/notification-settings/notification-settings.component';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DestroyRef } from '@angular/core';\n\n@Component({\n selector: 'cide-lyt-header-wrapper',\n templateUrl: './header-wrapper.component.html',\n styleUrl: './header-wrapper.component.css',\n imports: [CideInputComponent, CommonModule, CideIconComponent,\n CideEleDropdownComponent, CideEleFileImageDirective]\n})\nexport class CideLytHeaderWrapperComponent implements AfterViewInit, OnInit, OnDestroy {\n @ViewChild('triggerTemplate') triggerTemplate!: TemplateRef<any>;\n @ViewChild('financialYearTriggerTemplate') financialYearTriggerTemplate!: TemplateRef<any>;\n @ViewChild('academicYearTriggerTemplate') academicYearTriggerTemplate!: TemplateRef<any>;\n @ViewChild('notificationTriggerTemplate') notificationTriggerTemplate!: TemplateRef<any>;\n @ViewChild('notificationDropdown') notificationDropdown!: any; // Dropdown component reference\n\n // Inject app state service to get active entity\n public appStateService = inject(AppStateService);\n\n // Inject floating entity selection service\n private floatingEntitySelectionService = inject(CideLytFloatingEntitySelectionService);\n\n // Inject year services using injection tokens\n private financialYearService = inject(FINANCIAL_YEAR_SERVICE_TOKEN) as IFinancialYearService;\n private academicYearService = inject(ACADEMIC_YEAR_SERVICE_TOKEN) as IAcademicYearService;\n private destroyRef = inject(DestroyRef);\n \n // Inject theme service for independent theme management\n private themeService = inject(CideThemeService);\n\n // Signals for year data\n financialYears = signal<any[]>([]);\n academicYears = signal<any[]>([]);\n currentFinancialYear = signal<any>(null);\n currentAcademicYear = signal<any>(null);\n currentFinancialYearName = signal<string>('FY');\n currentAcademicYearName = signal<string>('AY');\n\n // Signals for notifications\n notifications = signal<NotificationPayload[]>([]);\n unreadCount = computed(() => this.wsNotificationService?.unreadNotificationsCount() || 0);\n isNotificationDropdownOpen = signal<boolean>(false);\n notificationItems = signal<DropdownItem[]>([]);\n \n // Track previously seen notification IDs to detect new ones\n private previousNotificationIds = new Set<string>();\n private isInitialLoad = true; // Track if this is the first load\n \n // Animation and undo state\n animatingNotifications = signal<Set<string>>(new Set());\n recentlyRemovedNotifications = signal<Map<string, { notification: NotificationPayload; timeoutId: any }>>(new Map());\n\n // Dark mode signal\n darkMode = signal<boolean>(false);\n\n // Financial Year Dropdown Configuration\n financialYearItems = signal<DropdownItem[]>([]);\n financialYearConfig: DropdownConfig = {\n triggerIcon: '',\n triggerSize: 'sm',\n menuPosition: 'auto',\n menuWidth: 'tw-w-72',\n usePortal: true\n };\n\n // Academic Year Dropdown Configuration\n academicYearItems = signal<DropdownItem[]>([]);\n academicYearConfig: DropdownConfig = {\n triggerIcon: '',\n triggerSize: 'sm',\n menuPosition: 'auto',\n menuWidth: 'tw-w-72',\n usePortal: true\n };\n\n // Notification Dropdown Configuration\n notificationConfig: DropdownConfig = {\n triggerIcon: '',\n triggerSize: 'md',\n menuPosition: 'right',\n menuWidth: 'tw-w-96',\n usePortal: true\n };\n\n // Profile Dropdown Configuration (moved from more options)\n profileItems: DropdownItem[] = [\n {\n id: 'profile',\n label: 'My Profile',\n icon: 'person',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'settings',\n label: 'Settings',\n icon: 'settings',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'theme',\n label: 'Dark Mode',\n icon: 'dark_mode',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'help',\n label: 'Help & Support',\n icon: 'help',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'divider',\n label: '',\n divider: true\n },\n {\n id: 'logout',\n label: 'Logout',\n icon: 'logout',\n iconColor: 'tw-text-red-500',\n textColor: 'tw-text-red-600',\n hoverBgColor: 'hover:tw-bg-red-50'\n }\n ];\n\n profileConfig: DropdownConfig = {\n triggerIcon: '',\n triggerSize: 'sm',\n menuPosition: 'auto',\n menuWidth: 'tw-w-48',\n usePortal: true\n };\n\n // More Options Dropdown Configuration (DEPRECATED - keeping for reference)\n moreOptionsItems: DropdownItem[] = [\n {\n id: 'settings',\n label: 'Settings',\n icon: 'settings',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'help',\n label: 'Help & Support',\n icon: 'help',\n iconColor: 'tw-text-gray-500'\n },\n {\n id: 'divider',\n label: '',\n divider: true\n },\n {\n id: 'logout',\n label: 'Logout',\n icon: 'logout',\n iconColor: 'tw-text-red-500',\n textColor: 'tw-text-red-600',\n hoverBgColor: 'hover:tw-bg-red-50'\n }\n ];\n\n moreOptionsConfig: DropdownConfig = {\n triggerIcon: 'more_vert',\n triggerSize: 'sm',\n menuPosition: 'auto',\n menuWidth: 'tw-w-48',\n usePortal: true\n };\n\n private headerService = inject(CideLytHeaderService);\n private sharedService = inject(CideLytSharedService);\n private fileManagerService = inject(CideLytFileManagerService);\n private router = inject(Router);\n private confirmationService = inject(ConfirmationService);\n private authService = inject(AUTH_SERVICE_TOKEN) as IAuthService;\n private wsNotificationService = inject(WebSocketNotificationService);\n private notificationApiService = inject(NotificationApiService);\n private floatingContainerService = inject(CideEleFloatingContainerService);\n private notificationSettingsService = inject(NotificationSettingsService);\n\n constructor() {\n // Trigger page-data workflow for header (without rendering breadcrumb)\n const entityId = this.appStateService.activeEntity()?._id || undefined;\n this.sharedService.loadAndProcessPageData({ sypg_page_code: 'cide_lyt_header', sytm_entity_id_syen: entityId }, {\n setTitle: false,\n setSidebarContext: false,\n updateLayout: false\n }).subscribe({\n next: () => { },\n error: () => { }\n });\n }\n\n ngOnInit() {\n // Initialize audio context early to avoid browser autoplay restrictions\n // This must be done on user interaction, so we'll do it on first user click\n this.initializeAudioContext();\n // Subscribe to theme service for reactive theme updates\n this.themeService.getEffectiveTheme$()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(theme => {\n this.darkMode.set(theme === 'dark');\n // Update theme menu item based on current state\n this.updateThemeMenuItem();\n });\n \n // Set initial darkMode state from theme service\n this.darkMode.set(this.themeService.isDarkMode());\n\n this.loadFinancialYears();\n this.loadAcademicYears();\n // Initialize notification dropdown with empty state\n this.updateNotificationDropdown();\n // Then try to load notifications\n this.initializeNotifications();\n }\n\n /**\n * Initialize notification system\n */\n private initializeNotifications(): void {\n try {\n const user = this.appStateService.currentUser();\n if (!user || !user._id) {\n console.warn('[Notifications] User not available, skipping initialization');\n return;\n }\n\n // Get token from localStorage (using auth service storage key)\n const token = localStorage.getItem('cide_auth_token') || localStorage.getItem('auth_token') || localStorage.getItem('token') || '';\n \n if (!token) {\n console.warn('[Notifications] No token found, skipping WebSocket connection');\n // Still try to load notifications from API (might work if GET is public)\n this.loadNotifications();\n return;\n }\n\n if (!this.wsNotificationService) {\n console.error('[Notifications] WebSocket service not available');\n return;\n }\n\n console.log('[Notifications] Initializing with user:', user._id);\n \n // Connect WebSocket\n this.wsNotificationService.connect(token, String(user._id));\n \n // Subscribe to real-time notifications\n this.wsNotificationService.notification$.pipe(\n takeUntilDestroyed(this.destroyRef)\n ).subscribe({\n next: (notification: NotificationPayload) => {\n console.log('[Notifications] New notification received:', notification);\n this.loadNotifications();\n // Play notification sound based on user settings\n this.playNotificationSound();\n },\n error: (error) => {\n console.error('[Notifications] Error in notification stream:', error);\n }\n });\n\n // Subscribe to connection status\n this.wsNotificationService.connectionStatus$.pipe(\n takeUntilDestroyed(this.destroyRef)\n ).subscribe({\n next: (status) => {\n console.log('[Notifications] Connection status:', status);\n },\n error: (error) => {\n console.error('[Notifications] Error in connection status:', error);\n }\n });\n\n // Load initial notifications from API\n this.loadNotifications();\n } catch (error) {\n console.error('[Notifications] Error initializing notifications:', error);\n }\n }\n\n /**\n * Load notifications from API\n * @param showAll - If true, show all notifications (read + unread). If false, show only unread.\n */\n private loadNotifications(showAll: boolean = false): void {\n try {\n // Get notifications from WebSocket service (real-time)\n const wsNotifications = this.wsNotificationService?.allNotifications() || [];\n console.log('[Notifications] WebSocket notifications:', wsNotifications.length);\n \n // Load from API to get all notifications (including read status)\n const params: any = {\n pageSize: showAll ? 100 : 20\n };\n \n // If not showing all, filter to exclude read notifications\n if (!showAll) {\n // We'll filter client-side after loading to ensure we get accurate read status\n }\n \n this.notificationApiService.getNotifications(params).subscribe({\n next: (response: any) => {\n console.log('[Notifications] API response:', response);\n if (response && response.success && response.data) {\n // Convert server notifications to notification payloads\n const apiPayloads: NotificationPayload[] = response.data.map((notif: any) => ({\n id: String(notif._id),\n type: notif.not_type || 'info',\n category: notif.not_category,\n title: notif.not_title,\n message: notif.not_message,\n data: notif.not_data,\n action_url: notif.not_action_url,\n action_label: notif.not_action_label,\n priority: notif.not_priority || 'normal',\n created_at: new Date(notif.not_created_at),\n timestamp: new Date(notif.not_created_at),\n // Store read status for filtering\n isRead: notif.not_status === 'read' || notif.not_read_at !== undefined\n } as NotificationPayload & { isRead?: boolean }));\n \n console.log('[Notifications] Converted API payloads:', apiPayloads.length);\n console.log('[Notifications] Read status breakdown:', {\n total: apiPayloads.length,\n read: apiPayloads.filter(n => (n as any).isRead).length,\n unread: apiPayloads.filter(n => !(n as any).isRead).length\n });\n \n // Merge WebSocket and API notifications (API takes priority for read status)\n const mergedNotifications: (NotificationPayload & { isRead?: boolean })[] = [];\n \n // Add API notifications first (they have read status)\n apiPayloads.forEach(apiNotif => {\n mergedNotifications.push(apiNotif);\n });\n \n // Add WebSocket notifications that aren't in API (new real-time notifications)\n wsNotifications.forEach(wsNotif => {\n if (!mergedNotifications.find(n => n.id === wsNotif.id)) {\n mergedNotifications.push({ ...wsNotif, isRead: false });\n }\n });\n \n // Filter out read notifications if not showing all\n let filteredNotifications = mergedNotifications;\n if (!showAll) {\n filteredNotifications = mergedNotifications.filter(n => !(n as any).isRead);\n console.log('[Notifications] Filtered to unread only:', filteredNotifications.length);\n }\n \n // Sort by timestamp (newest first)\n filteredNotifications.sort((a, b) => \n new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()\n );\n \n // Detect new notifications and play sound\n if (!this.isInitialLoad) {\n const currentNotificationIds = new Set(filteredNotifications.map(n => n.id));\n const newNotifications = filteredNotifications.filter(n => !this.previousNotificationIds.has(n.id));\n \n if (newNotifications.length > 0) {\n console.log(`[Notifications] ${newNotifications.length} new notification(s) detected, playing sound...`);\n // Play sound for new notifications\n this.playNotificationSound();\n }\n \n // Update previous notification IDs\n this.previousNotificationIds = currentNotificationIds;\n } else {\n // First load - just track IDs, don't play sound\n this.previousNotificationIds = new Set(filteredNotifications.map(n => n.id));\n this.isInitialLoad = false;\n }\n \n console.log('[Notifications] Total notifications to display:', filteredNotifications.length);\n this.notifications.set(filteredNotifications as NotificationPayload[]);\n this.updateNotificationDropdown();\n } else {\n console.warn('[Notifications] API response invalid, using WebSocket notifications only');\n // Fallback to WebSocket notifications only (filter to unread if needed)\n const filtered = showAll ? wsNotifications : wsNotifications.filter(n => !(n as any).isRead);\n this.notifications.set(filtered);\n this.updateNotificationDropdown();\n }\n },\n error: (error: any) => {\n console.error('[Notifications] Error loading from API:', error);\n // Fallback to WebSocket notifications only (filter to unread if needed)\n const filtered = showAll ? wsNotifications : wsNotifications.filter(n => !(n as any).isRead);\n this.notifications.set(filtered);\n this.updateNotificationDropdown();\n }\n });\n } catch (error) {\n console.error('[Notifications] Error in loadNotifications:', error);\n }\n }\n\n /**\n * Update notification dropdown items\n */\n private updateNotificationDropdown(): void {\n const notifs = this.notifications();\n const unreadCount = this.unreadCount();\n \n // Filter to show only unread notifications in the dropdown (or all if \"View All\" was clicked)\n // For now, show first 20 notifications (increased from 10 for better UX)\n const notificationsToShow = notifs.slice(0, 20);\n \n // Map notifications to dropdown items\n const items: DropdownItem[] = notificationsToShow.map(notif => ({\n id: notif.id,\n label: notif.title,\n icon: this.getNotificationIcon(notif.type),\n iconColor: this.getNotificationIconColor(notif.type),\n // Note: description is not supported by DropdownItem interface, but keeping for future use\n // description: notif.message,\n } as DropdownItem));\n\n // Add action buttons if there are notifications\n if (notifs.length > 0) {\n // Add divider before actions\n items.push({\n id: 'divider-1',\n label: '',\n divider: true\n } as DropdownItem);\n \n // Add \"Mark All as Read\" if there are unread notifications\n if (unreadCount > 0) {\n items.push({\n id: 'mark-all-read',\n label: 'Mark All as Read',\n icon: 'done_all',\n iconColor: 'tw-text-blue-500'\n } as DropdownItem);\n }\n \n // Add \"Clear All\" option (only if there are notifications)\n items.push({\n id: 'clear-all',\n label: 'Clear All',\n icon: 'clear_all',\n iconColor: 'tw-text-red-500',\n textColor: 'tw-text-red-600',\n hoverBgColor: 'hover:tw-bg-red-50'\n } as DropdownItem);\n \n // Add divider before \"View All\"\n items.push({\n id: 'divider-2',\n label: '',\n divider: true\n } as DropdownItem);\n \n // Add \"View All\" option (show count if more than displayed)\n const viewAllLabel = notifs.length > 20 \n ? `View All Notifications (${notifs.length})` \n : 'View All Notifications';\n items.push({\n id: 'view-all',\n label: viewAllLabel,\n icon: 'list',\n iconColor: 'tw-text-blue-500'\n } as DropdownItem);\n } else {\n items.push({\n id: 'no-notifications',\n label: 'No notifications',\n icon: 'notifications_off',\n iconColor: 'tw-text-gray-400',\n disabled: true\n } as DropdownItem);\n }\n \n // Set the signal with the complete array\n this.notificationItems.set(items);\n }\n\n /**\n * Get icon for notification type\n */\n getNotificationIcon(type: string): string {\n const iconMap: { [key: string]: string } = {\n 'info': 'info',\n 'success': 'check_circle',\n 'warning': 'warning',\n 'error': 'error',\n 'system': 'settings'\n };\n return iconMap[type] || 'notifications';\n }\n\n /**\n * Get icon color for notification type\n */\n private getNotificationIconColor(type: string): string {\n const colorMap: { [key: string]: string } = {\n 'info': 'tw-text-blue-500',\n 'success': 'tw-text-green-500',\n 'warning': 'tw-text-yellow-500',\n 'error': 'tw-text-red-500',\n 'system': 'tw-text-gray-500'\n };\n return colorMap[type] || 'tw-text-gray-500';\n }\n\n /**\n * Check if notification is undoable based on type\n */\n isNotificationUndoable(notification: NotificationPayload): boolean {\n // System notifications are not undoable\n if (notification.type === 'system') {\n return false;\n }\n // Error notifications are not undoable\n if (notification.type === 'error') {\n return false;\n }\n // Success notifications might be undoable (e.g., \"Marked as read\" can be undone)\n if (notification.type === 'success') {\n return true;\n }\n // Info and warning notifications are undoable\n return notification.type === 'info' || notification.type === 'warning';\n }\n\n /**\n * Handle notification item click (from custom template)\n */\n onNotificationItemClick(notification: NotificationPayload): void {\n const notificationId = String(notification.id);\n \n // Check if undoable\n const isUndoable = this.isNotificationUndoable(notification);\n \n if (isUndoable) {\n // Add animation class (start slide-out animation)\n this.animatingNotifications.update(animating => {\n const newSet = new Set(animating);\n newSet.add(notificationId);\n return newSet;\n });\n \n // Store notification for undo with timeout\n const timeoutId = setTimeout(() => {\n // After 5 seconds, actually mark as read and remove\n this.markNotificationAsRead(notificationId, true); // skipAnimation = true\n this.animatingNotifications.update(animating => {\n const newSet = new Set(animating);\n newSet.delete(notificationId);\n return newSet;\n });\n this.recentlyRemovedNotifications.update(removed => {\n const newMap = new Map(removed);\n newMap.delete(notificationId);\n return newMap;\n });\n // Remove from list after timeout\n this.notifications.update(notifs => \n notifs.filter(n => String(n.id) !== notificationId)\n );\n this.updateNotificationDropdown();\n }, 5000); // 5 seconds to undo\n \n this.recentlyRemovedNotifications.update(removed => {\n const newMap = new Map(removed);\n newMap.set(notificationId, { notification, timeoutId });\n return newMap;\n });\n \n // Don't remove from list immediately - keep it visible with animation and undo button\n // It will be removed after 5 seconds if not undone\n } else {\n // Not undoable - mark as read immediately with animation\n this.animatingNotifications.update(animating => {\n const newSet = new Set(animating);\n newSet.add(notificationId);\n return newSet;\n });\n \n // Remove from view after animation\n setTimeout(() => {\n this.markNotificationAsRead(notificationId, true);\n this.notifications.update(notifs => \n notifs.filter(n => String(n.id) !== notificationId)\n );\n this.updateNotificationDropdown();\n this.animatingNotifications.update(animating => {\n const newSet = new Set(animating);\n newSet.delete(notificationId);\n return newSet;\n });\n }, 300); // Wait for animation to complete\n }\n\n // Navigate to action URL if available\n if (notification?.action_url) {\n this.router.navigate([notification.action_url]);\n }\n }\n\n /**\n * Undo notification removal\n */\n undoNotificationRemoval(notificationId: string): void {\n const removed = this.recentlyRemovedNotifications().get(notificationId);\n if (!removed) return;\n \n // Clear timeout\n clearTimeout(removed.timeoutId);\n \n // Remove from animating set (restore animation state)\n this.animatingNotifications.update(animating => {\n const newSet = new Set(animating);\n newSet.delete(notificationId);\n return newSet;\n });\n \n // Notification should still be in the list, just restore its state\n // The notification is already in the list, we just need to remove the animation classes\n \n // Remove from recently removed\n this.recentlyRemovedNotifications.update(removed => {\n const newMap = new Map(removed);\n newMap.delete(notificationId);\n return newMap;\n });\n \n this.updateNotificationDropdown();\n }\n\n /**\n * Check if notification is animating (being removed)\n */\n isNotificationAnimating(notification: NotificationPayload): boolean {\n const notificationId = String(notification.id);\n return this.animatingNotifications().has(notificationId);\n }\n\n /**\n * Check if notification can be undone (is currently animating/removed)\n */\n canUndoNotification(notification: NotificationPayload): boolean {\n const notificationId = String(notification.id);\n return this.animatingNotifications().has(notificationId) || this.recentlyRemovedNotifications().has(notificationId);\n }\n\n /**\n * Get notification ID as string (helper for template)\n */\n getNotificationId(notification: NotificationPayload): string {\n return String(notification.id);\n }\n\n /**\n * Check if notification is read\n */\n isNotificationRead(notification: NotificationPayload): boolean {\n return (notification as any).isRead === true;\n }\n\n /**\n * Get time ago string\n */\n getTimeAgo(timestamp: Date): string {\n const now = new Date();\n const diff = now.getTime() - new Date(timestamp).getTime();\n const seconds = Math.floor(diff / 1000);\n const minutes = Math.floor(seconds / 60);\n const hours = Math.floor(minutes / 60);\n const days = Math.floor(hours / 24);\n\n if (days > 0) return `${days} ${days === 1 ? 'day' : 'days'} ago`;\n if (hours > 0) return `${hours} ${hours === 1 ? 'hour' : 'hours'} ago`;\n if (minutes > 0) return `${minutes} ${minutes === 1 ? 'minute' : 'minutes'} ago`;\n return 'Just now';\n }\n\n /**\n * Get full time string (e.g., \"Friday 3:12 PM\")\n */\n getFullTime(timestamp: Date): string {\n const date = new Date(timestamp);\n const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n const dayName = days[date.getDay()];\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const ampm = hours >= 12 ? 'PM' : 'AM';\n const displayHours = hours % 12 || 12;\n const displayMinutes = minutes.toString().padStart(2, '0');\n return `${dayName} ${displayHours}:${displayMinutes} ${ampm}`;\n }\n\n /**\n * Get notification name (from data or title)\n */\n getNotificationName(notification: NotificationPayload): string {\n if (notification.data?.user_name) return notification.data.user_name;\n if (notification.data?.name) return notification.data.name;\n // Extract name from title if format is \"Name action...\"\n const titleParts = notification.title.split(' ');\n if (titleParts.length > 1) {\n return titleParts[0];\n }\n return 'System';\n }\n\n /**\n * Get notification action text\n */\n getNotificationAction(notification: NotificationPayload): string {\n const title = notification.title;\n const name = this.getNotificationName(notification);\n // Remove the name from title to get action\n return title.replace(name, '').trim();\n }\n\n /**\n * Get notification avatar (from data or created_by)\n */\n getNotificationAvatar(notification: NotificationPayload): string | null {\n if (notification.data?.user_photo_id_cyfm) return notification.data.user_photo_id_cyfm;\n if (notification.data?.photo_id) return notification.data.photo_id;\n // Try to get from created_by if it's a populated object\n const createdBy = (notification as any).not_id_created_by;\n if (createdBy && typeof createdBy === 'object' && createdBy.user_photo_id_cyfm) {\n return createdBy.user_photo_id_cyfm;\n }\n return null;\n }\n\n /**\n * Get file icon based on file type\n */\n getFileIcon(fileType: string): string {\n if (!fileType) return 'description';\n const type = fileType.toLowerCase();\n if (type.includes('pdf')) return 'PDF';\n if (type.includes('mp4') || type.includes('video')) return 'MP4';\n if (type.includes('image')) return 'IMG';\n if (type.includes('word') || type.includes('doc')) return 'DOC';\n if (type.includes('excel') || type.includes('xls')) return 'XLS';\n return 'FILE';\n }\n\n /**\n * Close notification dropdown\n */\n closeNotificationDropdown(event: Event): void {\n event.stopPropagation();\n // Close the dropdown by toggling it if it's open\n if (this.notificationDropdown && typeof this.notificationDropdown.toggleDropdown === 'function') {\n // If dropdown is open, toggle to close it\n if (this.notificationDropdown.isOpen && this.notificationDropdown.isOpen()) {\n this.notificationDropdown.toggleDropdown(event);\n }\n }\n }\n\n /**\n * Get notification icon color class\n */\n getNotificationIconColorClass(type: string): string {\n const colorMap: { [key: string]: string } = {\n 'info': 'tw-text-blue-500',\n 'success': 'tw-text-green-500',\n 'warning': 'tw-text-yellow-500',\n 'error': 'tw-text-red-500',\n 'system': 'tw-text-gray-500'\n };\n return colorMap[type] || 'tw-text-gray-500';\n }\n\n /**\n * Handle notification dropdown item click\n */\n onNotificationClick(item: DropdownItem): void {\n // Handle action buttons\n if (item.id === 'mark-all-read') {\n this.markAllAsRead();\n return;\n }\n\n if (item.id === 'clear-all') {\n this.clearAllNotifications();\n return;\n }\n\n if (item.id === 'view-all') {\n // Show all notifications - for now, just reload with more items\n console.log('[Notifications] View all notifications');\n this.loadAllNotifications();\n return;\n }\n\n if (item.id === 'no-notifications' || item.id === 'divider' || item.id === 'divider-1' || item.id === 'divider-2') {\n return;\n }\n\n // Mark notification as read when clicked\n this.markNotificationAsRead(String(item.id));\n\n // Navigate to action URL if available\n const notification = this.notifications().find(n => n.id === item.id);\n if (notification?.action_url) {\n this.router.navigate([notification.action_url]);\n }\n }\n\n /**\n * Mark a single notification as read\n */\n private markNotificationAsRead(notificationId: string, skipAnimation: boolean = false): void {\n console.log('[Notifications] Marking as read:', notificationId);\n \n // If not skipping animation, check if it's undoable\n if (!skipAnimation) {\n const notification = this.notifications().find(n => String(n.id) === notificationId);\n if (notification && this.isNotificationUndoable(notification)) {\n // Handle through onNotificationItemClick for undo functionality\n this.onNotificationItemClick(notification);\n return;\n }\n }\n \n // Mark in WebSocket service\n if (this.wsNotificationService) {\n this.wsNotificationService.markAsRead(notificationId);\n }\n \n // Mark in API\n this.notificationApiService.markAsRead(notificationId).subscribe({\n next: (response) => {\n console.log('[Notifications] Marked as read successfully:', response);\n // Reload notifications to update unread count (only show unread)\n this.loadNotifications(false); // false = only show unread\n },\n error: (error: any) => {\n console.error('[Notifications] Error marking notification as read:', error);\n console.error('[Notifications] Error details:', {\n status: error?.status,\n statusText: error?.statusText,\n message: error?.message,\n url: error?.url\n });\n // Still reload to get updated state\n this.loadNotifications();\n }\n });\n }\n\n /**\n * Mark all notifications as read\n */\n markAllAsRead(): void {\n console.log('[Notifications] Marking all as read');\n this.notificationApiService.markAllAsRead().subscribe({\n next: (response) => {\n console.log('[Notifications] All notifications marked as read successfully:', response);\n // Clear current notifications since they're all read now\n // This will show empty state or only new unread notifications\n this.notifications.set([]);\n this.updateNotificationDropdown();\n \n // Reload after a short delay to get updated state (will only show unread)\n setTimeout(() => {\n this.loadNotifications(false); // false = only show unread\n }, 500);\n },\n error: (error: any) => {\n console.error('[Notifications] Error marking all as read:', error);\n console.error('[Notifications] Error details:', {\n status: error?.status,\n statusText: error?.statusText,\n message: error?.message,\n url: error?.url\n });\n // Still reload to get updated state\n this.loadNotifications(false); // false = only show unread\n }\n });\n }\n\n /**\n * Clear all notifications (mark all as read and remove from view)\n */\n clearAllNotifications(): void {\n if (confirm('Are you sure you want to clear all notifications? This will mark them all as read.')) {\n console.log('[Notifications] Clearing all notifications');\n // First mark all as read\n this.notificationApiService.markAllAsRead().subscribe({\n next: (response) => {\n console.log('[Notifications] All notifications marked as read:', response);\n // Clear notifications from view immediately (they're all read now)\n this.notifications.set([]);\n this.updateNotificationDropdown();\n \n // Reload after a short delay to get updated state from server\n // This will show empty or only new unread notifications\n setTimeout(() => {\n this.loadNotifications(false); // false = only show unread\n }, 500);\n },\n error: (error: any) => {\n console.error('[Notifications] Error clearing all notifications:', error);\n console.error('[Notifications] Error details:', {\n status: error?.status,\n statusText: error?.statusText,\n message: error?.message,\n url: error?.url\n });\n // Still try to reload\n this.loadNotifications(false); // false = only show unread\n }\n });\n }\n }\n\n /**\n * Load all notifications (for \"View All\" functionality)\n */\n loadAllNotifications(): void {\n try {\n console.log('[Notifications] Loading all notifications (View All)');\n // Load all notifications (read + unread) for \"View All\"\n this.loadNotifications(true); // true = show all (read + unread)\n } catch (error) {\n console.error('[Notifications] Error in loadAllNotifications:', error);\n }\n }\n\n ngAfterViewInit() {\n // No need to manually load file details - cideEleFileImage directive will handle it\n }\n\n ngOnDestroy() {\n // Cleanup handled by takeUntilDestroyed\n }\n\n /**\n * Handles logo click to navigate back to control panel home\n */\n onLogoClick(): void {\n this.router.navigate(['/control-panel']);\n }\n\n /**\n * Handles entity name click to open entity selection floating container\n */\n async onEntityNameClick(): Promise<void> {\n try {\n await this.floatingEntitySelectionService.show();\n } catch (error) {\n // Error handling\n }\n }\n\n /**\n * Updates the tooltip position based on mouse event\n * Similar to the sidebar tooltip positioning\n * @param event Mouse event from icon hover\n */\n updateTooltipPosition(event: MouseEvent) {\n // Find the tooltip element within the event target's parent\n const iconElement = event.currentTarget as HTMLElement;\n const tooltip = iconElement.querySelector('.header-tooltip') as HTMLElement;\n\n if (tooltip) {\n // Ensure the tooltip is properly positioned\n const rect = iconElement.getBoundingClientRect();\n const headerRect = document.getElementById('cide-lyt-header-wrapper')?.getBoundingClientRect();\n\n if (headerRect) {\n // Adjust tooltip position if it would go outside the viewport\n const viewportWidth = window.innerWidth;\n const tooltipWidth = tooltip.offsetWidth;\n\n // Center the tooltip under the icon\n let leftPosition = '50%';\n let transform = 'translateX(-50%)';\n\n // Check if tooltip would extend beyond right edge\n if (rect.left + tooltipWidth / 2 > viewportWidth) {\n leftPosition = 'auto';\n tooltip.style.right = '0';\n transform = 'translateX(0)';\n }\n\n // Check if tooltip would extend beyond left edge\n if (rect.left - tooltipWidth / 2 < 0) {\n leftPosition = '0';\n tooltip.style.right = 'auto';\n transform = 'translateX(0)';\n }\n\n if (leftPosition !== 'auto' && leftPosition !== '0') {\n tooltip.style.left = leftPosition;\n }\n\n tooltip.style.transform = transform;\n }\n }\n }\n\n /**\n * Load financial years from API\n */\n loadFinancialYears(): void {\n this.financialYearService.getFinancialYearList({})\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response) => {\n if (response?.success && response.data) {\n this.financialYears.set(response.data);\n // Defer update to next change detection cycle to avoid ExpressionChangedAfterItHasBeenCheckedError\n Promise.resolve().then(() => {\n this.updateFinancialYearDropdown();\n });\n } else {\n this.financialYears.set([]);\n }\n },\n error: (error) => {\n this.financialYears.set([]);\n }\n });\n }\n\n /**\n * Load academic years from API\n */\n loadAcademicYears(): void {\n this.academicYearService.getAcademicYearList({})\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response) => {\n if (response?.success && response.data) {\n this.academicYears.set(response.data);\n // Defer update to next change detection cycle to avoid ExpressionChangedAfterItHasBeenCheckedError\n Promise.resolve().then(() => {\n this.updateAcademicYearDropdown();\n });\n } else {\n this.academicYears.set([]);\n }\n },\n error: (error) => {\n this.academicYears.set([]);\n }\n });\n }\n\n /**\n * Update financial year dropdown items\n */\n updateFinancialYearDropdown(): void {\n const years = this.financialYears();\n this.financialYearItems.set(years.map(year => {\n // Use correct field names: accyr_name, accyr_from_date, accyr_to_date\n const name = year.accyr_name;\n const fromDate = year.accyr_from_date;\n const toDate = year.accyr_to_date;\n \n // Build label with proper fallback\n let label = name;\n if (!label && fromDate && toDate) {\n // Format dates if they're Date objects\n const from = fromDate instanceof Date ? fromDate.toISOString().split('T')[0] : fromDate;\n const to = toDate instanceof Date ? toDate.toISOString().split('T')[0] : toDate;\n label = `${from} - ${to}`;\n } else if (!label && (fromDate || toDate)) {\n const date = fromDate || toDate;\n label = date instanceof Date ? date.toISOString().split('T')[0] : date || 'Financial Year';\n } else if (!label) {\n label = 'Financial Year';\n }\n \n // Add status indicators to label\n const statusIndicators: string[] = [];\n if (year.accyr_iscurrent) {\n statusIndicators.push('Current');\n }\n if (year.accyr_islocked) {\n statusIndicators.push('Locked');\n }\n \n const fullLabel = statusIndicators.length > 0 \n ? `${label} (${statusIndicators.join(', ')})`\n : label;\n \n return {\n id: year._id,\n label: fullLabel,\n icon: 'calendar_today',\n iconColor: 'tw-text-blue-500'\n } as DropdownItem;\n }));\n\n // Set current financial year (first active one or first in list)\n // Use correct field name: accyr_isactive\n const currentFY = years.find(year => year.accyr_isactive) || years[0];\n if (currentFY) {\n this.currentFinancialYear.set(currentFY);\n // Set display name with proper fallback\n const name = currentFY.accyr_name;\n const fromDate = currentFY.accyr_from_date;\n const toDate = currentFY.accyr_to_date;\n \n if (name) {\n this.currentFinancialYearName.set(name);\n } else if (fromDate && toDate) {\n const from = fromDate instanceof Date ? fromDate.toISOString().split('T')[0] : fromDate;\n const to = toDate instanceof Date ? toDate.toISOString().split('T')[0] : toDate;\n this.currentFinancialYearName.set(`${from} - ${to}`);\n } else {\n this.currentFinancialYearName.set('FY');\n }\n }\n }\n\n /**\n * Update academic year dropdown items\n */\n updateAcademicYearDropdown(): void {\n const years = this.academicYears();\n this.academicYearItems.set(years.map(year => {\n // Use correct field names: acayr_name, acayr_from_date, acayr_to_date\n const name = year.acayr_name;\n const fromDate = year.acayr_from_date;\n const toDate = year.acayr_to_date;\n \n // Build label with proper fallback\n let label = name;\n if (!label && fromDate && toDate) {\n label = `${fromDate} - ${toDate}`;\n } else if (!label && (fromDate || toDate)) {\n label = fromDate || toDate || 'Academic Year';\n } else if (!label) {\n label = 'Academic Year';\n }\n \n // Add status indicators to label\n const statusIndicators: string[] = [];\n if (year.acayr_iscurrent) {\n statusIndicators.push('Current');\n }\n if (year.acayr_islocked) {\n statusIndicators.push('Locked');\n }\n \n const fullLabel = statusIndicators.length > 0 \n ? `${label} (${statusIndicators.join(', ')})`\n : label;\n \n return {\n id: year._id,\n label: fullLabel,\n icon: 'school',\n iconColor: 'tw-text-green-500'\n } as DropdownItem;\n }));\n\n // Set current academic year (first active one or first in list)\n const currentAY = years.find(year => year.acayr_isactive) || years[0];\n if (currentAY) {\n this.currentAcademicYear.set(currentAY);\n // Set display name with proper fallback\n const name = currentAY.acayr_name;\n const fromDate = currentAY.acayr_from_date;\n const toDate = currentAY.acayr_to_date;\n \n if (name) {\n this.currentAcademicYearName.set(name);\n } else if (fromDate && toDate) {\n this.currentAcademicYearName.set(`${fromDate} - ${toDate}`);\n } else {\n this.currentAcademicYearName.set('AY');\n }\n } else if (years.length > 0) {\n // If no active year, set the first one\n const firstYear = years[0];\n this.currentAcademicYear.set(firstYear);\n const name = firstYear.acayr_name;\n const fromDate = firstYear.acayr_from_date;\n const toDate = firstYear.acayr_to_date;\n \n if (name) {\n this.currentAcademicYearName.set(name);\n } else if (fromDate && toDate) {\n this.currentAcademicYearName.set(`${fromDate} - ${toDate}`);\n } else {\n this.currentAcademicYearName.set('AY');\n }\n }\n }\n\n /**\n * Handle financial year dropdown item clicks\n */\n onFinancialYearClick(item: DropdownItem): void {\n const selectedYear = this.financialYears().find(year => year._id === item.id);\n if (selectedYear) {\n this.currentFinancialYear.set(selectedYear);\n // Set display name with proper fallback\n const name = selectedYear.accyr_name;\n const fromDate = selectedYear.accyr_from_date;\n const toDate = selectedYear.accyr_to_date;\n \n if (name) {\n this.currentFinancialYearName.set(name);\n } else if (fromDate && toDate) {\n const from = fromDate instanceof Date ? fromDate.toISOString().split('T')[0] : fromDate;\n const to = toDate instanceof Date ? toDate.toISOString().split('T')[0] : toDate;\n this.currentFinancialYearName.set(`${from} - ${to}`);\n } else {\n this.currentFinancialYearName.set('FY');\n }\n // TODO: Update app state or notify other components about the change\n }\n }\n\n /**\n * Handle academic year dropdown item clicks\n */\n onAcademicYearClick(item: DropdownItem): void {\n const selectedYear = this.academicYears().find(year => year._id === item.id);\n if (selectedYear) {\n this.currentAcademicYear.set(selectedYear);\n // Set display name with proper fallback\n const name = selectedYear.acayr_name;\n const fromDate = selectedYear.acayr_from_date;\n const toDate = selectedYear.acayr_to_date;\n \n if (name) {\n this.currentAcademicYearName.set(name);\n } else if (fromDate && toDate) {\n this.currentAcademicYearName.set(`${fromDate} - ${toDate}`);\n } else {\n this.currentAcademicYearName.set('AY');\n }\n // TODO: Update app state or notify other components about the change\n }\n }\n\n /**\n * Handle profile dropdown item clicks\n * @param item The clicked dropdown item\n */\n onProfileClick(item: DropdownItem): void {\n switch (item.id) {\n case 'profile':\n this.navigateToProfile();\n break;\n case 'settings':\n this.navigateToSettings();\n break;\n case 'theme':\n this.toggleTheme();\n // Update the label dynamically\n this.updateThemeMenuItem();\n break;\n case 'help':\n this.navigateToHelp();\n break;\n case 'logout':\n this.handleLogout();\n break;\n }\n }\n\n /**\n * Toggle dark mode theme\n */\n toggleTheme(): void {\n // Use the CIDE Element Library theme service for theme management\n // The service handles DOM manipulation, localStorage, and theme application\n this.themeService.toggleTheme();\n // Note: darkMode signal is automatically updated via the subscription in ngOnInit\n }\n\n /**\n * Update theme menu item label and icon based on current theme\n */\n updateThemeMenuItem(): void {\n const themeItem = this.profileItems.find(item => item.id === 'theme');\n if (themeItem) {\n themeItem.label = this.darkMode() ? 'Light Mode' : 'Dark Mode';\n themeItem.icon = this.darkMode() ? 'light_mode' : 'dark_mode';\n }\n }\n\n /**\n * Navigate to user profile page\n */\n private navigateToProfile(): void {\n // TODO: Implement profile navigation\n // this.router.navigate(['/profile']);\n }\n\n /**\n * Handle more options dropdown item clicks (DEPRECATED)\n * @param item The clicked dropdown item\n */\n onMoreOptionsClick(item: DropdownItem): void {\n switch (item.id) {\n case 'settings':\n this.navigateToSettings();\n break;\n case 'help':\n this.navigateToHelp();\n break;\n case 'logout':\n this.handleLogout();\n break;\n }\n }\n\n /**\n * Navigate to settings page\n */\n private navigateToSettings(): void {\n // TODO: Implement settings navigation\n // this.router.navigate(['/settings']);\n }\n\n /**\n * Navigate to help and support page\n */\n private navigateToHelp(): void {\n // TODO: Implement help navigation\n // this.router.navigate(['/help']);\n }\n\n /**\n * Handle user logout\n * Uses the auth service to sign out and navigate to login page\n */\n private handleLogout(): void {\n // Show confirmation dialog using cloud-ide-elements ConfirmationService\n this.confirmationService.ask({\n title: 'Confirm Logout',\n message: 'Are you sure you want to logout?',\n confirmText: 'Logout',\n cancelText: 'Cancel',\n type: 'warning',\n icon: 'logout'\n }).then((confirmed: boolean) => {\n if (confirmed) {\n try {\n // Use the auth service to sign out\n this.authService.signOut();\n\n // Navigate to login page\n this.router.navigate(['/auth/sign-in']).then(success => {\n if (!success) {\n // Fallback: reload the page to force navigation\n window.location.href = '/auth/sign-in';\n }\n }).catch(error => {\n // Fallback: reload the page to force navigation\n window.location.href = '/auth/sign-in';\n });\n } catch (error) {\n // Still try to navigate to login page even if logout fails\n this.router.navigate(['/auth/sign-in']);\n }\n }\n });\n }\n\n /**\n * Initialize audio context early to avoid browser autoplay restrictions\n */\n private initializeAudioContext(): void {\n // Initialize audio context on first user interaction\n const initAudio = () => {\n try {\n const AudioContextClass = window.AudioContext || (window as any).webkitAudioContext;\n if (AudioContextClass && !(window as any)._notificationAudioContext) {\n const audioContext = new AudioContextClass();\n // Resume to unlock audio (required for autoplay policy)\n if (audioContext.state === 'suspended') {\n audioContext.resume().then(() => {\n console.log('[Notifications] Audio context initialized and resumed');\n }).catch((error) => {\n console.warn('[Notifications] Failed to initialize audio context:', error);\n });\n }\n (window as any)._notificationAudioContext = audioContext;\n }\n } catch (error) {\n console.warn('[Notifications] Failed to initialize audio context:', error);\n }\n };\n\n // Try to initialize on any user interaction\n const events = ['click', 'touchstart', 'keydown'];\n const initOnce = () => {\n initAudio();\n // Remove listeners after first initialization\n events.forEach(event => {\n document.removeEventListener(event, initOnce);\n });\n };\n\n events.forEach(event => {\n document.addEventListener(event, initOnce, { once: true, passive: true });\n });\n }\n\n /**\n * Play notification sound based on user settings\n */\n playNotificationSound(): void {\n if (this.notificationSettingsService) {\n this.notificationSettingsService.playNotificationSound();\n }\n }\n\n /**\n * Open notification settings in floating container\n */\n async openNotificationSettings(): Promise<void> {\n // Ensure component is registered\n if (!this.floatingContainerService.isComponentRegistered('notification-settings')) {\n this.floatingContainerService.registerComponent('notification-settings', NotificationSettingsComponent);\n }\n\n const containerId = this.floatingContainerService.show({\n id: `notification-settings-${Date.now()}`,\n title: 'Notification Settings',\n icon: 'settings',\n width: '500px',\n height: '600px',\n minWidth: '400px',\n minHeight: '450px',\n maxWidth: '90vw',\n maxHeight: '90vh',\n resizable: true,\n draggable: true,\n closable: true,\n minimizable: true,\n maximizable: true,\n backdrop: false,\n componentId: 'notification-settings',\n componentConfig: {\n inputs: {},\n outputs: {}\n }\n });\n\n this.floatingContainerService.bringToFront(containerId);\n }\n}\n","<header id=\"cide-lyt-header-wrapper\" class=\"cide-lyt-header tw-w-full tw-select-none cide-lyt-header-wrapper-hide\">\n <!-- Logo Section -->\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"header-logo-container tw-flex tw-items-center tw-gap-3 tw-cursor-pointer\" (click)=\"onLogoClick()\"\n (keydown.enter)=\"onLogoClick()\" (keydown.space)=\"onLogoClick()\" tabindex=\"0\" role=\"button\"\n aria-label=\"Navigate to home\" title=\"Click to go to control panel home\">\n @if (appStateService.activeEntity()?.syen_photo_id_cyfm) {\n <img cideEleFileImage [fileId]=\"(appStateService.activeEntity()?.syen_photo_id_cyfm || '')\"\n [altText]=\"'Entity Logo'\" class=\"tw-w-8 tw-h-8 tw-object-contain\">\n } @else {\n <cide-ele-icon name=\"business\" class=\"tw-w-8 tw-h-8 tw-text-blue-600\"></cide-ele-icon>\n }\n\n </div>\n @if (appStateService.activeEntity()?.syen_name) {\n <span\n class=\"tw-text-md tw-font-semibold tw-text-blue-600 hover:tw-text-blue-800 tw-cursor-pointer sm:block tw-transition-colors tw-duration-200 hover:tw-underline\"\n (click)=\"onEntityNameClick()\" title=\"Click to switch entity\">\n {{ appStateService.activeEntity()?.syen_name }}\n </span>\n }\n </div>\n <!-- Search Section -->\n <div class=\"header-search-container\">\n <cide-ele-input id=\"cide_lyt_header_search\" placeholder=\"Search...\" leadingIcon=\"search\"\n size=\"md\"></cide-ele-input>\n </div>\n\n <!-- Icons Section -->\n <div class=\"header-icons-container\">\n <!-- Financial Year Dropdown -->\n <div class=\"header-dropdown-container\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-dropdown [items]=\"financialYearItems()\" [config]=\"financialYearConfig\"\n [triggerTemplate]=\"financialYearTriggerTemplate\"\n (itemClick)=\"onFinancialYearClick($event)\">\n </cide-ele-dropdown>\n <div class=\"header-tooltip\">Financial Year</div>\n </div>\n \n <ng-template #financialYearTriggerTemplate let-isOpen=\"isOpen\">\n <div class=\"header-year-pill\">\n <cide-ele-icon size=\"2xs\" type=\"none\" class=\"tw-mr-1\">calendar_today</cide-ele-icon>\n <span class=\"header-year-pill-text\">{{ currentFinancialYearName() }}</span>\n </div>\n </ng-template>\n\n <!-- Academic Year Dropdown -->\n <div class=\"header-dropdown-container\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-dropdown [items]=\"academicYearItems()\" [config]=\"academicYearConfig\"\n [triggerTemplate]=\"academicYearTriggerTemplate\"\n (itemClick)=\"onAcademicYearClick($event)\">\n </cide-ele-dropdown>\n <div class=\"header-tooltip\">Academic Year</div>\n </div>\n \n <ng-template #academicYearTriggerTemplate let-isOpen=\"isOpen\">\n <div class=\"header-year-pill\">\n <cide-ele-icon size=\"2xs\" type=\"none\" class=\"tw-mr-1\">school</cide-ele-icon>\n <span class=\"header-year-pill-text\">{{ currentAcademicYearName() }}</span>\n </div>\n </ng-template>\n\n <!-- Notifications Dropdown -->\n <div class=\"header-dropdown-container\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-dropdown \n #notificationDropdown\n [items]=\"notificationItems()\" \n [config]=\"notificationConfig\"\n [triggerTemplate]=\"notificationTriggerTemplate\"\n [menuTemplate]=\"notificationMenuTemplate\"\n (itemClick)=\"onNotificationClick($event)\">\n </cide-ele-dropdown>\n <div class=\"header-tooltip\">Notifications</div>\n </div>\n \n <ng-template #notificationTriggerTemplate let-isOpen=\"isOpen\">\n <div class=\"header-icon notification-icon\" [class.active]=\"isOpen\">\n <cide-ele-icon>notifications</cide-ele-icon>\n @if (unreadCount() > 0) {\n <div class=\"header-badge\">{{ unreadCount() > 99 ? '99+' : unreadCount() }}</div>\n }\n </div>\n </ng-template>\n\n <!-- Custom Notification Menu Template -->\n <ng-template #notificationMenuTemplate let-items=\"items\">\n <div class=\"tw-min-w-[380px] tw-bg-white dark:tw-bg-gray-800 tw-rounded-xl tw-shadow-2xl tw-overflow-hidden tw-text-gray-900 dark:tw-text-gray-100\">\n <!-- Header - Fixed/Sticky -->\n <div class=\"tw-sticky tw-top-0 tw-z-10 tw-px-2.5 tw-py-1 tw-bg-white dark:tw-bg-gray-800 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200 dark:tw-border-gray-700 tw-backdrop-blur-sm\">\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n <div class=\"tw-w-5 tw-h-5 tw-bg-blue-500 tw-rounded tw-flex tw-items-center tw-justify-center tw-shadow-sm\">\n <cide-ele-icon class=\"!tw-text-[10px] !tw-text-white\">notifications</cide-ele-icon>\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n <h3 class=\"tw-m-0 tw-text-[10px] tw-font-bold tw-text-gray-900 dark:tw-text-gray-100 tw-leading-none\">Notifications</h3>\n @if (unreadCount() > 0) {\n <span class=\"tw-bg-red-500 tw-text-white tw-px-1 tw-py-0 tw-rounded-full tw-text-[7px] tw-font-bold tw-leading-none tw-animate-pulse\">{{ unreadCount() }}</span>\n }\n </div>\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-0.5\">\n <button \n type=\"button\"\n class=\"tw-bg-transparent tw-border-none tw-p-0.5 tw-cursor-pointer tw-text-gray-600 dark:tw-text-gray-400 tw-flex tw-items-center tw-justify-center tw-rounded tw-transition-all tw-duration-200 hover:tw-bg-gray-100 dark:hover:tw-bg-gray-600 hover:tw-text-gray-900 dark:hover:tw-text-gray-200\"\n (click)=\"openNotificationSettings(); $event.stopPropagation()\"\n title=\"Notification Settings\">\n <cide-ele-icon class=\"!tw-text-xs\">settings</cide-ele-icon>\n </button>\n @if (unreadCount() > 0) {\n <button \n type=\"button\"\n class=\"tw-bg-blue-500 tw-text-white tw-px-1 tw-py-0.5 tw-rounded tw-text-[8px] tw-font-semibold tw-cursor-pointer tw-transition-all tw-duration-200 tw-flex tw-items-center tw-gap-0.5 tw-shadow-sm hover:tw-bg-blue-600 hover:tw-scale-105\"\n (click)=\"markAllAsRead(); $event.stopPropagation()\"\n title=\"Mark all as read\">\n <cide-ele-icon class=\"!tw-text-[9px]\">done_all</cide-ele-icon>\n </button>\n }\n <button \n type=\"button\" \n class=\"tw-bg-transparent tw-border-none tw-p-0.5 tw-cursor-pointer tw-text-gray-600 dark:tw-text-gray-400 tw-flex tw-items-center tw-justify-center tw-rounded tw-transition-all tw-duration-200 hover:tw-bg-gray-100 dark:hover:tw-bg-gray-600 hover:tw-text-gray-900 dark:hover:tw-text-gray-200 hover:tw-rotate-90\"\n (click)=\"closeNotificationDropdown($event)\"\n title=\"Close\">\n <cide-ele-icon class=\"!tw-text-xs\">close</cide-ele-icon>\n </button>\n </div>\n </div>\n\n <!-- Notifications List -->\n <div class=\"tw-overflow-x-hidden notification-scroll-container tw-bg-white dark:tw-bg-gray-800 tw-text-gray-900 dark:tw-text-gray-100\">\n @if (notifications().length === 0) {\n <div class=\"tw-py-16 tw-px-4 tw-text-center tw-bg-white dark:tw-bg-gray-800\">\n <cide-ele-icon class=\"!tw-text-6xl !tw-text-gray-300 dark:!tw-text-gray-600 tw-mb-3\">notifications_off</cide-ele-icon>\n <p class=\"tw-m-0 tw-text-sm tw-text-gray-600 dark:tw-text-gray-400 tw-font-medium\">No notifications yet</p>\n <p class=\"tw-m-0 tw-mt-1 tw-text-xs tw-text-gray-500 dark:tw-text-gray-500\">You're all caught up!</p>\n </div>\n } @else {\n @for (notif of notifications().slice(0, 15); track notif.id) {\n <div \n class=\"tw-flex tw-items-start tw-px-3 tw-py-2 tw-cursor-pointer tw-transition-all tw-duration-300 tw-relative tw-gap-2 tw-border-b tw-border-gray-200 dark:tw-border-gray-700 last:tw-border-b-0 hover:tw-bg-gray-50 dark:hover:tw-bg-gray-700 tw-transform tw-ease-in-out tw-bg-white dark:tw-bg-gray-800 tw-text-gray-900 dark:tw-text-gray-100\"\n [class.tw-border-l-2]=\"!isNotificationRead(notif)\"\n [class.tw-border-l-blue-500]=\"!isNotificationRead(notif)\"\n [class.dark:tw-border-l-blue-400]=\"!isNotificationRead(notif)\"\n [class.tw-bg-blue-50]=\"!isNotificationRead(notif)\"\n [class.dark:tw-bg-gray-700]=\"!isNotificationRead(notif)\"\n [class.-tw-translate-x-full]=\"isNotificationAnimating(notif)\"\n [class.tw-opacity-0]=\"isNotificationAnimating(notif)\"\n [class.tw-max-h-0]=\"isNotificationAnimating(notif)\"\n [class.tw-overflow-hidden]=\"isNotificationAnimating(notif)\"\n [class.tw-mb-0]=\"isNotificationAnimating(notif)\"\n [class.tw-p-0]=\"isNotificationAnimating(notif)\"\n (click)=\"onNotificationItemClick(notif)\">\n <!-- Icon/Avatar -->\n <div class=\"tw-flex-shrink-0 tw-relative\">\n <div class=\"tw-w-9 tw-h-9 tw-rounded-full tw-overflow-hidden tw-bg-gradient-to-br tw-from-blue-500 tw-to-blue-600 tw-flex tw-items-center tw-justify-center tw-shadow-sm tw-ring-1 tw-ring-white\">\n @if (getNotificationAvatar(notif)) {\n <img \n cideEleFileImage \n [fileId]=\"getNotificationAvatar(notif) || ''\"\n [altText]=\"getNotificationName(notif)\"\n class=\"tw-w-full tw-h-full tw-object-cover\">\n } @else {\n <cide-ele-icon class=\"!tw-text-base !tw-text-white\">{{ getNotificationIcon(notif.type) }}</cide-ele-icon>\n }\n </div>\n <!-- Green online indicator -->\n <div class=\"tw-absolute tw-bottom-0 tw-right-0 tw-w-2 tw-h-2 tw-bg-green-500 tw-rounded-full tw-border tw-border-white\"></div>\n </div>\n\n <!-- Content -->\n <div class=\"tw-flex-1 tw-min-w-0\">\n <!-- Title and relative time -->\n <div class=\"tw-flex tw-items-start tw-justify-between tw-gap-1.5 tw-mb-0.5\">\n <div class=\"tw-flex-1 tw-min-w-0\">\n <h4 class=\"tw-m-0 tw-text-[11px] tw-font-bold tw-text-gray-900 dark:tw-text-gray-100 tw-leading-tight\">\n <span class=\"tw-text-blue-600 dark:tw-text-blue-400\">{{ getNotificationName(notif) }}</span><span class=\"tw-font-normal tw-text-gray-800 dark:tw-text-gray-300\"> {{ getNotificationAction(notif) }}</span>\n </h4>\n <p class=\"tw-m-0 tw-text-[9px] tw-text-gray-500 dark:tw-text-gray-500 tw-mt-0.5\">{{ getTimeAgo(notif.timestamp) }}</p>\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-flex-shrink-0\">\n @if (!isNotificationRead(notif)) {\n <div class=\"tw-w-1.5 tw-h-1.5 tw-rounded-full tw-bg-blue-500 dark:tw-bg-blue-400 tw-animate-pulse\"></div>\n }\n @if (isNotificationAnimating(notif) && isNotificationUndoable(notif)) {\n <button \n type=\"button\"\n (click)=\"undoNotificationRemoval(getNotificationId(notif)); $event.stopPropagation()\"\n class=\"tw-px-2 tw-py-0.5 tw-text-[9px] tw-font-semibold tw-text-blue-600 dark:tw-text-blue-400 tw-bg-blue-50 dark:tw-bg-blue-900 tw-border tw-border-blue-200 dark:tw-border-blue-700 tw-rounded-md tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-bg-blue-100 dark:hover:tw-bg-blue-800 hover:tw-border-blue-300 dark:hover:tw-border-blue-600 hover:tw-scale-105 tw-whitespace-nowrap tw-animate-pulse\">\n Undo\n </button>\n }\n </div>\n </div>\n \n <!-- Message -->\n @if (notif.message && notif.message !== notif.title) {\n <p class=\"tw-m-0 tw-mt-1 tw-text-[10px] tw-text-gray-700 dark:tw-text-gray-400 tw-leading-snug tw-line-clamp-2\">\n {{ notif.message }}\n </p>\n }\n \n <!-- Comment -->\n @if (notif.data?.comment) {\n <div class=\"tw-mt-1.5 tw-py-1.5 tw-px-2.5 tw-bg-gray-100 dark:tw-bg-gray-700 tw-rounded-md tw-border-l-2 tw-border-l-blue-500 dark:tw-border-l-blue-500\">\n <p class=\"tw-m-0 tw-text-[10px] tw-text-gray-800 dark:tw-text-gray-300 tw-leading-snug tw-italic tw-line-clamp-2\">{{ notif.data.comment }}</p>\n </div>\n }\n \n <!-- File -->\n @if (notif.data?.file) {\n <div class=\"tw-mt-1.5 tw-py-1.5 tw-px-2.5 tw-bg-gray-100 dark:tw-bg-gray-700 tw-border tw-border-gray-300 dark:tw-border-gray-600 tw-rounded-md tw-flex tw-items-center tw-gap-2\">\n <div class=\"tw-w-7 tw-h-7 tw-bg-blue-100 dark:tw-bg-blue-900 tw-rounded-md tw-flex tw-items-center tw-justify-center tw-flex-shrink-0\">\n <span class=\"tw-text-[9px] tw-font-bold tw-text-blue-700 dark:tw-text-blue-300\">{{ getFileIcon(notif.data.file.type) }}</span>\n </div>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <p class=\"tw-m-0 tw-text-[10px] tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100 tw-overflow-hidden tw-text-ellipsis tw-whitespace-nowrap\">{{ notif.data.file.name }}</p>\n <p class=\"tw-m-0 tw-text-[9px] tw-text-gray-600 dark:tw-text-gray-400\">{{ notif.data.file.size }}</p>\n </div>\n <cide-ele-icon class=\"!tw-text-sm !tw-text-blue-600 dark:!tw-text-blue-400 tw-cursor-pointer tw-transition-all tw-duration-200 tw-flex-shrink-0 hover:tw-text-blue-700 dark:hover:tw-text-blue-300 hover:tw-scale-110\">download</cide-ele-icon>\n </div>\n }\n \n <!-- Action Buttons -->\n @if (notif.action_label) {\n <div class=\"tw-mt-1.5 tw-flex tw-gap-1.5\">\n @if (notif.action_label.toLowerCase().includes('decline')) {\n <button type=\"button\" class=\"tw-py-1 tw-px-3 tw-border tw-border-gray-300 dark:tw-border-gray-600 tw-bg-white dark:tw-bg-gray-800 tw-rounded-md tw-text-[10px] tw-font-semibold tw-cursor-pointer tw-transition-all tw-duration-200 tw-text-gray-800 dark:tw-text-gray-300 hover:tw-bg-gray-100 dark:hover:tw-bg-gray-700 hover:tw-border-gray-400 dark:hover:tw-border-gray-500 hover:tw-scale-105\">Decline</button>\n }\n @if (notif.action_label.toLowerCase().includes('accept')) {\n <button type=\"button\" class=\"tw-py-1 tw-px-3 tw-border tw-border-blue-600 dark:tw-border-blue-500 tw-bg-blue-600 dark:tw-bg-blue-500 tw-rounded-md tw-text-[10px] tw-font-semibold tw-cursor-pointer tw-transition-all tw-duration-200 tw-text-white hover:tw-bg-blue-700 dark:hover:tw-bg-blue-600 hover:tw-border-blue-700 dark:hover:tw-border-blue-600 hover:tw-scale-105\">Accept</button>\n }\n </div>\n }\n </div>\n </div>\n }\n }\n </div>\n\n </div>\n </ng-template>\n\n <div class=\"header-divider\"></div>\n\n <!-- Profile with Dropdown -->\n <div class=\"header-icon user-profile\" (mouseenter)=\"updateTooltipPosition($event)\">\n <cide-ele-dropdown [items]=\"profileItems\" [config]=\"profileConfig\"\n [triggerTemplate]=\"triggerTemplate\"\n (itemClick)=\"onProfileClick($event)\">\n <ng-template #triggerTemplate>\n @if (appStateService.currentUser()?.user_photo_id_cyfm) {\n <div class=\"profile-avatar\">\n <img cideEleFileImage [fileId]=\"(appStateService.currentUser()?.user_photo_id_cyfm || '')\"\n [altText]=\"'User Profile Photo'\" class=\"tw-w-full tw-h-full tw-object-cover tw-rounded-full\">\n </div>\n } @else {\n <div class=\"profile-avatar\">\n <cide-ele-icon name=\"person\" class=\"tw-w-6 tw-h-6 tw-text-white\"></cide-ele-icon>\n </div>\n }\n </ng-template>\n </cide-ele-dropdown>\n <div class=\"header-tooltip\">My Account</div>\n </div>\n </div>\n</header>","import { Injectable, signal, computed } from '@angular/core';\r\nimport { BehaviorSubject, interval } from 'rxjs';\r\n\r\nexport type UserStatus = 'online' | 'offline' | 'away' | 'busy' | 'do-not-disturb';\r\n\r\nexport interface UserStatusData {\r\n status: UserStatus;\r\n lastActive: Date;\r\n message?: string;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytUserStatusService {\r\n // Modern Angular Signals pattern\r\n private _userStatus = signal<UserStatusData>({\r\n status: 'online',\r\n lastActive: new Date(),\r\n message: undefined\r\n });\r\n\r\n // Public readonly access to status\r\n public readonly userStatus = this._userStatus.asReadonly();\r\n\r\n // Computed properties\r\n public readonly isOnline = computed(() => this._userStatus().status !== 'offline');\r\n public readonly statusColor = computed(() => this.getStatusColor(this._userStatus().status));\r\n public readonly statusText = computed(() => this.getStatusText(this._userStatus().status));\r\n\r\n // Legacy observable for compatibility\r\n private statusSubject = new BehaviorSubject<UserStatusData>(this._userStatus());\r\n public readonly status$ = this.statusSubject.asObservable();\r\n\r\n // Auto-away functionality\r\n private lastActivityTime = Date.now();\r\n private autoAwayTimeout = 5 * 60 * 1000; // 5 minutes\r\n private autoAwayEnabled = true;\r\n\r\n constructor() {\r\n this.initializeActivityTracking();\r\n this.startAutoAwayTimer();\r\n }\r\n\r\n /**\r\n * Sets the user status\r\n * @param status The new status to set\r\n * @param message Optional custom status message\r\n */\r\n setStatus(status: UserStatus, message?: string): void {\r\n const statusData: UserStatusData = {\r\n status,\r\n lastActive: new Date(),\r\n message\r\n };\r\n \r\n this._userStatus.set(statusData);\r\n this.statusSubject.next(statusData);\r\n this.lastActivityTime = Date.now();\r\n }\r\n\r\n /**\r\n * Marks user as active (resets away timer)\r\n */\r\n markUserActive(): void {\r\n this.lastActivityTime = Date.now();\r\n \r\n // If user was away, bring them back to online\r\n if (this._userStatus().status === 'away') {\r\n this.setStatus('online');\r\n }\r\n }\r\n\r\n /**\r\n * Gets CSS class for status color\r\n */\r\n private getStatusColor(status: UserStatus): string {\r\n switch (status) {\r\n case 'online': return 'tw-bg-green-500';\r\n case 'away': return 'tw-bg-yellow-500';\r\n case 'busy': return 'tw-bg-orange-500';\r\n case 'do-not-disturb': return 'tw-bg-red-500';\r\n case 'offline': return 'tw-bg-gray-400';\r\n default: return 'tw-bg-gray-400';\r\n }\r\n }\r\n\r\n /**\r\n * Gets human-readable status text\r\n */\r\n private getStatusText(status: UserStatus): string {\r\n const current = this._userStatus();\r\n const baseText = this.getBaseStatusText(status);\r\n \r\n return current.message ? `${baseText} - ${current.message}` : baseText;\r\n }\r\n\r\n private getBaseStatusText(status: UserStatus): string {\r\n switch (status) {\r\n case 'online': return 'Online';\r\n case 'away': return 'Away';\r\n case 'busy': return 'Busy';\r\n case 'do-not-disturb': return 'Do not disturb';\r\n case 'offline': return 'Offline';\r\n default: return 'Unknown';\r\n }\r\n }\r\n\r\n /**\r\n * Initialize activity tracking for auto-away\r\n */\r\n private initializeActivityTracking(): void {\r\n if (typeof window === 'undefined') return;\r\n\r\n const events = ['mousedown', 'mousemove', 'keypress', 'scroll', 'touchstart', 'click'];\r\n \r\n events.forEach(event => {\r\n document.addEventListener(event, () => {\r\n this.markUserActive();\r\n }, { passive: true });\r\n });\r\n }\r\n\r\n /**\r\n * Start the auto-away timer\r\n */\r\n private startAutoAwayTimer(): void {\r\n if (!this.autoAwayEnabled) return;\r\n\r\n interval(30000).subscribe({\r\n next: () => { // Check every 30 seconds\r\n const now = Date.now();\r\n const timeSinceActivity = now - this.lastActivityTime;\r\n \r\n if (timeSinceActivity > this.autoAwayTimeout && \r\n this._userStatus().status === 'online') {\r\n this.setStatus('away', 'Auto-away due to inactivity');\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Enable or disable auto-away functionality\r\n */\r\n setAutoAwayEnabled(enabled: boolean): void {\r\n this.autoAwayEnabled = enabled;\r\n }\r\n\r\n /**\r\n * Set the auto-away timeout (in milliseconds)\r\n */\r\n setAutoAwayTimeout(timeout: number): void {\r\n this.autoAwayTimeout = timeout;\r\n }\r\n} ","import { Component, ElementRef, HostListener, OnInit, inject, effect, ChangeDetectionStrategy, input, signal } from '@angular/core';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\nimport { menuResponseData } from 'cloud-ide-lms-model';\nimport { CommonModule } from '@angular/common';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { filter } from 'rxjs/operators';\nimport { CideLytSidebarService } from '../sidebar.service';\nimport {\n CideEleResizerDirective, CideIconComponent, CideInputComponent, TooltipDirective,\n CideSpinnerComponent, CideThemeService\n} from 'cloud-ide-element';\nimport { AppStateHelperService } from '../../../services/app-state';\nimport { CideLytUserStatusService, type UserStatus } from '../../../services/user-status/user-status.service';\n\n@Component({\n selector: 'cide-lyt-sidebar-wrapper',\n imports: [CideIconComponent, CideInputComponent, CommonModule, CideEleResizerDirective, TooltipDirective, CideSpinnerComponent],\n templateUrl: './sidebar-wrapper.component.html',\n styleUrls: ['./sidebar-wrapper.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('slideInOut', [\n state('in', style({\n opacity: 1,\n transform: 'translateY(0)',\n height: '*'\n })),\n state('out', style({\n opacity: 0,\n transform: 'translateY(-10px)',\n height: '0px'\n })),\n transition('in => out', animate('200ms ease-in')),\n transition('out => in', animate('200ms ease-out'))\n ]),\n trigger('notificationRemove', [\n state('visible', style({\n opacity: 1,\n transform: 'translateX(0)',\n height: '*',\n marginBottom: '*',\n padding: '*'\n })),\n state('removing', style({\n opacity: 0,\n transform: 'translateX(-100%)',\n height: '0px',\n marginBottom: '0px',\n padding: '0px',\n overflow: 'hidden'\n })),\n transition('visible => removing', animate('300ms ease-in-out')),\n transition('* => visible', animate('200ms ease-out'))\n ])\n ]\n})\nexport class CideLytSidebarWrapperComponent implements OnInit {\n public sidebarSetupData = {\n cide_lyt_sidebar_width: 0\n };\n\n isCollapsed = signal(false);\n darkMode = signal(false);\n showUserMenu = signal(false);\n showOptions = signal(false);\n showNotifications = signal(false);\n showNotificationsPanel = signal(false);\n searchText = signal('');\n isExpanded = signal(true);\n searchResults = signal<{ icon: string, title: string }[]>([]);\n \n // Notifications management\n notifications = signal<Array<{\n id: string;\n icon: string;\n title: string;\n message: string;\n time: string;\n unread: boolean;\n state: 'visible' | 'removing';\n }>>([\n {\n id: '1',\n icon: 'notifications',\n title: 'New feature available',\n message: 'Try our new analytics dashboard with improved visualizations.',\n time: 'Just now',\n unread: true,\n state: 'visible'\n },\n {\n id: '2',\n icon: 'person_add',\n title: 'New team member',\n message: 'Jane Smith has joined your team.',\n time: '2 hours ago',\n unread: false,\n state: 'visible'\n }\n ]);\n\n // Collapsed section states tracking\n collapsedSections: { [key: string]: boolean } = {\n 'company': false,\n 'account': false,\n 'advanced': false,\n 'recent': false\n };\n\n // Track expanded state for menu sections\n expandedSections = signal<{ [key: string]: boolean }>({});\n\n // For scroll-based animation\n animateSections = signal([false, false, false, false, false]);\n lastScrollTop = 0;\n scrolledPast = signal([false, false, false, false, false]);\n public core_system_menu = signal<menuResponseData[]>([]);\n public core_system_module = signal<menuResponseData[]>([]);\n\n // Track active state for enhanced visual effects\n activeModuleId: string = '';\n hoverModuleId: string = '';\n animateItems = signal(false);\n moduleLoadComplete = signal(false);\n menuLoadComplete = signal(false);\n loadingMenus = signal(false);\n\n // Add this getter to retrieve the menu tree for the selected module\n get selectedModuleMenus(): menuResponseData[] {\n return this.core_system_menu() || [];\n }\n\n /**\n * Gets the CSS classes for the user status indicator\n * Uses the injected user status service\n */\n getUserStatusClass(): string {\n return this.userStatusService.statusColor();\n }\n\n /**\n * Gets the tooltip text for the user status\n * Uses the injected user status service\n */\n getUserStatusText(): string {\n return this.userStatusService.statusText();\n }\n\n /**\n * Sets the user status (delegates to service)\n * @param status The new status to set\n * @param message Optional custom status message\n */\n setUserStatus(status: UserStatus, message?: string): void {\n this.userStatusService.setStatus(status, message);\n }\n\n /**\n * Gets the current user status data\n */\n get currentUserStatus() {\n return this.userStatusService.userStatus();\n }\n\n /**\n * Gets the icon for the currently active module\n * @returns The icon name for the active module or a default icon\n */\n getActiveModuleIcon(): string {\n if (this.core_system_module() && this.core_system_module().length > 0 && this.activeModuleId) {\n const activeModule = this.core_system_module().find(m => m._id === this.activeModuleId);\n return activeModule?.syme_icon || 'dashboard';\n }\n return 'dashboard';\n }\n\n // Add a click handler for menu navigation\n onMenuClick(menu: menuResponseData, event?: Event) {\n // Prevent event propagation to avoid triggering parent click handlers\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n \n if (menu.syme_path) {\n // Navigate without reloading the menu - just route navigation\n // The menu should not reload unless the module actually changes\n this.router.navigate([`/control-panel/${menu.syme_path}`]).catch(err => {\n console.error('Navigation error:', err);\n });\n }\n }\n\n /**\n * Toggle section expand/collapse state\n */\n toggleSection(sectionId: string): void {\n const map = { ...this.expandedSections() };\n map[sectionId] = !map[sectionId];\n this.expandedSections.set(map);\n console.log('📂 SIDEBAR: Section', sectionId, 'expanded:', this.expandedSections()[sectionId]);\n }\n\n /**\n * Check if section is expanded\n */\n isSectionExpanded(sectionId: string): boolean {\n return this.expandedSections()[sectionId] ?? true; // Default to expanded\n }\n\n private sidebarService = inject(CideLytSidebarService);\n private elementRef = inject(ElementRef);\n public appState = inject(AppStateHelperService);\n private router = inject(Router);\n protected userStatusService = inject(CideLytUserStatusService);\n private themeService = inject(CideThemeService);\n\n constructor() {\n // React to active module changes using signal effects\n effect(() => {\n const activeModule = this.appState.activeModule();\n if (activeModule) {\n // Only load menus if the module ID actually changed\n if (this.activeModuleId !== activeModule._id) {\n console.log('🔄 SIDEBAR: Active module changed from', this.activeModuleId, 'to', activeModule._id);\n // Update local state when active module changes\n this.activeModuleId = activeModule._id;\n // Load menus only when module actually changed\n this.loadMenusForModule(activeModule);\n } else {\n console.log('⏭️ SIDEBAR: Active module unchanged, skipping menu reload');\n }\n }\n });\n\n // Subscribe to router events to prevent unwanted module changes on navigation\n // Only listen to NavigationEnd events to avoid triggering on every navigation event\n this.router.events.pipe(\n filter(event => event instanceof NavigationEnd)\n ).subscribe((event: NavigationEnd) => {\n // Don't trigger module change on menu navigation - only on actual module selection\n // The active module should only change when user explicitly clicks a module icon\n console.log('📍 SIDEBAR: Navigation ended to', event.url, '- not changing active module');\n });\n }\n\n ngOnInit() {\n // Initialize dark mode from localStorage\n if (typeof document !== 'undefined' && typeof localStorage !== 'undefined') {\n const isDarkMode = localStorage.getItem('cide-dark-mode') === 'true';\n this.darkMode.set(isDarkMode);\n \n if (isDarkMode) {\n const root = document.documentElement;\n const body = document.body;\n root.setAttribute('data-theme', 'dark');\n root.classList.add('dark-mode');\n body.setAttribute('data-theme', 'dark');\n body.classList.add('dark-mode');\n }\n }\n\n // Modern ES2022+ pattern: Use Promise-based delays instead of nested setTimeout\n const initializeAnimations = async () => {\n await new Promise(resolve => setTimeout(resolve, 100));\n this.animateItems.set(true);\n await new Promise(resolve => setTimeout(resolve, 200));\n this.animateSections.set([true, true, true, true, true]);\n };\n initializeAnimations();\n\n // Get sidebar menu data with loading state tracking\n this.sidebarService?.getSidebarMenues({ syme_type: \"module\", sort: 'asc', syme_title: \"\" })?.subscribe({\n next: (res) => {\n this.core_system_module.set(res?.data || []);\n\n // Handle module initialization and active module setup\n if (this.core_system_module().length > 0) {\n const activeModule = this.appState.activeModule();\n console.log('🔍 SIDEBAR: Modules loaded. Current active module:', activeModule?.syme_title || 'none');\n console.log('📊 SIDEBAR: Available modules:', this.core_system_module().map(m => m.syme_title).join(', '));\n\n if (activeModule) {\n // Active module exists, verify it's in the loaded modules\n const foundModule = this.core_system_module().find(m => m._id === activeModule._id);\n if (foundModule) {\n console.log('✅ SIDEBAR: Active module found in loaded modules:', foundModule.syme_title);\n // The effect should have already triggered, but ensure menus are loaded\n if (this.core_system_menu().length === 0) {\n console.log('🔄 SIDEBAR: No menus loaded yet, triggering load for active module');\n this.loadMenusForModule(activeModule);\n }\n } else {\n console.log('⚠️ SIDEBAR: Active module not found in loaded modules, setting first as active');\n this.setActiveMenuByIndex(0);\n }\n } else {\n console.log('📌 SIDEBAR: No active module, setting first module as active');\n this.setActiveMenuByIndex(0);\n }\n }\n\n // Modern ES2022+ pattern: Use Promise-based delay\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\n delay(300).then(() => {\n this.moduleLoadComplete.set(true);\n });\n },\n error: (err) => {\n console.error('Error loading sidebar modules:', err);\n this.moduleLoadComplete.set(true); // Set to true even on error to ensure UI is responsive\n }\n });\n\n // collecte the width of the sidebar by using the style property\n const cide_lyt_stack_wrapper_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-stack-wrapper-width'));\n const cide_lyt_sidebar_menu_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-sidebar-menu-width'));\n\n this.sidebarSetupData.cide_lyt_sidebar_width = (cide_lyt_stack_wrapper_width + cide_lyt_sidebar_menu_width);\n }\n\n /**\n * Load menus for a specific module\n * @param module The module to load menus for\n */\n loadMenusForModule(module: menuResponseData): void {\n if (!module?._id) {\n console.warn('🚫 SIDEBAR: Cannot load menus - no module ID provided');\n return;\n }\n\n console.log('📂 SIDEBAR: Loading menus for module:', module.syme_title, 'ID:', module._id);\n this.loadingMenus.set(true);\n this.menuLoadComplete.set(false);\n\n // Fetch menus for the selected module\n this.sidebarService?.getSidebarMenues({\n syme_id: module._id,\n sort: 'asc'\n })?.subscribe({\n next: (res) => {\n const menus = res?.data || [];\n this.core_system_menu.set(menus);\n this.loadingMenus.set(false);\n\n console.log('✅ SIDEBAR: Loaded', menus, 'menus for module:', module.syme_title);\n console.log('📋 SIDEBAR: Menu titles:', menus.map(m => m.syme_title).join(', '));\n\n // Modern ES2022+ pattern: Use Promise-based delay\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\n delay(200).then(() => {\n this.menuLoadComplete.set(true);\n console.log('🎯 SIDEBAR: Menu loading complete for:', module.syme_title);\n });\n },\n error: (err) => {\n console.error('❌ SIDEBAR: Error loading menus for module:', module.syme_title, err);\n this.core_system_menu.set([]);\n this.loadingMenus.set(false);\n this.menuLoadComplete.set(true);\n }\n });\n }\n\n toggleSidebar() {\n this.isCollapsed.set(!this.isCollapsed());\n\n // Add animation class\n const sidebarElement = this.elementRef.nativeElement.querySelector('.cide-lyt-sidebar');\n sidebarElement.classList.add('animating');\n\n // Remove animation class after animation completes\n // Modern ES2022+ pattern: Use Promise-based delay\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\n delay(300).then(() => {\n sidebarElement.classList.remove('animating');\n });\n\n // this.sidebarService.toggleSidebar();\n }\n\n toggleUserMenu() {\n this.showUserMenu.set(!this.showUserMenu());\n // Close other menus if open\n if (this.showUserMenu()) {\n this.showOptions.set(false);\n this.showNotifications.set(false);\n }\n\n // Add subtle animation when opening menu\n if (this.showUserMenu()) {\n this.animateMenuOpen('user-menu');\n }\n }\n\n /**\n * Sets the active menu item with animation\n * @param moduleId The ID of the module to set as active\n * @param event Optional click event to prevent propagation\n */\n setActiveMenu(moduleId: string, event?: Event): void {\n // Prevent event propagation to avoid triggering unwanted side effects\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n if (this.activeModuleId === moduleId) return;\n\n // Set the active module in app state - the effect will handle local state updates\n const selectedModule = this.core_system_module().find((m: any) => m._id === moduleId);\n if (selectedModule) {\n this.appState.setActiveModule(selectedModule);\n // The effect will automatically update this.activeModuleId and load menus\n }\n\n // You could trigger custom animations here\n }\n\n /**\n * Sets the active menu item by index with animation\n * @param index The index of the menu item\n */\n setActiveMenuByIndex(index: number): void {\n const selectedModule = this.core_system_module()[index];\n if (selectedModule) {\n this.appState.setActiveModule(selectedModule);\n // The effect will automatically update this.activeModuleId and load menus\n }\n }\n\n /**\n * Public method to set active module by ID from external components\n * This is useful when you want to programmatically set the active module\n * @param moduleId The ID of the module to set as active\n * @returns boolean indicating if the module was found and set as active\n */\n public setActiveModuleById(moduleId: string): boolean {\n const module = this.core_system_module().find((m: any) => m._id === moduleId);\n if (module) {\n this.setActiveMenu(moduleId);\n return true;\n }\n console.warn(`Module with ID \"${moduleId}\" not found in sidebar modules`);\n return false;\n }\n\n /**\n * Public method to get the currently active module ID\n * @returns The ID of the currently active module, or empty string if none\n */\n public getActiveModuleId(): string {\n return this.activeModuleId;\n }\n\n /**\n * Tracks hover state for enhanced visual feedback\n * @param moduleId The ID of the hovered module, or empty string for none\n */\n onItemHover(moduleId: string): void {\n this.hoverModuleId = moduleId;\n }\n\n /**\n * Adds subtle animations when opening dropdown menus\n * @param menuId The ID of the menu element\n */\n animateMenuOpen(menuId: string): void {\n const menuElement = this.elementRef.nativeElement.querySelector(`.${menuId}`);\n if (!menuElement) return;\n\n // First set initial state\n menuElement.style.opacity = '0';\n menuElement.style.transform = 'translateY(-8px) scale(0.95)';\n\n // Then animate to final state\n setTimeout(() => {\n menuElement.style.transition = 'opacity 0.2s ease, transform 0.2s ease';\n menuElement.style.opacity = '1';\n menuElement.style.transform = 'translateY(0) scale(1)';\n }, 10);\n }\n\n /**\n * Updates tooltip position for more accurate placement\n * @param event MouseEvent from hovering\n * @param tooltip The tooltip element\n */\n updateTooltipPosition(event: MouseEvent, tooltipIndex: number): void {\n const tooltip = this.elementRef.nativeElement.querySelectorAll('.nav-tooltip')[tooltipIndex];\n if (!tooltip) return;\n\n // Get the vertical position of the cursor\n const cursorY = event.clientY;\n\n // Set the tooltip position to match the cursor Y position\n tooltip.style.top = `${cursorY}px`;\n\n // Add a slight animation\n tooltip.style.transition = 'opacity 0.2s ease, transform 0.2s ease';\n tooltip.style.transform = 'translateY(-50%)';\n }\n\n toggleNotificationsPanel() {\n this.showNotificationsPanel.set(!this.showNotificationsPanel());\n this.showNotifications.set(this.showNotificationsPanel());\n // Close other menus if open\n if (this.showNotificationsPanel()) {\n this.showUserMenu.set(false);\n this.showOptions.set(false);\n }\n\n // Add animation when opening panel\n if (this.showNotificationsPanel()) {\n this.animateMenuOpen('notifications-panel');\n }\n }\n\n toggleTheme() {\n // Use the CIDE Element Library theme service for theme management\n // The service handles DOM manipulation, localStorage, and theme application\n this.themeService.toggleTheme();\n // Update local darkMode signal\n this.darkMode.set(this.themeService.isDarkMode());\n }\n\n toggleOptions() {\n this.showOptions.set(!this.showOptions());\n // Close other menus if open\n if (this.showOptions()) {\n this.showUserMenu.set(false);\n this.showNotifications.set(false);\n }\n\n // Add subtle animation when opening menu\n if (this.showOptions()) {\n this.animateMenuOpen('options-menu');\n }\n }\n\n /**\n * Toggle old-style collapsed sections (for backwards compatibility)\n */\n toggleCollapsedSection(section: string) {\n this.collapsedSections[section] = !this.collapsedSections[section];\n }\n\n isSectionCollapsed(section: string): boolean {\n return this.collapsedSections[section];\n }\n\n onSearchTextChange(value: any): void {\n this.searchText.set(String(value || ''));\n }\n\n onSearch() {\n // Reset animation trigger when searching\n this.resetAnimations();\n\n // Mock search functionality - would be integrated with actual search service\n if (this.searchText().trim() === '') {\n this.searchResults.set([]);\n return;\n }\n\n // Example search results - would come from actual data source\n const allItems = [\n { icon: 'settings', title: 'General Settings' },\n { icon: 'payments', title: 'Billing & Payments' },\n { icon: 'shield', title: 'Security Settings' },\n { icon: 'person', title: 'Profile Settings' },\n { icon: 'notifications', title: 'Notification Preferences' },\n { icon: 'integration_instructions', title: 'API Integrations' },\n { icon: 'key', title: 'API Keys' },\n { icon: 'groups', title: 'Team Members' },\n { icon: 'devices', title: 'Connected Devices' },\n { icon: 'language', title: 'Language Settings' },\n ];\n\n // Simple text search on title\n this.searchResults.set(\n allItems.filter(item => item.title.toLowerCase().includes(this.searchText().toLowerCase()))\n );\n }\n\n onScroll(event: Event) {\n const scrollTop = (event.target as HTMLElement).scrollTop;\n const sections = this.elementRef.nativeElement.querySelectorAll('.sidebar-section');\n\n // Reset animations if scrolling back to top\n if (scrollTop < 10) {\n this.resetAnimations();\n return;\n }\n\n // Animate sections as they come into view\n const animateArr = [...this.animateSections()];\n const scrolledArr = [...this.scrolledPast()];\n sections.forEach((section: HTMLElement, index: number) => {\n if (index >= animateArr.length) return;\n\n const sectionTop = section.offsetTop;\n const scrollPosition = scrollTop + 300; // Offset to trigger animation before fully visible\n\n // When scrolling down and section comes into view\n if (scrollPosition > sectionTop && !scrolledArr[index] && scrollTop > this.lastScrollTop) {\n animateArr[index] = true;\n scrolledArr[index] = true;\n }\n\n // When scrolling up to top, reset animation\n if (scrollTop < 50 && this.lastScrollTop > scrollTop) {\n this.resetAnimations();\n }\n });\n\n this.animateSections.set(animateArr);\n this.scrolledPast.set(scrolledArr);\n this.lastScrollTop = scrollTop;\n }\n\n resetAnimations() {\n this.animateSections.set([false, false, false, false, false]);\n this.scrolledPast.set([false, false, false, false, false]);\n\n // Re-trigger animations\n setTimeout(() => {\n this.animateSections.set([true, true, true, true, true]);\n }, 50);\n }\n\n /**\n * Remove notification with animation\n * @param notificationId The ID of the notification to remove\n */\n removeNotification(notificationId: string): void {\n const notifications = this.notifications();\n const notification = notifications.find(n => n.id === notificationId);\n \n if (!notification) return;\n \n // Set state to 'removing' to trigger animation\n const updatedNotifications = notifications.map(n => \n n.id === notificationId ? { ...n, state: 'removing' as const } : n\n );\n this.notifications.set(updatedNotifications);\n \n // Remove from list after animation completes\n setTimeout(() => {\n const finalNotifications = this.notifications().filter(n => n.id !== notificationId);\n this.notifications.set(finalNotifications);\n }, 300); // Match animation duration\n }\n\n /**\n * Mark all notifications as read\n */\n markAllAsRead(): void {\n const notifications = this.notifications().map(n => ({ ...n, unread: false }));\n this.notifications.set(notifications);\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent) {\n // Close dropdown menus when clicking outside\n const clickedInside = this.elementRef.nativeElement.contains(event.target);\n if (!clickedInside) {\n this.showUserMenu.set(false);\n this.showOptions.set(false);\n }\n }\n}\n","<nav class=\"cide-lyt-sidebar tw-flex tw-h-full tw-select-none\" [class.collapsed]=\"isCollapsed()\">\n <!-- First tier sidebar (Icon only) -->\n <div class=\"cide-lyt-stack tw-h-full tw-flex tw-flex-col tw-items-center tw-border-r tw-border-gray-100\">\n <!-- Scrollable content -->\n <div class=\"sidebar-scroll-content\">\n <!-- Collapse/Expand toggle -->\n <div class=\"nav-item collapse-toggle\" tabindex=\"0\" (click)=\"toggleSidebar()\"\n (keydown.enter)=\"toggleSidebar()\">\n <div class=\"nav-tooltip\">{{isCollapsed() ? 'Expand' : 'Collapse'}} Sidebar</div>\n <cide-ele-icon size=\"xs\" type=\"box\" class=\"tw-text-gray-500 hover:tw-text-gray-700\">\n {{isCollapsed() ? 'chevron_right' : 'chevron_left'}}\n </cide-ele-icon>\n </div> <!-- Main navigation icons - Enhanced Design -->\n <div class=\"tw-flex tw-flex-col tw-gap-4\">\n @for (core_system_module_item of core_system_module(); track $index) {\n <div class=\"nav-item tw-relative tw-group\" (click)=\"setActiveMenu(core_system_module_item._id, $event)\"\n [cideEleTooltip]=\"core_system_module_item.syme_title\" [tooltipShowArrow]=\"true\"\n tooltipPlacement=\"right\"\n [ngClass]=\"{'nav-item-active': activeModuleId === core_system_module_item._id}\"\n (mouseenter)=\"onItemHover(core_system_module_item._id)\" (mouseleave)=\"onItemHover('')\"\n [tabindex]=\"$index.toString()\" (keydown.enter)=\"setActiveMenu(core_system_module_item._id, $event)\">\n\n <!-- Notification Badge with enhanced design -->\n @if (core_system_module_item?.syme_ping) {\n <div class=\"nav-badge tw-absolute -tw-top-1 -tw-right-1 tw-w-1.5 tw-h-1.5 tw-rounded-full tw-animate-ping\"\n style=\"background-color: var(--cide-theme-error-color);\">\n </div>\n }\n\n <!-- Enhanced icon with better visual effects -->\n <div\n class=\"tw-p-2 tw-rounded-xl tw-transition-all tw-duration-200 tw-ease-in-out\n group-hover:tw-bg-blue-50 group-hover:tw-shadow-md group-hover:tw-scale-105\n tw-border-2 tw-border-transparent\n {{activeModuleId === core_system_module_item._id ? 'tw-bg-blue-100 tw-border-blue-200 tw-shadow-sm' : 'tw-bg-gray-50'}}\">\n <cide-ele-icon type=\"box\" size=\"xs\"\n class=\"tw-transition-all tw-duration-200 tw-ease-in-out\n {{activeModuleId === core_system_module_item._id ? 'tw-text-blue-600' : 'tw-text-gray-600 group-hover:tw-text-blue-500'}}\">\n {{core_system_module_item?.syme_icon || 'dashboard'}}\n </cide-ele-icon>\n </div>\n\n <!-- Modern active indicator -->\n @if (activeModuleId === core_system_module_item._id) {\n <div\n class=\"nav-indicator tw-absolute tw-left-0 tw-top-1/2 tw-transform -tw-translate-y-1/2 tw-w-1 tw-h-8 tw-bg-blue-500 tw-rounded-r-full tw-shadow-lg tw-transition-all tw-duration-300\">\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div> <!-- Second tier sidebar (Expanded view) -->\n <div class=\"cide-lyt-sidebar-menu tw-h-full tw-overflow-hidden tw-shadow-sm\">\n <div class=\"tw-flex tw-flex-col tw-h-full\">\n <!-- Header section with search and options -->\n <div class=\"sidebar-header tw-p-2.5 tw-border-b tw-border-gray-100\">\n <!-- Title with back button - Clean layout without online indicator -->\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mb-2.5\">\n <button\n class=\"back-button tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100 hover:tw-text-gray-700 tw-transition-colors tw-flex-shrink-0\"\n [cideEleTooltip]=\"'Back to home'\" tooltipPlacement=\"bottom\">\n <cide-ele-icon type=\"none\" size=\"xs\" class=\"tw-transition-transform hover:tw-scale-110\">{{\n getActiveModuleIcon() }}</cide-ele-icon>\n </button>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <h2 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-leading-5\">\n {{ appState.getActiveModuleTitle() || 'Menu' }}\n </h2>\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-mt-0.5\">\n Module Dashboard\n </p>\n </div>\n </div>\n\n <!-- Search and options -->\n <div class=\"tw-flex tw-items-center tw-justify-between\">\n <div class=\"search-wrapper tw-relative tw-flex-1\">\n <cide-ele-input type=\"text\" leadingIcon=\"search\" size=\"xs\" placeholder=\"Search settings...\"\n [clearInput]=\"true\" [ngModel]=\"searchText()\" (ngModelChange)=\"onSearchTextChange($event)\" (input)=\"onSearch()\">\n </cide-ele-input>\n <div\n class=\"search-shortcut tw-absolute tw-right-3 tw-top-1/2 -tw-translate-y-1/2 tw-bg-gray-100 tw-text-gray-500 tw-rounded tw-px-1.5 tw-py-0.5 tw-text-xs\">\n ⌘K</div>\n </div>\n <button\n class=\"tw-ml-2 tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100 hover:tw-text-gray-700 tw-transition-colors\"\n (click)=\"toggleOptions()\">\n <cide-ele-icon type=\"none\" size=\"xs\">more_vert</cide-ele-icon>\n </button>\n\n <!-- Options dropdown menu -->\n <div *ngIf=\"showOptions()\"\n class=\"options-menu tw-absolute tw-right-4 tw-top-16 tw-mt-2 tw-w-48 tw-rounded-md tw-shadow-lg tw-bg-white tw-ring-1 tw-ring-black tw-ring-opacity-5 tw-divide-y tw-divide-gray-100 tw-z-10\">\n <div class=\"tw-py-1\">\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">refresh</cide-ele-icon>\n Refresh\n </a>\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">sync</cide-ele-icon>\n Sync settings\n </a>\n </div>\n <div class=\"tw-py-1\">\n <a href=\"#\"\n class=\"tw-group tw-flex tw-items-center tw-px-4 tw-py-2 tw-text-sm tw-text-gray-700 hover:tw-bg-gray-100\">\n <cide-ele-icon class=\"tw-mr-3 tw-text-gray-500 tw-group-hover:tw-text-gray-600\"\n type=\"none\" size=\"xs\">help_outline</cide-ele-icon>\n Help & support\n </a>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Menu items with categories -->\n <div class=\"sidebar-content tw-overflow-y-auto tw-flex-1\" (scroll)=\"onScroll($event)\">\n <!-- Search results if searching -->\n <div *ngIf=\"searchText()\" class=\"sidebar-section tw-p-2.5\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-2\">\n <h3 class=\"tw-text-xs tw-font-semibold tw-text-gray-500\">SEARCH RESULTS</h3>\n <span class=\"tw-text-xs tw-text-gray-500\">{{searchResults().length}} items</span>\n </div>\n\n <div *ngIf=\"searchResults().length > 0\" class=\"tw-space-y-1\">\n <a *ngFor=\"let item of searchResults()\" href=\"#\"\n class=\"menu-item tw-flex tw-items-center tw-px-2 tw-py-1.5 tw-rounded-md hover:tw-bg-gray-50\">\n <cide-ele-icon class=\"tw-mr-2 tw-text-gray-500\" type=\"none\"\n size=\"xs\">{{item.icon}}</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-700\">{{item.title}}</span>\n </a>\n </div>\n\n <div *ngIf=\"searchResults().length === 0\" class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-icon class=\"tw-text-gray-400\" type=\"none\" size=\"md\">search_off</cide-ele-icon>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">No results for \"{{searchText()}}\"</p>\n <p class=\"tw-text-xs tw-text-gray-400 tw-mt-1\">Try another search term</p>\n </div>\n </div>\n\n <!-- Only show these sections if not searching -->\n <ng-container *ngIf=\"!searchText()\">\n <!-- Loading state -->\n <div *ngIf=\"loadingMenus()\" class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-spinner variant=\"circle\" size=\"xs\"></cide-ele-spinner>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">Loading menus...</p>\n </div>\n\n <!-- Dynamic menu tree -->\n <div *ngIf=\"!loadingMenus() && menuLoadComplete()\" class=\"sidebar-section tw-p-2.5\"\n [class.animate-in]=\"animateSections()[0]\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: selectedModuleMenus, level: 0}\"></ng-container>\n </div>\n\n <!-- Empty state -->\n <div *ngIf=\"!loadingMenus() && menuLoadComplete() && selectedModuleMenus.length === 0\"\n class=\"tw-p-4 tw-text-center\">\n <div class=\"tw-flex tw-justify-center tw-mb-3\">\n <cide-ele-icon class=\"tw-text-gray-400\" type=\"none\" size=\"md\">folder_open</cide-ele-icon>\n </div>\n <p class=\"tw-text-sm tw-text-gray-500\">No menus available</p>\n <p class=\"tw-text-xs tw-text-gray-400 tw-mt-1\">Select a module to view its menus</p>\n </div>\n </ng-container>\n\n <!-- Recursive menu template -->\n <ng-template #recursiveMenu let-menus let-level=\"level\">\n <div [class.tw-ml-0]=\"level > 0\">\n <div *ngFor=\"let menu of menus\" class=\"tw-mb-2\">\n <!-- Title type items (section headers) -->\n <div *ngIf=\"menu.syme_type === 'title'\" class=\"tw-mb-1.5\">\n <h3 class=\"tw-text-[10px] tw-font-medium tw-text-gray-400 tw-uppercase tw-mb-1 tw-tracking-wider\">{{\n menu.syme_title }}</h3>\n <!-- Render children of title -->\n <ng-container *ngIf=\"menu.children && menu.children.length > 0\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </ng-container>\n </div>\n\n <!-- Section type items (collapsible sections) -->\n <div *ngIf=\"menu.syme_type === 'section'\" class=\"tw-mb-2\">\n <!-- Section header (clickable to expand/collapse) -->\n <button (click)=\"toggleSection(menu._id)\" (keydown.enter)=\"toggleSection(menu._id)\"\n (keydown.space)=\"toggleSection(menu._id)\"\n class=\"section-header tw-w-full tw-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-md hover:tw-bg-gray-50 tw-cursor-pointer tw-transition-colors tw-text-left\"\n [class.tw-bg-blue-50]=\"isSectionExpanded(menu._id)\" type=\"button\" tabindex=\"0\"\n role=\"button\" [attr.aria-expanded]=\"isSectionExpanded(menu._id)\"\n [attr.aria-label]=\"'Toggle ' + menu.syme_title + ' section'\">\n\n <!-- Section Icon (left side, like other menu items) -->\n <cide-ele-icon class=\"tw-mr-1.5 tw-text-gray-400\" type=\"none\" size=\"2xs\">{{\n menu.syme_icon || 'folder' }}</cide-ele-icon>\n\n <!-- Section Title -->\n <span class=\"tw-text-xs tw-font-medium tw-text-gray-700\">{{ menu.syme_title\n }}</span>\n\n <!-- Right side icons container -->\n <div class=\"tw-ml-auto tw-flex tw-items-center tw-space-x-1.5\">\n <!-- Child Count Badge -->\n <span *ngIf=\"menu.children && menu.children.length > 0\"\n class=\"tw-px-1.5 tw-py-0.5 tw-bg-gray-200 tw-text-gray-500 tw-rounded-full tw-text-[10px] tw-font-medium\">\n {{ menu.children.length }}\n </span>\n\n <!-- Expand/Collapse Icon (right side) -->\n <cide-ele-icon class=\"tw-text-gray-400 tw-transition-transform tw-duration-200\"\n [class.tw-rotate-90]=\"isSectionExpanded(menu._id)\" type=\"none\"\n size=\"2xs\">chevron_right</cide-ele-icon>\n </div>\n </button>\n\n <!-- Section Content (collapsible) -->\n <div *ngIf=\"isSectionExpanded(menu._id) && menu.children && menu.children.length > 0\"\n class=\"section-content tw-mt-1 tw-ml-2 tw-border-l tw-border-gray-200 tw-pl-2.5\"\n [@slideInOut]=\"isSectionExpanded(menu._id) ? 'in' : 'out'\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </div>\n </div>\n\n <!-- Menu type items (clickable links) -->\n <a *ngIf=\"menu.syme_type === 'menu'\" (click)=\"onMenuClick(menu, $event)\"\n (keydown.enter)=\"onMenuClick(menu, $event)\" (keydown.space)=\"onMenuClick(menu, $event)\" tabindex=\"0\"\n role=\"button\"\n class=\"menu-item tw-flex tw-items-center tw-px-2 tw-py-1.5 tw-rounded-md hover:tw-bg-gray-50 tw-cursor-pointer tw-transition-colors\">\n <cide-ele-icon *ngIf=\"menu.syme_icon\" class=\"tw-mr-2 tw-text-gray-500\" type=\"none\"\n size=\"xs\">{{ menu.syme_icon }}</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-700\">{{ menu.syme_title }}</span>\n <cide-ele-icon *ngIf=\"menu.children && menu.children.length > 0\"\n class=\"tw-ml-auto tw-text-gray-400\" type=\"none\"\n size=\"2xs\">chevron_right</cide-ele-icon>\n </a>\n\n <!-- Render nested children for menu items -->\n <ng-container\n *ngIf=\"menu.syme_type === 'menu' && menu.children && menu.children.length > 0\">\n <ng-container\n *ngTemplateOutlet=\"recursiveMenu; context: {$implicit: menu.children, level: level + 1}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </ng-template>\n </div>\n\n <!-- Notification panel (overlays content when shown) -->\n <div *ngIf=\"showNotifications()\" class=\"notification-panel tw-absolute tw-inset-0 tw-bg-white tw-z-20\">\n <div class=\"tw-p-4 tw-border-b tw-border-gray-100 tw-flex tw-justify-between tw-items-center\">\n <h3 class=\"tw-text-sm tw-font-medium\">Notifications</h3>\n <button class=\"tw-p-1.5 tw-rounded-lg tw-text-gray-500 hover:tw-bg-gray-100\"\n (click)=\"toggleNotificationsPanel()\">\n <cide-ele-icon type=\"none\" size=\"xs\">close</cide-ele-icon>\n </button>\n </div>\n\n <div class=\"tw-p-4\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-mb-4\">\n <div class=\"tw-text-xs tw-text-gray-500\">Today</div>\n <button class=\"tw-text-xs tw-text-blue-500 hover:tw-text-blue-600\" (click)=\"markAllAsRead()\">Mark all as read</button>\n </div>\n\n <div class=\"tw-space-y-3\">\n @for (notification of notifications(); track notification.id) {\n <div \n [@notificationRemove]=\"notification.state\"\n class=\"notification-item tw-p-3 tw-rounded-lg tw-border-l-4 tw-relative tw-group\"\n [class.tw-border-blue-500]=\"notification.unread\"\n [class.tw-border-transparent]=\"!notification.unread\"\n [class.tw-bg-blue-50]=\"notification.unread\">\n <div class=\"tw-flex tw-gap-3\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-full tw-flex tw-items-center tw-justify-center\"\n [class.tw-bg-blue-100]=\"notification.unread\"\n [class.tw-bg-gray-100]=\"!notification.unread\"\n [class.tw-text-blue-500]=\"notification.unread\"\n [class.tw-text-gray-500]=\"!notification.unread\">\n <cide-ele-icon type=\"none\" size=\"xs\">{{ notification.icon }}</cide-ele-icon>\n </div>\n <div class=\"tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900\">{{ notification.title }}</div>\n <div class=\"tw-text-xs tw-text-gray-500 tw-mt-1\">{{ notification.message }}</div>\n <div class=\"tw-text-xs tw-text-gray-400 tw-mt-2\">{{ notification.time }}</div>\n </div>\n <button \n class=\"tw-opacity-0 group-hover:tw-opacity-100 tw-transition-opacity tw-p-1 tw-rounded hover:tw-bg-gray-200 tw-text-gray-500 hover:tw-text-gray-700\"\n (click)=\"removeNotification(notification.id)\"\n title=\"Remove notification\">\n <cide-ele-icon type=\"none\" size=\"xs\">close</cide-ele-icon>\n </button>\n </div>\n </div>\n }\n @if (notifications().length === 0) {\n <div class=\"tw-p-8 tw-text-center\">\n <cide-ele-icon class=\"tw-text-gray-400 tw-mb-2\" type=\"none\" size=\"md\">notifications_none</cide-ele-icon>\n <p class=\"tw-text-sm tw-text-gray-500\">No notifications</p>\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Storage info at bottom -->\n <div class=\"sidebar-footer tw-p-2 tw-border-t tw-border-gray-100\">\n <!-- for info display -->\n </div>\n </div>\n </div>\n\n <!-- Resizer -->\n <div parentElementSelector=\"#cide-lyt-sidebar-page-inner-wrapper\"\n [minPrevSize]=\"sidebarSetupData.cide_lyt_sidebar_width\" prevElementSelector=\"#cide-lyt-sidebar-page\"\n nextElementSelector=\"#cide-lyt-page-wrapper\" cideEleResizer direction=\"horizontal\">\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\n </div>\n</nav>","import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router';\nimport { ComponentRef, ViewContainerRef } from '@angular/core';\n\n/**\n * A custom route reuse strategy that allows storing and retrieving routes\n * to persist component state, especially for tabbed navigation.\n */\nexport class CustomRouteReuseStrategy implements RouteReuseStrategy {\n private storedRoutes: { [key: string]: DetachedRouteHandle } = {};\n\n // Generates a unique key for a route.\n // For routes marked with 'reuseTab', this key includes sorted query parameters\n // to ensure distinct states for tabs differing by query params.\n private getPathKey(route: ActivatedRouteSnapshot): string {\n let path = route.pathFromRoot\n .map(r => r.url.map(segment => segment.path).join('/'))\n .filter(p => p.length > 0)\n .join('/');\n\n // If the route is marked for tab reuse and has query parameters,\n // append them to the key in a sorted, consistent manner.\n if (route.data && route.data['reuseTab'] && route.queryParamMap.keys.length > 0) {\n const queryParams = route.queryParamMap.keys\n .sort() // Ensure consistent order of query parameters\n .map(key => `${key}=${route.queryParamMap.get(key)}`)\n .join('&');\n path += '?' + queryParams;\n }\n return path;\n }\n\n // Determines if this route (and its subtree) should be detached to be reused later.\n shouldDetach(route: ActivatedRouteSnapshot): boolean {\n return !!(route.data && route.data['reuseTab']);\n }\n\n // Stores the detached route.\n store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle | null): void {\n const pathKey = this.getPathKey(route);\n if (handle && route.data && route.data['reuseTab'] && pathKey) {\n this.storedRoutes[pathKey] = handle;\n }\n }\n\n // Determines if this route (and its subtree) should be reattached.\n shouldAttach(route: ActivatedRouteSnapshot): boolean {\n const pathKey = this.getPathKey(route);\n return !!pathKey && !!this.storedRoutes[pathKey];\n }\n\n // Retrieves the previously stored route.\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n const pathKey = this.getPathKey(route);\n if (!pathKey || !this.storedRoutes[pathKey]) {\n return null;\n }\n \n const handle = this.storedRoutes[pathKey];\n \n // Verify the handle is still valid (not destroyed)\n // If the component was destroyed, remove it from stored routes\n if (handle && typeof handle === 'object') {\n const handleAny = handle as any;\n // Check if ComponentRef is destroyed\n if (handleAny.destroyed === true || (handleAny.hostView && handleAny.hostView.destroyed)) {\n console.log(`⚠️ Stored route handle for ${pathKey} is already destroyed, removing from cache`);\n delete this.storedRoutes[pathKey];\n return null;\n }\n }\n \n return handle;\n }\n\n // Determines if a route should be reused.\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n return future.routeConfig === curr.routeConfig;\n }\n\n // Clears a stored route, typically when a tab is closed.\n // This method now properly destroys the component instance to prevent memory leaks\n // and ensure old data doesn't persist when reopening the same route.\n public clearStoredRoute(pathKey: string): void {\n const handle = this.storedRoutes[pathKey];\n if (handle) {\n // Properly destroy the component instance to prevent memory leaks\n // and ensure clean state when the route is reopened\n try {\n // In Angular, DetachedRouteHandle is typically a ComponentRef\n // We need to destroy it to remove the component from DOM and clean up resources\n \n // Method 1: Check if handle is a ComponentRef directly\n if (handle && typeof (handle as any).destroy === 'function') {\n const componentRef = handle as ComponentRef<any>;\n // Verify it has hostView (ComponentRef signature)\n if ((componentRef as any).hostView || (componentRef as any).location) {\n console.log(`🗑️ Destroying component instance (ComponentRef) for route: ${pathKey}`);\n componentRef.destroy();\n }\n }\n \n // Method 2: Check if handle is a ViewContainerRef\n if (handle && typeof (handle as any).clear === 'function' && typeof (handle as any).length === 'number') {\n const viewContainerRef = handle as ViewContainerRef;\n console.log(`🗑️ Clearing view container for route: ${pathKey}`);\n viewContainerRef.clear();\n }\n \n // Method 3: Check if handle is an object with nested ComponentRef\n if (handle && typeof handle === 'object' && !(handle instanceof ComponentRef) && !(handle instanceof ViewContainerRef)) {\n const handleObj = handle as any;\n \n // Try to find and destroy ComponentRef from various possible properties\n let componentRef: ComponentRef<any> | null = null;\n \n // Check common property names\n if (handleObj.componentRef && typeof handleObj.componentRef.destroy === 'function') {\n componentRef = handleObj.componentRef;\n } else if (handleObj.component && typeof handleObj.component.destroy === 'function') {\n componentRef = handleObj.component;\n } else if (handleObj.context && typeof handleObj.context.destroy === 'function') {\n componentRef = handleObj.context;\n } else if (handleObj._componentRef && typeof handleObj._componentRef.destroy === 'function') {\n componentRef = handleObj._componentRef;\n }\n \n if (componentRef) {\n console.log(`🗑️ Destroying component instance from handle object for route: ${pathKey}`);\n componentRef.destroy();\n }\n \n // Also try to clear view container if it exists\n if (handleObj.viewContainerRef && typeof handleObj.viewContainerRef.clear === 'function') {\n console.log(`🗑️ Clearing view container from handle object for route: ${pathKey}`);\n handleObj.viewContainerRef.clear();\n }\n \n // Try to destroy any nested components\n if (handleObj.components && Array.isArray(handleObj.components)) {\n handleObj.components.forEach((comp: any, index: number) => {\n if (comp && typeof comp.destroy === 'function') {\n console.log(`🗑️ Destroying nested component ${index} for route: ${pathKey}`);\n comp.destroy();\n }\n });\n }\n }\n } catch (error) {\n console.warn(`⚠️ Error destroying route handle for ${pathKey}:`, error);\n }\n \n // Remove from stored routes - this ensures shouldAttach will return false for this route\n delete this.storedRoutes[pathKey];\n console.log(`✅ Cleared stored route: ${pathKey} (removed from storedRoutes map)`);\n } else {\n console.log(`ℹ️ No stored route found for: ${pathKey}`);\n }\n }\n\n // Clears all stored routes (useful for cleanup)\n public clearAllStoredRoutes(): void {\n Object.keys(this.storedRoutes).forEach(pathKey => {\n this.clearStoredRoute(pathKey);\n });\n }\n\n // Gets the count of stored routes (useful for debugging)\n public getStoredRoutesCount(): number {\n return Object.keys(this.storedRoutes).length;\n }\n}","import { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, Observable } from 'rxjs';\r\nimport { distinctUntilChanged, map } from 'rxjs/operators';\r\nimport { merge } from 'lodash';\r\n\r\n/**\r\n * Defines the shape of the state for components that need to persist\r\n * data on a per-tab basis. Using Partial<> for flexibility.\r\n */\r\nexport interface PerTabState {\r\n sideDrawer?: {\r\n isOpen: boolean;\r\n activeComponent: string | null;\r\n componentState?: { [componentKey: string]: unknown };\r\n };\r\n footer?: {\r\n someData?: string;\r\n };\r\n console?: {\r\n history: string[];\r\n };\r\n}\r\n\r\n/**\r\n * Represents the entire state for a single tab, including its metadata\r\n * and the state of various components.\r\n */\r\nexport interface TabState {\r\n id: string;\r\n title: string;\r\n componentState: PerTabState;\r\n}\r\n\r\n/**\r\n * Creates the default state for a new tab.\r\n */\r\nconst createDefaultComponentState = (): PerTabState => ({\r\n sideDrawer: { isOpen: false, activeComponent: null, componentState: {} },\r\n footer: { someData: '' },\r\n console: { history: [] },\r\n});\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class TabStateService {\r\n // Holds the state for all open tabs, keyed by tab ID.\r\n private readonly _tabsState = new BehaviorSubject<Map<string, TabState>>(new Map());\r\n\r\n // Holds the ID of the currently active tab.\r\n private readonly _activeTabId = new BehaviorSubject<string | null>(null);\r\n\r\n /** An observable of all open tabs. */\r\n public readonly tabs$: Observable<TabState[]> = this._tabsState.pipe(\r\n map(tabsMap => Array.from(tabsMap.values()))\r\n );\r\n\r\n /** An observable of the currently active tab's ID. */\r\n public readonly activeTabId$ = this._activeTabId.asObservable().pipe(distinctUntilChanged());\r\n\r\n /** An observable of the state of the currently active tab. */\r\n public readonly activeTabState$: Observable<TabState | null> = this.activeTabId$.pipe(\r\n map(activeId => (activeId ? this._tabsState.getValue().get(activeId) ?? null : null)),\r\n // Use a deep-ish comparison to prevent emissions when only the object reference changes\r\n distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr))\r\n );\r\n\r\n /** An observable of just the component-specific state for the active tab. */\r\n public readonly activeComponentState$: Observable<PerTabState | null> = this.activeTabState$.pipe(\r\n map(activeTab => activeTab?.componentState ?? null)\r\n );\r\n\r\n /**\r\n * Adds a new tab to the state.\r\n * @param title The title for the new tab.\r\n * @param id An optional unique ID. If not provided, one will be generated.\r\n * @returns The ID of the newly created tab.\r\n */\r\n public addTab(title: string, id?: string): string {\r\n const newTabId = id || `tab_${Date.now()}_${Math.random()}`;\r\n const newTab: TabState = {\r\n id: newTabId,\r\n title,\r\n componentState: createDefaultComponentState(),\r\n };\r\n\r\n const currentTabs = this._tabsState.getValue();\r\n const newTabs = new Map(currentTabs).set(newTabId, newTab);\r\n this._tabsState.next(newTabs);\r\n this.setActiveTab(newTabId);\r\n\r\n return newTabId;\r\n }\r\n\r\n /**\r\n * Removes a tab from the state.\r\n * @param tabIdToRemove The ID of the tab to remove.\r\n */\r\n public removeTab(tabIdToRemove: string): void {\r\n const currentTabs = this._tabsState.getValue();\r\n if (!currentTabs.has(tabIdToRemove)) {\r\n return;\r\n }\r\n\r\n const newTabs = new Map(currentTabs);\r\n newTabs.delete(tabIdToRemove);\r\n this._tabsState.next(newTabs);\r\n }\r\n\r\n constructor() {\r\n // You can initialize with default tabs if needed\r\n // For example:\r\n // this.addTab('Welcome Tab');\r\n }\r\n\r\n /**\r\n * Sets the currently active tab.\r\n * @param tabId The unique identifier of the tab to activate.\r\n */\r\n public setActiveTab(tabId: string | null): void {\r\n if (this._activeTabId.getValue() !== tabId) {\r\n this._activeTabId.next(tabId);\r\n }\r\n }\r\n\r\n /**\r\n * Updates the state for the currently active tab.\r\n * This performs a deep merge to avoid overwriting nested state.\r\n * @param partialState The partial state to update for the active tab.\r\n */\r\n public updateActiveTabState(partialState: Partial<PerTabState>): void {\r\n const activeId = this._activeTabId.getValue();\r\n if (!activeId) {\r\n console.warn('Cannot update state, no active tab.');\r\n return;\r\n }\r\n\r\n const tabs = this._tabsState.getValue();\r\n const activeTabState = tabs.get(activeId);\r\n\r\n if (activeTabState) {\r\n // Use lodash merge for a deep merge\r\n const updatedState = merge({}, activeTabState, { componentState: partialState });\r\n const newTabsState = new Map(tabs);\r\n newTabsState.set(activeId, updatedState);\r\n this._tabsState.next(newTabsState);\r\n }\r\n }\r\n\r\n /**\r\n * Gets an observable for a specific tab's state.\r\n * @param tabId The ID of the tab to observe.\r\n */\r\n public getTabState(tabId: string): Observable<TabState | undefined> {\r\n return this._tabsState.pipe(map(tabs => tabs.get(tabId)));\r\n }\r\n\r\n /**\r\n * Determines the ID of the next tab to activate when a tab is closed.\r\n * @param idToRemove The ID of the tab being removed.\r\n * @returns The ID of the next tab to activate, or null if no tabs are left.\r\n */\r\n private getNextActiveTabId(idToRemove: string): string | null {\r\n const tabsMap = this._tabsState.getValue();\r\n if (tabsMap.size <= 1) {\r\n return null;\r\n }\r\n\r\n const tabIds = Array.from(tabsMap.keys());\r\n const removedIndex = tabIds.indexOf(idToRemove);\r\n\r\n // If it's the last tab in the list, activate the one before it. Otherwise, activate the next one.\r\n const nextIndex = removedIndex === tabIds.length - 1 ? removedIndex - 1 : removedIndex + 1;\r\n return tabIds[nextIndex];\r\n }\r\n}","import { Injectable, inject, signal, WritableSignal, Signal, computed } from '@angular/core';\nimport { Router, RouteReuseStrategy } from '@angular/router';\nimport { CustomRouteReuseStrategy } from '../../utils/custom-route-reuse-strategy';\nimport { TabStateService } from '../../services/tab-state.service';\nimport { CideLytSidedrawerService } from '../sidedrawer/sidedrawer.service';\nimport { CideLytSharedService } from '../shared/shared.service';\nimport { CideEleFloatingContainerService } from 'cloud-ide-element';\nimport { ISytmLayout } from 'cloud-ide-lms-model';\nimport { AppStateService } from '../../services/app-state/app-state.service';\n\nexport interface TabInfo {\n id: string;\n title: string;\n route: string;\n params?: Record<string, unknown>;\n active: boolean;\n sytm_page_id_sypg: string;\n themeId: string;\n loadedComponent?: unknown;\n scrollTop?: number;\n scrollLeft?: number;\n layout?: ISytmLayout;\n}\n\n// Interface for page data passed from shared service\ninterface PageDataResponse {\n data?: {\n page?: {\n sypg_title?: string;\n };\n };\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CideLytRequestService {\n public requestVisible: boolean = false;\n // Modern Angular v20+ pattern: Use Signals instead of BehaviorSubject\n public tabsSignal: WritableSignal<TabInfo[]> = signal([]);\n public activeTabIdSignal: WritableSignal<string | null> = signal(null);\n \n // Computed signals for derived state and public readonly access\n public tabs: Signal<TabInfo[]> = computed(() => this.tabsSignal());\n public activeTabId: Signal<string | null> = computed(() => this.activeTabIdSignal());\n public activeTab: Signal<TabInfo | undefined> = computed(() => \n this.tabsSignal().find(tab => tab.active)\n );\n\n // Use inject() for all dependencies\n private router = inject(Router);\n private routeReuseStrategy = inject(RouteReuseStrategy);\n private tabStateService = inject(TabStateService);\n private sidedrawerService = inject(CideLytSidedrawerService);\n private sharedService = inject(CideLytSharedService);\n private floatingContainerService = inject(CideEleFloatingContainerService);\n private appStateService = inject(AppStateService);\n\n constructor() {\n // Initialize router\n this.router = inject(Router);\n this.router.routeReuseStrategy = new CustomRouteReuseStrategy();\n \n // Register tab management callback with shared service to avoid circular dependency\n this.sharedService.registerTabManagement(this.handleRouteBasedTabManagement.bind(this));\n \n // Register request visibility callback\n this.sharedService.registerRequestVisibility(this.handleRequestVisibility.bind(this));\n \n // Register entity change handler with AppStateService to close tabs when entity changes\n // This is safe because AppStateService no longer imports CideLytRequestService\n this.appStateService.registerEntityChangeHandler((entity) => {\n console.log('🏢 [RequestService] Entity changed, closing all tabs:', entity?._id);\n this.closeAllTabs();\n });\n }\n\n /**\n * Handle request visibility changes from shared service\n */\n private handleRequestVisibility(show: boolean): void {\n if (show) {\n this.showRequest();\n } else {\n this.hideRequest();\n }\n }\n\n /**\n * Handle sidebar sync when tab becomes active\n */\n private handleSidebarSync(tabInfo: TabInfo): void {\n // The sidebar sync will be handled automatically by the shared service\n // when page data is loaded, so we don't need additional logic here\n console.log('🔗 REQUEST SERVICE: Tab activated, sidebar sync handled by shared service:', tabInfo.title);\n }\n\n /**\n * Handle route-based tab management - called by shared service\n * This method checks for existing tabs and creates/activates as needed\n */\n handleRouteBasedTabManagement(\n currentRoutePath: string,\n queryParams: Record<string, unknown>,\n layout: ISytmLayout,\n pageData: PageDataResponse,\n pageCode: string\n ) {\n console.log('handleRouteBasedTabManagement', currentRoutePath, queryParams, layout, pageData, pageCode);\n const currentTabs = this.tabsSignal();\n const tabAlreadyExists = currentTabs.find((t: TabInfo) => {\n const tRoutePath = t.route.startsWith('/') ? t.route : '/' + t.route;\n const tParamsMatch = JSON.stringify(t.params || {}) === JSON.stringify(queryParams || {});\n return tRoutePath === currentRoutePath && tParamsMatch;\n });\n console.log('tabAlreadyExists', tabAlreadyExists);\n if (!tabAlreadyExists) {\n const title = pageData.data?.page?.sypg_title || pageCode.toString() || 'Untitled Tab';\n console.log(`🆕 Adding new tab: ${title}`);\n this.addTab(title, currentRoutePath, queryParams, layout);\n } else if (tabAlreadyExists && !tabAlreadyExists.active) {\n console.log(`🔄 Activating existing tab: ${tabAlreadyExists.title}`);\n this.activateTab(tabAlreadyExists.id);\n }else if (tabAlreadyExists && tabAlreadyExists.active) {\n console.log(`🔄 Activating existing tab: ${tabAlreadyExists.title}`);\n this.activateTab(tabAlreadyExists.id);\n }\n }\n\n addTab(title: string, route: string, params?: Record<string, unknown>, layout?: ISytmLayout): string {\n console.log('addTab', title, route, params, layout);\n const id = this.generateId();\n const currentTabs = this.tabsSignal();\n console.log('currentTabs', currentTabs, route);\n // Tab reuse disabled - always create new tab\n // Removed existing tab check to prevent tab reuse\n \n // Create new tab\n const newTab: TabInfo = {\n id,\n title,\n route,\n params,\n active: true,\n layout,\n sytm_page_id_sypg: '',\n themeId: ''\n };\n\n // Deactivate all other tabs\n currentTabs.forEach((tab: TabInfo) => tab.active = false);\n console.log('currentTabs after deactivate', currentTabs, 'activateTab', id);\n // Add new tab\n this.tabsSignal.set([...currentTabs, newTab]);\n this.activeTabIdSignal.set(id);\n\n // Sync with TabStateService\n this.tabStateService.addTab(title, id);\n \n // Request visibility is now controlled by layout configuration in setPageData\n // No need to automatically show request wrapper here\n \n // Navigate to the new route\n if (params) {\n this.router.navigate([route], { queryParams: params });\n } else {\n this.router.navigate([route]);\n }\n\n return id;\n }\n\n activateTab(tabId: string): void {\n console.log('🔍 REQUEST SERVICE: Activating tab:', tabId);\n const tabs = this.tabsSignal();\n const tabToActivate = tabs.find(tab => tab.id === tabId);\n \n if (!tabToActivate) {\n console.warn('⚠️ Tab not found:', tabId);\n return;\n }\n\n // Before navigating, ensure the route is fresh by clearing any cached state\n // This prevents old component data from persisting when reopening a tab\n if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {\n let pathKey = tabToActivate.route.startsWith('/') ? tabToActivate.route.substring(1) : tabToActivate.route;\n\n if (tabToActivate.params && Object.keys(tabToActivate.params).length > 0) {\n const queryParamsString = Object.keys(tabToActivate.params)\n .sort()\n .map(key => `${key}=${tabToActivate.params![key]}`)\n .join('&');\n pathKey += '?' + queryParamsString;\n }\n\n // Clear any cached route to ensure fresh component state\n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKey);\n console.log(`🔄 REQUEST SERVICE: Cleared cached route ${pathKey} before activating tab`);\n }\n\n // Update tabs: deactivate all, then activate the target\n const updatedTabs = tabs.map(tab => ({\n ...tab,\n active: tab.id === tabId\n }));\n\n this.tabsSignal.set(updatedTabs);\n this.activeTabIdSignal.set(tabId);\n \n console.log('✅ REQUEST SERVICE: Tab activated:', tabToActivate.title);\n\n // Navigate to the tab's route\n this.router.navigate([tabToActivate.route], { \n queryParams: tabToActivate.params || {},\n replaceUrl: false \n });\n \n // Trigger sidebar sync for the activated tab by calling shared service\n // The shared service will handle the sidebar sync when the route loads\n console.log('🔗 REQUEST SERVICE: Sidebar sync will be handled by route change');\n }\n\n closeTab(id: string): void {\n const currentTabs = this.tabsSignal();\n const tabIndex = currentTabs.findIndex((tab: TabInfo) => tab.id === id);\n\n if (tabIndex === -1) return;\n\n const tabToClose = currentTabs[tabIndex];\n const wasActive = tabToClose.active;\n\n // Sync with TabStateService by removing the tab state\n this.tabStateService.removeTab(id);\n\n // Clear stored route from strategy and ensure proper component cleanup\n if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {\n // Generate pathKey in the same format as CustomRouteReuseStrategy.getPathKey()\n // Remove leading slash to match the format used by getPathKey\n let pathKey = tabToClose.route.startsWith('/') ? tabToClose.route.substring(1) : tabToClose.route;\n\n // Only add query params if the route is marked for reuse (matching getPathKey logic)\n // But we'll try to clear with both formats to be safe\n if (tabToClose.params && Object.keys(tabToClose.params).length > 0) {\n const queryParamsString = Object.keys(tabToClose.params)\n .sort()\n .map(key => `${key}=${tabToClose.params![key]}`)\n .join('&');\n pathKey += '?' + queryParamsString;\n }\n\n // Clear the stored route and destroy the component instance\n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKey);\n \n // Also try clearing without query params in case the route wasn't marked for reuse\n // This ensures we catch all possible pathKey variations\n const pathKeyWithoutParams = tabToClose.route.startsWith('/') ? tabToClose.route.substring(1) : tabToClose.route;\n if (pathKeyWithoutParams !== pathKey) {\n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKeyWithoutParams);\n }\n \n // Force a route refresh to ensure clean component state\n // This prevents old data from persisting when the same route is reopened\n console.log(`🧹 REQUEST SERVICE: Cleared stored route for ${pathKey} and destroyed component instance`);\n \n // If this was the active tab, navigate away to ensure component is removed from DOM\n if (wasActive) {\n // The navigation to the new active tab will happen below, which will properly clear the router outlet\n // But we also want to ensure the component is removed immediately\n console.log(`🧹 REQUEST SERVICE: Active tab closed, component will be removed on navigation`);\n }\n }\n\n // Remove the tab from this service's list\n const newTabs = currentTabs.filter((tab: TabInfo) => tab.id !== id);\n\n // If we're closing the active tab, activate the next available tab\n if (wasActive && newTabs.length > 0) {\n const newActiveIndex = Math.max(0, Math.min(tabIndex, newTabs.length - 1));\n const newActiveTab = newTabs[newActiveIndex];\n\n // Update sidedrawer for the new active tab\n this.sidedrawerService.updateDrawerItems(newActiveTab.layout);\n\n newTabs[newActiveIndex].active = true;\n this.activeTabIdSignal.set(newActiveTab.id);\n this.tabStateService.setActiveTab(newActiveTab.id);\n\n // Navigate to the new active tab's route\n if (newActiveTab.params) {\n this.router.navigate([newActiveTab.route], { queryParams: newActiveTab.params });\n } else {\n this.router.navigate([newActiveTab.route]);\n }\n } else if (newTabs.length === 0) {\n this.activeTabIdSignal.set(null);\n this.tabStateService.setActiveTab(null);\n // Clear sidedrawer as no tabs are open\n this.sidedrawerService.updateDrawerItems(undefined);\n // Redirect to home screen when all tabs are closed\n this.router.navigate(['/control-panel']);\n }\n this.tabsSignal.set(newTabs);\n // Request wrapper visibility is now controlled by layout configuration\n // The wrapper will be hidden/shown based on sytm_layout_request.status in setPageData\n }\n\n /**\n * Close all tabs and navigate to home\n * This is used when entity changes to ensure all components are destroyed and refreshed\n */\n closeAllTabs(): void {\n console.log('🧹 REQUEST SERVICE: Closing all tabs due to entity change');\n const currentTabs = this.tabsSignal();\n \n // Close all floating containers first\n this.floatingContainerService.hideAll();\n console.log('🧹 REQUEST SERVICE: Closed all floating containers');\n \n // Clear all tabs from TabStateService\n currentTabs.forEach(tab => {\n this.tabStateService.removeTab(tab.id);\n \n // Clear stored routes from route reuse strategy\n if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {\n let pathKey = tab.route.startsWith('/') ? tab.route.substring(1) : tab.route;\n \n if (tab.params && Object.keys(tab.params).length > 0) {\n const queryParamsString = Object.keys(tab.params)\n .sort()\n .map(key => `${key}=${tab.params![key]}`)\n .join('&');\n pathKey += '?' + queryParamsString;\n }\n \n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKey);\n \n // Also clear without query params\n const pathKeyWithoutParams = tab.route.startsWith('/') ? tab.route.substring(1) : tab.route;\n if (pathKeyWithoutParams !== pathKey) {\n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKeyWithoutParams);\n }\n }\n });\n \n // Clear all tabs\n this.tabsSignal.set([]);\n this.activeTabIdSignal.set(null);\n this.tabStateService.setActiveTab(null);\n \n // Clear sidedrawer\n this.sidedrawerService.updateDrawerItems(undefined);\n \n // Navigate to home\n this.router.navigate(['/control-panel']);\n \n console.log('✅ REQUEST SERVICE: All tabs and floating containers closed, navigated to home');\n }\n\n // Hide Request\n hideRequest() {\n console.log('🚫 REQUEST SERVICE - Hiding request wrapper');\n this.requestVisible = false;\n document.querySelector(`#cide-lyt-request-wrapper`)?.classList.add('cide-lyt-request-wrapper-hide');\n document.querySelector(`body`)?.classList.remove('cide-lyt-request-exist');\n }\n\n // Show Request\n showRequest() {\n console.log('✅ REQUEST SERVICE - Showing request wrapper');\n this.requestVisible = true;\n document.querySelector(`#cide-lyt-request-wrapper`)?.classList.remove('cide-lyt-request-wrapper-hide');\n document.querySelector(`body`)?.classList.add('cide-lyt-request-exist');\n }\n\n private generateId(): string {\n return 'tab-' + Math.random().toString(36).substr(2, 9);\n }\n\n updateTabScrollPosition(tabId: string, scrollTop: number, scrollLeft: number): void {\n const currentTabs = this.tabsSignal();\n const tabIndex = currentTabs.findIndex((t: TabInfo) => t.id === tabId);\n if (tabIndex !== -1) {\n const tabToUpdate = currentTabs[tabIndex];\n tabToUpdate.scrollTop = scrollTop;\n tabToUpdate.scrollLeft = scrollLeft;\n // Create a new array reference to trigger change detection\n this.tabsSignal.set([...currentTabs]);\n }\n }\n\n /**\n * Force refresh a route by clearing its cached state\n * This is useful when you want to ensure a clean component state\n * @param route The route path to refresh\n * @param params Optional query parameters\n */\n forceRefreshRoute(route: string, params?: Record<string, unknown>): void {\n if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {\n let pathKey = route.startsWith('/') ? route.substring(1) : route;\n\n if (params && Object.keys(params).length > 0) {\n const queryParamsString = Object.keys(params)\n .sort()\n .map(key => `${key}=${params[key]}`)\n .join('&');\n pathKey += '?' + queryParamsString;\n }\n\n // Clear the stored route to force a fresh component instance\n (this.routeReuseStrategy as CustomRouteReuseStrategy).clearStoredRoute(pathKey);\n console.log(`🔄 REQUEST SERVICE: Force refreshed route ${pathKey}`);\n }\n }\n\n /**\n * Get information about cached routes (useful for debugging)\n */\n getCachedRoutesInfo(): { count: number; routes: string[] } {\n if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {\n const count = (this.routeReuseStrategy as CustomRouteReuseStrategy).getStoredRoutesCount();\n return { count, routes: [] }; // Could be enhanced to return actual route paths\n }\n return { count: 0, routes: [] };\n }\n}\n","import { Component, OnInit, ViewContainerRef, ViewChild, ComponentRef, Type, inject, effect } from '@angular/core';\r\nimport { computed } from '@angular/core';\r\nimport { CideEleResizerDirective, CideIconComponent, TooltipDirective } from 'cloud-ide-element';\r\nimport { CideEleSkeletonLoaderComponent } from 'cloud-ide-element';\r\nimport { CideLytSidedrawerService, SidedrawerItem } from '../sidedrawer.service';\r\nimport { take } from 'rxjs';\r\nimport { NgClass, NgFor, NgIf } from '@angular/common';\r\nimport { CideLytRequestService } from '../../request/request.service'; // Import request service\r\nimport { NotesComponentState } from '../sidedrawer-notes/sidedrawer-notes.component';\r\nimport { TabStateService } from '../../../services/tab-state.service';\r\n\r\n// Type guard for setState/getState\r\nfunction hasStateMethods(instance: unknown): instance is { getState: () => NotesComponentState; setState: (state: NotesComponentState) => void; context?: { configFor?: string } } {\r\n return !!instance && typeof (instance as { getState?: unknown }).getState === 'function' && typeof (instance as { setState?: unknown }).setState === 'function';\r\n}\r\n\r\n// Type guard for NotesComponentState\r\nfunction isNotesComponentState(state: unknown): state is NotesComponentState {\r\n return !!state && typeof state === 'object' &&\r\n 'newNoteModel' in state &&\r\n 'isFormVisible' in state &&\r\n 'scrollTop' in state;\r\n}\r\n\r\n@Component({\r\n selector: 'cide-lyt-sidedrawer-wrapper',\r\n standalone: true,\r\n imports: [\r\n NgClass,\r\n CideIconComponent,\r\n CideEleResizerDirective,\r\n CideEleSkeletonLoaderComponent,\r\n NgFor,\r\n NgIf,\r\n TooltipDirective\r\n ],\r\n templateUrl: './sidedrawer-wrapper.component.html',\r\n styleUrl: './sidedrawer-wrapper.component.css'\r\n})\r\nexport class CideLytSidedrawerWrapperComponent implements OnInit {\r\n public sidedrawerSetupData = {\r\n cide_lyt_sidedrawer_width: 0\r\n };\r\n // Modern Angular v20 pattern: Use Signals directly\r\n public get drawerItems() { return this.sidedrawerService.drawerItems; }\r\n public get notesVisible() { return this.sidedrawerService.notesVisible; }\r\n public isExpanded: boolean = false; // New property to track expansion state\r\n\r\n // Computed signal to determine if sidedrawer should be visible\r\n public get shouldShowSidedrawer() {\r\n return computed(() => {\r\n const items = this.drawerItems();\r\n return items && items.length > 0;\r\n });\r\n }\r\n\r\n @ViewChild('notesContainer', { read: ViewContainerRef }) notesContainer!: ViewContainerRef;\r\n private currentComponentRef: ComponentRef<unknown> | null = null;\r\n private componentMap: { [key: string]: () => Promise<Type<unknown>> } = {}; // Map configFor to component\r\n private currentTabId: string | null = null;\r\n private currentActiveComponent: string | null = null;\r\n\r\n public sidedrawerService = inject(CideLytSidedrawerService);\r\n private requestService = inject(CideLytRequestService);\r\n private tabStateService = inject(TabStateService);\r\n\r\n constructor() {\r\n // Modern Angular v20 pattern: Use Signals directly with effect\r\n effect(() => {\r\n const configFor = this.sidedrawerService.activeComponent();\r\n this.currentActiveComponent = configFor;\r\n this.loadComponent(configFor);\r\n }, { allowSignalWrites: true });\r\n \r\n // Effect to track active tab changes\r\n effect(() => {\r\n const activeTabId = this.requestService.activeTabId();\r\n console.log('🔍 SIDEDRAWER - Active tab changed:', activeTabId);\r\n this.currentTabId = activeTabId;\r\n \r\n if (activeTabId) {\r\n console.log('🔍 SIDEDRAWER - Loading tab state for:', activeTabId);\r\n this.tabStateService.getTabState(activeTabId).pipe(take(1)).subscribe(tabState => {\r\n console.log('🔍 SIDEDRAWER - Tab state loaded:', tabState);\r\n const sideDrawer = tabState?.componentState.sideDrawer;\r\n if (sideDrawer) {\r\n console.log('🔍 SIDEDRAWER - Restoring drawer state:', sideDrawer);\r\n // Restore activeComponent\r\n this.sidedrawerService.setActiveComponent(sideDrawer.activeComponent);\r\n // Modern ES2022+ pattern: Use Promise-based delay with microtask\r\n Promise.resolve().then(() => {\r\n if (sideDrawer.activeComponent && this.currentComponentRef && hasStateMethods(this.currentComponentRef.instance)) {\r\n const compState = sideDrawer.componentState?.[sideDrawer.activeComponent];\r\n // Add type guards for each component as needed\r\n if (sideDrawer.activeComponent === 'drowar_notes' && isNotesComponentState(compState)) {\r\n this.currentComponentRef.instance.setState(compState);\r\n }\r\n }\r\n });\r\n } else {\r\n console.log('🔍 SIDEDRAWER - No drawer state found, clearing active component');\r\n this.sidedrawerService.setActiveComponent(null);\r\n }\r\n });\r\n } else {\r\n console.log('🔍 SIDEDRAWER - No active tab, clearing drawer state');\r\n this.sidedrawerService.setActiveComponent(null);\r\n }\r\n }, { allowSignalWrites: true });\r\n \r\n // collecte the width of the sidebar by using the style property\r\n const cide_lyt_sidedrawer_wrapper_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-sidedrawer-wrapper-width'));\r\n this.sidedrawerSetupData.cide_lyt_sidedrawer_width = (cide_lyt_sidedrawer_wrapper_width);\r\n }\r\n\r\n ngOnInit(): void {\r\n // Initialize the component map (You'd likely populate this from a config or service)\r\n this.componentMap['drowar_notes'] = () => import('../sidedrawer-notes/sidedrawer-notes.component').then(m => m.CideLytSidedrawerNotesComponent);\r\n this.componentMap['drawer_theme'] = () => import('../drawer-theme/drawer-theme.component').then(m => m.CideLytDrawerThemeComponent);\r\n }\r\n\r\n async loadComponent(configFor: string | null) {\r\n console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);\r\n \r\n // Always clear the container and destroy the previous component\r\n this.notesContainer?.clear();\r\n if (this.currentComponentRef) {\r\n this.currentComponentRef.destroy();\r\n this.currentComponentRef = null;\r\n }\r\n\r\n if (!configFor) {\r\n console.log('🔍 SIDEDRAWER - No component to load, collapsing');\r\n this.isExpanded = false;\r\n this.saveSidedrawerState(null);\r\n return;\r\n }\r\n\r\n console.log('🔍 SIDEDRAWER - Expanding and loading:', configFor);\r\n this.isExpanded = true;\r\n \r\n const componentLoader = this.componentMap[configFor];\r\n console.log('🔍 SIDEDRAWER - Component loader found:', !!componentLoader);\r\n \r\n if (componentLoader) {\r\n try {\r\n console.log('🔍 SIDEDRAWER - Importing component for:', configFor);\r\n const componentType = await componentLoader();\r\n console.log('🔍 SIDEDRAWER - Component imported successfully');\r\n \r\n this.currentComponentRef = this.notesContainer.createComponent(componentType);\r\n console.log('🔍 SIDEDRAWER - Component created successfully');\r\n\r\n // Add the cide-lyt-sidedrawer-wrapper-child class to the created component\r\n if (this.currentComponentRef.location.nativeElement) {\r\n this.currentComponentRef.location.nativeElement.classList.add('cide-lyt-sidedrawer-wrapper-child');\r\n }\r\n\r\n this.setComponentContext(configFor);\r\n // Optionally restore state here if you have it\r\n this.saveSidedrawerState(configFor);\r\n console.log('🔍 SIDEDRAWER - Component setup completed');\r\n } catch (error) {\r\n console.error(`🚨 SIDEDRAWER - Error loading component for ${configFor}:`, error);\r\n this.isExpanded = false;\r\n }\r\n } else {\r\n console.warn(`⚠️ SIDEDRAWER - No component mapping found for configFor: ${configFor}`);\r\n console.log('🔍 SIDEDRAWER - Available mappings:', Object.keys(this.componentMap));\r\n this.isExpanded = false;\r\n }\r\n }\r\n\r\n private clearComponent(destroy: boolean = true) {\r\n this.saveSidedrawerState();\r\n this.notesContainer?.clear();\r\n if (this.currentComponentRef && destroy) {\r\n this.currentComponentRef.destroy();\r\n }\r\n this.currentComponentRef = null;\r\n }\r\n\r\n private saveSidedrawerState(configForOverride?: string | null) {\r\n console.log('🔍 SIDEDRAWER - Saving state, current tab:', this.currentTabId);\r\n \r\n if (!this.currentTabId) {\r\n console.log('⚠️ SIDEDRAWER - No current tab, skipping state save');\r\n return;\r\n }\r\n \r\n const activeComponent = configForOverride !== undefined ? configForOverride : this.currentActiveComponent;\r\n console.log('🔍 SIDEDRAWER - Active component for save:', activeComponent);\r\n \r\n let componentState: { [componentKey: string]: unknown } | undefined = undefined;\r\n if (this.currentComponentRef && hasStateMethods(this.currentComponentRef.instance) && activeComponent) {\r\n const state = this.currentComponentRef.instance.getState();\r\n // Add type guards for each component as needed\r\n if (activeComponent === 'drowar_notes' && isNotesComponentState(state)) {\r\n componentState = { [activeComponent]: state };\r\n }\r\n // Example for other components:\r\n // else if (activeComponent === 'other_component' && isOtherComponentState(state)) {\r\n // componentState = { [activeComponent]: state };\r\n // }\r\n }\r\n \r\n console.log('🔍 SIDEDRAWER - Updating tab state with:', {\r\n isOpen: !!activeComponent,\r\n activeComponent,\r\n componentState\r\n });\r\n \r\n this.tabStateService.updateActiveTabState({\r\n sideDrawer: {\r\n isOpen: !!activeComponent,\r\n activeComponent,\r\n componentState\r\n }\r\n });\r\n }\r\n\r\n private setComponentContext(configFor: string) {\r\n // You can adjust this logic to pass different context data based on configFor if needed.\r\n const context = this.getNotesContext(configFor); // Using your existing method for now.\r\n if (this.currentComponentRef && context && this.currentComponentRef.setInput) {\r\n // Pass context data\r\n this.currentComponentRef.setInput('context', context);\r\n }\r\n }\r\n // This function needs to be enhanced to handle contexts for different components\r\n private getNotesContext(configFor: string) {\r\n switch (configFor) {\r\n case 'drowar_notes': {\r\n // Example for notes component context\r\n const activeTab = this.requestService.activeTab(); // Use the computed signal for active tab\r\n return {\r\n pageId: activeTab?.sytm_page_id_sypg,\r\n themeId: activeTab?.themeId,\r\n // Add other properties as needed for notes\r\n };\r\n }\r\n case 'drawer_theme': {\r\n // You can add theme context here if needed\r\n return {};\r\n }\r\n default:\r\n return null; // Or a default context if appropriate\r\n }\r\n }\r\n onItemClick(item: SidedrawerItem): void {\r\n const activeTabId = this.requestService.activeTabId();\r\n console.log('🔍 SIDEDRAWER - Item clicked:', item);\r\n console.log('🔍 SIDEDRAWER - Active tab ID:', activeTabId);\r\n \r\n // Modern Angular v20 pattern: Use Signals directly\r\n const activeComponent = this.sidedrawerService.activeComponent();\r\n console.log('🔍 SIDEDRAWER - Current active component:', activeComponent);\r\n console.log('🔍 SIDEDRAWER - Item configFor:', item.configFor);\r\n \r\n if (activeComponent === item?.configFor) {\r\n console.log('🔄 SIDEDRAWER - Same component clicked, toggling off');\r\n const cide_lyt_sidedrawer_wrapper = document.querySelector('#cide-lyt-sidedrawer-wrapper');\r\n const cide_lyt_outlet_wrapper = document.querySelector('#cide-lyt-outlet-wrapper');\r\n if (cide_lyt_sidedrawer_wrapper instanceof HTMLElement && cide_lyt_outlet_wrapper instanceof HTMLElement) {\r\n const width_of_prev = parseInt(cide_lyt_outlet_wrapper.style.width);\r\n const width_of_next = parseInt(cide_lyt_sidedrawer_wrapper.style.width);\r\n const width_of_next_default = 32;\r\n const width_of_prev_default = width_of_prev + (width_of_next - width_of_next_default);\r\n cide_lyt_outlet_wrapper.style.width = `${width_of_prev_default}px`;\r\n cide_lyt_sidedrawer_wrapper.style.width = `${width_of_next_default}px`; // Fix: Cast to HTMLElement to access style property\r\n }\r\n this.sidedrawerService.setActiveComponent(null); // Destroy if same\r\n this.saveSidedrawerState(null);\r\n } else {\r\n console.log('✅ SIDEDRAWER - New component clicked, setting active:', item.configFor);\r\n this.sidedrawerService.setActiveComponent(item.configFor); // Set new\r\n this.saveSidedrawerState(item.configFor);\r\n }\r\n }\r\n}\r\n","<nav *ngIf=\"shouldShowSidedrawer()\" \r\n [ngClass]=\"{'expanded tw-min-w-[var(--cide-lyt-sidedrawer-wrapper-width-expanded-min)]': isExpanded, 'tw-w-[var(--cide-lyt-sidedrawer-wrapper-width)]': !isExpanded}\"\r\n id=\"cide-lyt-sidedrawer-wrapper\" class=\"tw-flex tw-relative tw-flex-col tw-items-center tw-justify-between tw-h-full tw-bg-white tw-shadow-lg tw-border-l tw-border-gray-200\">\r\n <!-- Resizer Divider -->\r\n <div parentElementSelector=\"#cide-lyt-outlet-sidedrawer-wrapper\"\r\n [minNextSize]=\"sidedrawerSetupData.cide_lyt_sidedrawer_width\" prevElementSelector=\"#cide-lyt-outlet-wrapper\"\r\n nextElementSelector=\"#cide-lyt-sidedrawer-wrapper\" cideEleResizer direction=\"horizontal\" to=\"right-to-left\">\r\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\r\n </div>\r\n <!-- Main Icon Area -->\r\n <div class=\"tw-flex tw-justify-between tw-h-full tw-w-full\">\r\n <div class=\"tw-w-8 tw-h-full tw-border-r tw-border-gray-200\">\r\n <div class=\"sidedrawer-icon tw-flex tw-flex-col tw-items-center tw-gap-2\">\r\n <ng-container *ngIf=\"drawerItems() as items; else loading\">\r\n <div *ngFor=\"let item of items\" [title]=\"item.title\">\r\n <button (click)=\"onItemClick(item)\"\r\n class=\"tw-p-0 tw-rounded-md hover:tw-bg-gray-100 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500\"\r\n [ngClass]=\"{'tw-bg-blue-100 tw-text-blue-700': sidedrawerService.activeComponent() === item.configFor}\">\r\n <cide-ele-icon [cideEleTooltip]=\"item.title\" tooltipPlacement=\"left\" width=\"1.3rem\" height=\"1.5rem\" type=\"box\">{{item.icon}}</cide-ele-icon>\r\n </button>\r\n </div>\r\n </ng-container>\r\n <ng-template #loading>\r\n <cide-ele-skeleton-loader [width]=\"'2rem'\" [height]=\"'2rem'\" [count]=\"3\"\r\n [circle]=\"true\"></cide-ele-skeleton-loader>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class=\"tw-flex-1 cide-lyt-sidedrawer-wrapper-child-holder\">\r\n <div #notesContainer class=\"tw-h-full\">\r\n </div>\r\n </div>\r\n </div>\r\n</nav>","import { Component, OnInit, OnDestroy, inject, signal, computed } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { FormsModule } from '@angular/forms';\nimport { \n KeyboardShortcutService, \n KeyboardShortcut,\n FloatingContainerShortcutsService\n} from 'cloud-ide-element';\nimport { CideIconComponent, CideEleButtonComponent } from 'cloud-ide-element';\n\n/**\n * Shortcut Display Interface\n */\nexport interface ShortcutDisplay {\n id: string;\n title: string;\n description?: string;\n keyCombination: string;\n category: string;\n featuredHTML?: string;\n isUserDefined: boolean;\n}\n\n/**\n * Shortcuts Panel Component\n * Displays all registered keyboard shortcuts (system and user-defined)\n */\n@Component({\n selector: 'cide-lyt-shortcuts-panel',\n standalone: true,\n imports: [CommonModule, FormsModule, CideIconComponent, CideEleButtonComponent],\n template: `\n <div class=\"tw-p-6 tw-space-y-4 tw-bg-white dark:tw-bg-gray-900\">\n <!-- View Toggle and Refresh -->\n <div class=\"tw-flex tw-items-center tw-justify-end tw-gap-2 tw-mb-4\">\n <button\n type=\"button\"\n cideEleButton\n variant=\"outline\"\n size=\"sm\"\n (click)=\"loadShortcuts()\"\n title=\"Refresh shortcuts\">\n <cide-ele-icon>refresh</cide-ele-icon>\n Refresh\n </button>\n <button\n type=\"button\"\n cideEleButton\n variant=\"outline\"\n size=\"sm\"\n (click)=\"toggleView()\">\n <cide-ele-icon>{{ viewMode() === 'grouped' ? 'view_list' : 'category' }}</cide-ele-icon>\n {{ viewMode() === 'grouped' ? 'List View' : 'Grouped View' }}\n </button>\n </div>\n\n <!-- Search -->\n <div class=\"tw-relative\">\n <cide-ele-icon class=\"tw-absolute tw-left-2 tw-top-1/2 tw-transform -tw-translate-y-1/2 tw-text-gray-400\">search</cide-ele-icon>\n <input\n type=\"text\"\n [value]=\"searchQuery()\"\n (input)=\"searchQuery.set($any($event.target).value)\"\n placeholder=\"Search shortcuts...\"\n class=\"tw-w-full tw-pl-8 tw-pr-3 tw-py-2 tw-text-sm tw-border tw-border-gray-300 dark:tw-border-gray-600 tw-rounded-lg tw-bg-white dark:tw-bg-gray-800 tw-text-gray-900 dark:tw-text-gray-100 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500\">\n </div>\n\n <!-- Shortcuts Content -->\n @if (filteredShortcuts().length === 0) {\n <div class=\"tw-py-12 tw-text-center\">\n <cide-ele-icon class=\"tw-text-4xl tw-text-gray-300 dark:tw-text-gray-600 tw-mb-2\">keyboard_off</cide-ele-icon>\n <p class=\"tw-text-sm tw-text-gray-500 dark:tw-text-gray-400\">No shortcuts found</p>\n </div>\n } @else {\n @if (viewMode() === 'grouped') {\n <!-- Grouped View -->\n @for (category of categories(); track category) {\n <div class=\"tw-space-y-2\">\n <h4 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-uppercase tw-tracking-wide tw-mt-4 tw-mb-2\">\n {{ category }}\n </h4>\n <div class=\"tw-space-y-2\">\n @for (shortcut of getShortcutsByCategory(category); track shortcut.id) {\n <div class=\"tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700 hover:tw-border-blue-500 dark:hover:tw-border-blue-400 tw-transition-colors\">\n @if (shortcut.featuredHTML) {\n <div class=\"tw-mb-2 tw-p-2 tw-bg-white dark:tw-bg-gray-800 tw-rounded tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div [innerHTML]=\"sanitizeHTML(shortcut.featuredHTML)\"></div>\n </div>\n }\n <div class=\"tw-flex tw-items-start tw-justify-between tw-gap-3\">\n <div class=\"tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mb-1\">\n <h5 class=\"tw-m-0 tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">\n {{ shortcut.title }}\n </h5>\n @if (shortcut.isUserDefined) {\n <span class=\"tw-px-1.5 tw-py-0.5 tw-text-[10px] tw-font-semibold tw-text-blue-600 dark:tw-text-blue-400 tw-bg-blue-50 dark:tw-bg-blue-900/30 tw-rounded\">Custom</span>\n }\n </div>\n @if (shortcut.description) {\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-600 dark:tw-text-gray-400\">{{ shortcut.description }}</p>\n }\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-flex-shrink-0\">\n @for (key of getKeyParts(shortcut.keyCombination); track $index; let isLast = $last) {\n <kbd class=\"tw-px-2 tw-py-1 tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-bg-gray-200 dark:tw-bg-gray-600 tw-border tw-border-gray-300 dark:tw-border-gray-500 tw-rounded tw-shadow-sm\">\n {{ key }}\n </kbd>\n @if (!isLast) {\n <span class=\"tw-text-gray-400 tw-text-xs\">+</span>\n }\n }\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n } @else {\n <!-- List View -->\n <div class=\"tw-space-y-2\">\n @for (shortcut of filteredShortcuts(); track shortcut.id) {\n <div class=\"tw-p-3 tw-bg-gray-50 dark:tw-bg-gray-800/50 tw-rounded-lg tw-border tw-border-gray-200 dark:tw-border-gray-700 hover:tw-border-blue-500 dark:hover:tw-border-blue-400 tw-transition-colors\">\n @if (shortcut.featuredHTML) {\n <div class=\"tw-mb-2 tw-p-2 tw-bg-white dark:tw-bg-gray-800 tw-rounded tw-border tw-border-gray-200 dark:tw-border-gray-700\">\n <div [innerHTML]=\"sanitizeHTML(shortcut.featuredHTML)\"></div>\n </div>\n }\n <div class=\"tw-flex tw-items-start tw-justify-between tw-gap-3\">\n <div class=\"tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mb-1\">\n <h5 class=\"tw-m-0 tw-text-sm tw-font-medium tw-text-gray-900 dark:tw-text-gray-100\">\n {{ shortcut.title }}\n </h5>\n @if (shortcut.isUserDefined) {\n <span class=\"tw-px-1.5 tw-py-0.5 tw-text-[10px] tw-font-semibold tw-text-blue-600 dark:tw-text-blue-400 tw-bg-blue-50 dark:tw-bg-blue-900/30 tw-rounded\">Custom</span>\n }\n </div>\n @if (shortcut.description) {\n <p class=\"tw-m-0 tw-text-xs tw-text-gray-600 dark:tw-text-gray-400\">{{ shortcut.description }}</p>\n }\n @if (shortcut.category) {\n <span class=\"tw-inline-block tw-mt-1 tw-px-1.5 tw-py-0.5 tw-text-[10px] tw-font-medium tw-text-gray-500 dark:tw-text-gray-400 tw-bg-gray-100 dark:tw-bg-gray-600 tw-rounded\">\n {{ shortcut.category }}\n </span>\n }\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-flex-shrink-0\">\n @for (key of getKeyParts(shortcut.keyCombination); track $index) {\n <kbd class=\"tw-px-2 tw-py-1 tw-text-xs tw-font-semibold tw-text-gray-700 dark:tw-text-gray-300 tw-bg-gray-200 dark:tw-bg-gray-600 tw-border tw-border-gray-300 dark:tw-border-gray-500 tw-rounded tw-shadow-sm\">\n {{ key }}\n </kbd>\n @if (!$last) {\n <span class=\"tw-text-gray-400 tw-text-xs\">+</span>\n }\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n `,\n styles: [`\n :host {\n display: block;\n }\n \n kbd {\n font-family: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace;\n font-size: 0.75rem;\n line-height: 1.5;\n }\n `]\n})\nexport class ShortcutsPanelComponent implements OnInit, OnDestroy {\n private keyboardShortcutService = inject(KeyboardShortcutService);\n private sanitizer = inject(DomSanitizer);\n // Inject FloatingContainerShortcutsService to ensure it's initialized and shortcuts are registered\n private floatingContainerShortcutsService = inject(FloatingContainerShortcutsService);\n private refreshInterval?: any;\n\n shortcuts = signal<ShortcutDisplay[]>([]);\n searchQuery = signal<string>('');\n viewMode = signal<'grouped' | 'list'>('grouped');\n\n filteredShortcuts = computed(() => {\n const query = this.searchQuery().toLowerCase();\n if (!query) return this.shortcuts();\n \n return this.shortcuts().filter(shortcut =>\n shortcut.title.toLowerCase().includes(query) ||\n shortcut.description?.toLowerCase().includes(query) ||\n shortcut.keyCombination.toLowerCase().includes(query) ||\n shortcut.category.toLowerCase().includes(query)\n );\n });\n\n categories = computed(() => {\n const cats = new Set<string>();\n this.shortcuts().forEach(s => {\n if (s.category) cats.add(s.category);\n });\n return Array.from(cats).sort();\n });\n\n ngOnInit(): void {\n // FloatingContainerShortcutsService is now injected, so it's initialized\n // Load shortcuts immediately\n this.loadShortcuts();\n \n // Reload shortcuts periodically to catch dynamically registered shortcuts\n // This ensures floating container shortcuts and custom shortcuts are shown\n this.refreshInterval = setInterval(() => {\n this.loadShortcuts();\n }, 3000); // Reload every 3 seconds\n }\n\n ngOnDestroy(): void {\n if (this.refreshInterval) {\n clearInterval(this.refreshInterval);\n }\n }\n\n /**\n * Load all shortcuts from services\n */\n loadShortcuts(): void {\n const displayShortcuts: ShortcutDisplay[] = [];\n\n // Load from KeyboardShortcutService\n const keyboardShortcuts = this.keyboardShortcutService.getAllShortcuts();\n keyboardShortcuts.forEach(shortcut => {\n displayShortcuts.push(this.convertToDisplay(shortcut));\n });\n\n // TODO: Load from AppShortcutService when available\n // For now, only KeyboardShortcutService shortcuts are loaded\n\n // Sort by category, then by title\n displayShortcuts.sort((a, b) => {\n if (a.category !== b.category) {\n return a.category.localeCompare(b.category);\n }\n return a.title.localeCompare(b.title);\n });\n\n this.shortcuts.set(displayShortcuts);\n }\n\n /**\n * Convert KeyboardShortcut to ShortcutDisplay\n */\n private convertToDisplay(shortcut: KeyboardShortcut): ShortcutDisplay {\n const extended = shortcut as KeyboardShortcut & {\n title?: string;\n category?: string;\n isUserDefined?: boolean;\n featuredHTML?: string;\n };\n \n // Auto-detect category based on shortcut ID\n const autoCategory = this.detectCategory(shortcut.id);\n \n return {\n id: shortcut.id,\n title: extended.title || shortcut.description || this.formatTitleFromId(shortcut.id),\n description: shortcut.description,\n keyCombination: this.formatKeyCombination(shortcut),\n category: extended.category || autoCategory,\n isUserDefined: extended.isUserDefined || false,\n featuredHTML: extended.featuredHTML\n };\n }\n\n /**\n * Detect category from shortcut ID\n */\n private detectCategory(shortcutId: string): string {\n const id = shortcutId.toLowerCase();\n \n if (id.startsWith('floating-container-')) {\n return 'Floating Containers';\n }\n if (id.startsWith('app-') || id.includes('sidebar') || id.includes('theme') || id.includes('settings')) {\n return 'Application';\n }\n if (id.includes('navigation') || id.includes('navigate')) {\n return 'Navigation';\n }\n if (id.includes('edit') || id.includes('save') || id.includes('delete')) {\n return 'Editing';\n }\n if (id.includes('view') || id.includes('toggle') || id.includes('show') || id.includes('hide')) {\n return 'View';\n }\n \n return 'General';\n }\n\n /**\n * Format title from shortcut ID\n */\n private formatTitleFromId(id: string): string {\n // Convert kebab-case to Title Case\n return id\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n }\n\n /**\n * Format key combination string\n */\n private formatKeyCombination(shortcut: KeyboardShortcut): string {\n const parts: string[] = [];\n if (shortcut.ctrlKey) parts.push('Ctrl');\n if (shortcut.altKey) parts.push('Alt');\n if (shortcut.shiftKey) parts.push('Shift');\n if (shortcut.metaKey) parts.push('Meta');\n parts.push(shortcut.key.toUpperCase());\n return parts.join(' + ');\n }\n\n /**\n * Get shortcuts by category\n */\n getShortcutsByCategory(category: string): ShortcutDisplay[] {\n return this.filteredShortcuts().filter(s => s.category === category);\n }\n\n /**\n * Get key parts for display\n */\n getKeyParts(keyCombination: string): string[] {\n return keyCombination.split(' + ');\n }\n\n /**\n * Sanitize HTML content\n */\n sanitizeHTML(html: string | undefined): any {\n if (!html) return '';\n return this.sanitizer.sanitize(1, html); // SecurityContext.HTML = 1\n }\n\n /**\n * Toggle view mode\n */\n toggleView(): void {\n this.viewMode.set(this.viewMode() === 'grouped' ? 'list' : 'grouped');\n }\n\n /**\n * Handle search query change\n */\n onSearchChange(): void {\n // Computed signal will automatically update\n }\n}\n\n","import { Component, OnInit, inject, signal, computed } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CideIconComponent, CideEleButtonComponent } from 'cloud-ide-element';\nimport { NotificationSettingsComponent } from '../notification-settings/notification-settings.component';\nimport { ShortcutsPanelComponent } from '../shortcuts-panel/shortcuts-panel.component';\n\n/**\n * Settings Section Interface\n */\nexport interface SettingsSection {\n id: string;\n title: string;\n icon: string;\n description?: string;\n component?: any;\n badge?: string;\n}\n\n/**\n * Settings Container Component\n * Main settings panel with left sidebar navigation and content area\n */\n@Component({\n selector: 'cide-lyt-settings-container',\n standalone: true,\n imports: [\n CommonModule,\n CideIconComponent,\n NotificationSettingsComponent,\n ShortcutsPanelComponent\n ],\n template: `\n <div class=\"tw-flex tw-h-full tw-bg-white dark:tw-bg-gray-900 tw-text-gray-900 dark:tw-text-gray-100\">\n <!-- Left Sidebar Navigation -->\n <div class=\"tw-w-64 tw-border-r tw-border-gray-200 dark:tw-border-gray-700 tw-bg-gray-50 dark:tw-bg-gray-800 tw-flex tw-flex-col\">\n <!-- Header -->\n <div class=\"tw-px-4 tw-py-4 tw-border-b tw-border-gray-200 dark:tw-border-gray-700\">\n <h2 class=\"tw-m-0 tw-text-base tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100\">Settings</h2>\n <p class=\"tw-m-0 tw-mt-1 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400\">Manage your preferences</p>\n </div>\n\n <!-- Navigation List -->\n <nav class=\"tw-flex-1 tw-overflow-y-auto tw-p-2\">\n @for (section of sections(); track section.id) {\n <button\n type=\"button\"\n cideEleButton\n [ngClass]=\"{\n 'tw-bg-blue-50 dark:tw-bg-blue-900/20 tw-text-blue-600 dark:tw-text-blue-400': selectedSection() === section.id,\n 'tw-text-gray-700 dark:tw-text-gray-300': selectedSection() !== section.id\n }\"\n (click)=\"selectSection(section.id)\"\n class=\"tw-w-full tw-flex tw-items-center tw-gap-3 tw-px-3 tw-py-2.5 tw-mb-1 tw-rounded-lg tw-transition-colors tw-text-left hover:tw-bg-gray-100 dark:hover:tw-bg-gray-700 tw-justify-start\">\n <cide-ele-icon class=\"tw-text-lg\">{{ section.icon }}</cide-ele-icon>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <span class=\"tw-text-sm tw-font-medium tw-truncate\">{{ section.title }}</span>\n @if (section.badge) {\n <span class=\"tw-px-1.5 tw-py-0.5 tw-text-[10px] tw-font-semibold tw-text-white tw-bg-blue-500 tw-rounded\">{{ section.badge }}</span>\n }\n </div>\n @if (section.description) {\n <p class=\"tw-m-0 tw-mt-0.5 tw-text-xs tw-text-gray-500 dark:tw-text-gray-400 tw-truncate\">{{ section.description }}</p>\n }\n </div>\n </button>\n }\n </nav>\n </div>\n\n <!-- Main Content Area -->\n <div class=\"tw-flex-1 tw-flex tw-flex-col tw-overflow-hidden\">\n <!-- Content Header -->\n <div class=\"tw-px-6 tw-py-4 tw-border-b tw-border-gray-200 dark:tw-border-gray-700 tw-bg-white dark:tw-bg-gray-900\">\n @if (currentSection()) {\n <div class=\"tw-flex tw-items-center tw-justify-between\">\n <div>\n <h3 class=\"tw-m-0 tw-text-lg tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100\">\n {{ currentSection()?.title }}\n </h3>\n @if (currentSection()?.description) {\n <p class=\"tw-m-0 tw-mt-1 tw-text-sm tw-text-gray-500 dark:tw-text-gray-400\">\n {{ currentSection()?.description }}\n </p>\n }\n </div>\n </div>\n }\n </div>\n\n <!-- Content Body -->\n <div class=\"tw-flex-1 tw-overflow-y-auto tw-bg-white dark:tw-bg-gray-900\">\n @switch (selectedSection()) {\n @case ('notifications') {\n <cide-lyt-notification-settings></cide-lyt-notification-settings>\n }\n @case ('shortcuts') {\n <cide-lyt-shortcuts-panel></cide-lyt-shortcuts-panel>\n }\n @default {\n <div class=\"tw-p-6\">\n <div class=\"tw-text-center tw-py-12\">\n <cide-ele-icon class=\"tw-text-4xl tw-text-gray-300 dark:tw-text-gray-600 tw-mb-3\">{{ currentSection()?.icon || 'settings' }}</cide-ele-icon>\n <h4 class=\"tw-text-base tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100 tw-mb-1\">\n {{ currentSection()?.title || 'Settings' }}\n </h4>\n <p class=\"tw-text-sm tw-text-gray-500 dark:tw-text-gray-400\">\n {{ currentSection()?.description || 'Select a section from the sidebar to view settings.' }}\n </p>\n </div>\n </div>\n }\n }\n </div>\n </div>\n </div>\n `,\n styles: [`\n :host {\n display: block;\n height: 100%;\n }\n `]\n})\nexport class SettingsContainerComponent implements OnInit {\n selectedSection = signal<string>('notifications');\n \n sections = signal<SettingsSection[]>([\n {\n id: 'notifications',\n title: 'Notifications',\n icon: 'notifications',\n description: 'Manage notification preferences',\n component: NotificationSettingsComponent\n },\n {\n id: 'shortcuts',\n title: 'Keyboard Shortcuts',\n icon: 'keyboard',\n description: 'View and manage keyboard shortcuts',\n component: ShortcutsPanelComponent\n },\n {\n id: 'appearance',\n title: 'Appearance',\n icon: 'palette',\n description: 'Customize theme and display'\n },\n {\n id: 'account',\n title: 'Account',\n icon: 'account_circle',\n description: 'Manage your account settings'\n },\n {\n id: 'security',\n title: 'Security',\n icon: 'lock',\n description: 'Password and security settings'\n },\n {\n id: 'privacy',\n title: 'Privacy',\n icon: 'privacy_tip',\n description: 'Privacy and data settings'\n }\n ]);\n\n currentSection = computed(() => {\n return this.sections().find(s => s.id === this.selectedSection());\n });\n\n ngOnInit(): void {\n // Initialize with first section if none selected\n if (!this.selectedSection() && this.sections().length > 0) {\n this.selectedSection.set(this.sections()[0].id);\n }\n }\n\n selectSection(sectionId: string): void {\n this.selectedSection.set(sectionId);\n }\n}\n\n","import { Component, inject } from '@angular/core';\nimport { CideEleResizerDirective, CideIconComponent, CideEleFloatingContainerService } from 'cloud-ide-element';\nimport { SettingsContainerComponent } from '../../../components/settings-container/settings-container.component';\n\n@Component({\n selector: 'cide-lyt-footer-wrapper',\n standalone: true,\n imports: [CideIconComponent, CideEleResizerDirective],\n templateUrl: './footer-wrapper.component.html',\n styleUrl: './footer-wrapper.component.css'\n})\nexport class CideLytFooterWrapperComponent {\n private floatingContainerService = inject(CideEleFloatingContainerService);\n\n public footerSetupData = {\n cide_lyt_footer_height: 0\n }\n\n constructor() {\n // collecte the width of the sidebar by using the style property\n const cide_lyt_sidedrawer_wrapper_width = parseInt(window.getComputedStyle(document.documentElement).getPropertyValue('--cide-lyt-sidedrawer-wrapper-width'));\n\n this.footerSetupData.cide_lyt_footer_height = (cide_lyt_sidedrawer_wrapper_width);\n }\n\n /**\n * Open settings panel in floating container\n */\n async openSettingsPanel(): Promise<void> {\n // Ensure component is registered\n if (!this.floatingContainerService.isComponentRegistered('settings-container')) {\n this.floatingContainerService.registerComponent('settings-container', SettingsContainerComponent);\n }\n\n const containerId = this.floatingContainerService.show({\n id: `settings-container-${Date.now()}`,\n title: 'Settings',\n icon: 'settings',\n width: '900px',\n height: '700px',\n minWidth: '700px',\n minHeight: '500px',\n maxWidth: '95vw',\n maxHeight: '95vh',\n resizable: true,\n draggable: true,\n closable: true,\n minimizable: true,\n maximizable: true,\n backdrop: false,\n componentId: 'settings-container',\n componentConfig: {\n inputs: {},\n outputs: {}\n }\n });\n\n this.floatingContainerService.bringToFront(containerId);\n }\n}\n","<div\n class=\"cide-footer tw-w-full tw-justify-between tw-flex tw-h-5 tw-select-none tw-px-1\">\n <!-- Resizer -->\n <div parentElementSelector=\"#cide-lyt-layout-wrapper\" prevElementSelector=\"#cide-lyt-sidebar-page-wrapper\"\n nextElementSelector=\"#cide-lyt-footer-console-wrapper\" [minNextSize]=\"footerSetupData.cide_lyt_footer_height\" cideEleResizer direction=\"vertical\">\n <div class=\"cide-lyt-devider-track tw-w-full tw-h-full\"></div>\n </div>\n <div></div>\n <div class=\"tw-flex tw-items-center tw-gap-1.5\">\n <cide-ele-icon \n size=\"3xs\" \n class=\"tw-mt-0.5 tw-cursor-pointer tw-text-gray-500 dark:tw-text-gray-400 hover:tw-text-blue-600 dark:hover:tw-text-blue-400 tw-transition-colors\" \n type=\"none\"\n (click)=\"openSettingsPanel()\"\n title=\"Settings\">\n settings\n </cide-ele-icon>\n <cide-ele-icon size=\"3xs\" class=\"tw-mt-0.5\" type=\"none\">contact_support</cide-ele-icon>\n </div>\n</div>","import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'cide-lyt-console-wrapper',\r\n standalone: true,\r\n imports: [],\r\n templateUrl: './console-wrapper.component.html',\r\n styleUrl: './console-wrapper.component.css'\r\n})\r\nexport class CideLytConsoleWrapperComponent {\r\n\r\n}\r\n","<div id=\"cide-lyt-console-wrapper\" class=\"cide-lyt-console tw-w-full tw-absolute tw-items-center tw-bg-gray-50 tw-h-0 tw-border-b-gray-200 tw-border-solid tw-border-t tw-select-none tw-z-[100] tw-bottom-0 tw-px-3\">\r\n\r\n</div>\r\n<!-- h-6 -->","import { Component, ElementRef, ViewChildren, QueryList, AfterViewInit, inject } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CideIconComponent } from 'cloud-ide-element';\r\nimport { CideLytRequestService } from '../request.service';\r\n\r\n@Component({\r\n selector: 'cide-lyt-request-wrapper',\r\n standalone: true,\r\n imports: [CommonModule, CideIconComponent],\r\n templateUrl: './request-wrapper.component.html',\r\n styleUrl: './request-wrapper.component.css'\r\n})\r\nexport class CideLytRequestWrapperComponent implements AfterViewInit {\r\n protected requestService = inject(CideLytRequestService);\r\n @ViewChildren('requestItemEl') requestItemElements!: QueryList<ElementRef>;\r\n \r\n // Modern Signal-based access for better performance\r\n public requestItems = this.requestService.tabs;\r\n \r\n ngAfterViewInit() {\r\n // Apply entrance animation to initial items\r\n this.applyAnimations();\r\n \r\n // Listen for changes in request items and apply animations\r\n this.requestItemElements.changes.subscribe({\r\n next: () => {\r\n this.applyAnimations();\r\n }\r\n });\r\n }\r\n\r\n // Apply animations to request items\r\n private applyAnimations() {\r\n if (!this.requestItemElements) return;\r\n \r\n this.requestItemElements.forEach((itemEl: ElementRef) => {\r\n const element = itemEl.nativeElement;\r\n element.classList.remove('request-item-enter');\r\n void element.offsetWidth; // Force reflow\r\n element.classList.add('request-item-enter');\r\n });\r\n }\r\n\r\n // Apply flicker effect to clicked item\r\n applyFlickerEffect(event: Event): void {\r\n const target = event.currentTarget as HTMLElement;\r\n if (target) {\r\n // Remove any existing flicker class\r\n target.classList.remove('request-item-flicker');\r\n \r\n // Force reflow to ensure the class removal is processed\r\n void target.offsetWidth;\r\n \r\n // Add flicker class to trigger animation\r\n target.classList.add('request-item-flicker');\r\n \r\n // Remove the class after animation completes\r\n setTimeout(() => {\r\n target.classList.remove('request-item-flicker');\r\n }, 400); // Match the animation duration\r\n }\r\n }\r\n}\r\n","<ng-container *ngIf=\"requestItems() as requestItems\">\r\n <div id=\"cide-lyt-request-wrapper\" class=\"cide-lyt-request tw-w-[inherit]\" [class.cide-lyt-request-wrapper-hide]=\"!requestItems.length\">\r\n <div class=\"request-content\">\r\n <ng-container *ngFor=\"let item of requestItems; let i = index\">\r\n <div #requestItemEl class=\"request-item\" (keydown.enter)=\"requestService.activateTab(item.id); applyFlickerEffect($event)\"\r\n [class.active]=\"item.active\" tabindex=\"0\" (click)=\"requestService.activateTab(item.id); applyFlickerEffect($event)\"\r\n [attr.data-tooltip]=\"item.title\">\r\n <span class=\"request-title\">{{ item.title }}</span>\r\n <button class=\"request-action close-action\" \r\n (click)=\"requestService.closeTab(item.id); $event.stopPropagation();\"\r\n (keydown.enter)=\"requestService.closeTab(item.id); $event.stopPropagation();\" \r\n tabindex=\"0\"\r\n data-tooltip=\"Close this tab\">\r\n <cide-ele-icon size=\"3xs\">close</cide-ele-icon>\r\n </button>\r\n </div>\r\n <!-- Only add divider between items -->\r\n <div class=\"request-divider\" *ngIf=\"i < requestItems.length - 1\"></div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</ng-container>","import { Component, ElementRef, ViewChild, AfterViewInit, ChangeDetectorRef, effect } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NavigationEnd, Router, RouterModule } from '@angular/router';\r\nimport { CideLytRequestService, TabInfo } from '../request.service';\r\nimport { filter } from 'rxjs/operators';\r\n\r\n@Component({\r\n selector: 'cide-lyt-tab-content',\r\n standalone: true,\r\n imports: [CommonModule, RouterModule],\r\n template: `\r\n <div class=\"tab-content-container\" #scrollContainer (scroll)=\"onScroll()\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n `,\r\n styles: [`\r\n :host {\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n \r\n .tab-content-container {\r\n height: 100%;\r\n width: 100%;\r\n position: relative;\r\n display: flex;\r\n flex-direction: column;\r\n flex: 1;\r\n }\r\n \r\n /* Ensure router outlet components take full height */\r\n ::ng-deep router-outlet + * {\r\n height: 100%;\r\n flex: 1;\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n \r\n /* Specific height fixes for common component selectors */\r\n ::ng-deep cide-lyt-home-wrapper,\r\n ::ng-deep cide-adm-home-wrapper,\r\n ::ng-deep cide-adm-entity,\r\n ::ng-deep cide-adm-entity-list {\r\n height: 100% !important;\r\n flex: 1 !important;\r\n display: flex !important;\r\n flex-direction: column !important;\r\n }\r\n `]\r\n})\r\nexport class TabContentComponent implements AfterViewInit {\r\n @ViewChild('scrollContainer') scrollContainerRef!: ElementRef<HTMLDivElement>;\r\n\r\n private currentActiveTabId: string | null = null;\r\n private isRestoringScroll = false; // Flag to prevent saving scroll during restoration attempts\r\n\r\n constructor(\r\n private requestService: CideLytRequestService,\r\n private router: Router, // Inject Router to listen for NavigationEnd\r\n private cdr: ChangeDetectorRef\r\n ) {\r\n // Modern Angular signal pattern: Use effect to react to active tab changes\r\n effect(() => {\r\n const activeTab = this.requestService.activeTab();\r\n if (activeTab && activeTab.id !== this.currentActiveTabId) {\r\n this.currentActiveTabId = activeTab.id;\r\n // Delay scroll restoration to ensure DOM is ready\r\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\r\n delay(100).then(() => this.restoreScrollPosition(activeTab));\r\n }\r\n });\r\n\r\n // Listen to route changes for scroll restoration\r\n this.router.events.pipe(\r\n filter(event => event instanceof NavigationEnd)\r\n ).subscribe({\r\n next: () => {\r\n // Use signal to get active tab after navigation\r\n const activeTab = this.requestService.activeTab();\r\n if (activeTab && activeTab.id !== this.currentActiveTabId) {\r\n this.currentActiveTabId = activeTab.id;\r\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\r\n delay(150).then(() => this.restoreScrollPosition(activeTab));\r\n }\r\n }\r\n });\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n // Initial scroll restoration for the active tab\r\n const activeTab = this.requestService.activeTab();\r\n if (activeTab) {\r\n this.currentActiveTabId = activeTab.id;\r\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\r\n delay(50).then(() => this.restoreScrollPosition(activeTab));\r\n }\r\n }\r\n\r\n onScroll(): void {\r\n if (this.isRestoringScroll || !this.scrollContainerRef || !this.currentActiveTabId) {\r\n return;\r\n }\r\n const { scrollTop, scrollLeft } = this.scrollContainerRef.nativeElement;\r\n this.requestService.updateTabScrollPosition(this.currentActiveTabId, scrollTop, scrollLeft);\r\n }\r\n\r\n private restoreScrollPosition(tab: TabInfo | undefined): void {\r\n if (tab && this.scrollContainerRef?.nativeElement) {\r\n this.isRestoringScroll = true;\r\n const container = this.scrollContainerRef.nativeElement;\r\n container.scrollTop = tab.scrollTop ?? 0;\r\n container.scrollLeft = tab.scrollLeft ?? 0;\r\n // Modern ES2022+ pattern: Use Promise-based delay\r\n const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));\r\n delay(150).then(() => { this.isRestoringScroll = false; }); // Allow scroll event to settle\r\n }\r\n }\r\n\r\n\r\n}\r\n","import { Component } from '@angular/core';\r\nimport { CideLytHeaderWrapperComponent } from \"../../header/header-wrapper/header-wrapper.component\";\r\nimport { CideLytSidebarWrapperComponent } from \"../../sidebar/sidebar-wrapper/sidebar-wrapper.component\";\r\nimport { CideLytSidedrawerWrapperComponent } from \"../../sidedrawer/sidedrawer-wrapper/sidedrawer-wrapper.component\";\r\nimport { CideLytFooterWrapperComponent } from \"../../footer/footer-wrapper/footer-wrapper.component\";\r\nimport { CideLytConsoleWrapperComponent } from \"../../console/console-wrapper/console-wrapper.component\";\r\nimport { RouterModule } from '@angular/router';\r\nimport { CideLytRequestWrapperComponent } from \"../../request/request-wrapper/request-wrapper.component\";\r\nimport { TabContentComponent } from '../../request/tab-content/tab-content.component';\r\n\r\n@Component({\r\n selector: 'cide-lyt-layout-wrapper',\r\n standalone: true,\r\n templateUrl: './layout-wrapper.component.html',\r\n styleUrl: './layout-wrapper.component.css', \r\n imports: [\r\n CideLytHeaderWrapperComponent,\r\n CideLytSidebarWrapperComponent,\r\n CideLytSidedrawerWrapperComponent,\r\n CideLytFooterWrapperComponent,\r\n CideLytConsoleWrapperComponent,\r\n RouterModule,\r\n CideLytRequestWrapperComponent,\r\n TabContentComponent\r\n ]\r\n})\r\nexport class CideLytLayoutWrapperComponent {\r\n\r\n}\r\n","<div class=\"tw-w-full tw-table tw-h-screen tw-relative\" id=\"cide-lyt-layout-wrapper\">\r\n <!-- We will use here Header -->\r\n <cide-lyt-header-wrapper class=\"tw-table-row tw-h-0\"></cide-lyt-header-wrapper>\r\n <!-- we will use here request tabs -->\r\n <div class=\"tw-table-row\" id=\"cide-lyt-sidebar-page-wrapper\">\r\n <div class=\"cide-lyt-sidebar-page-wrapper tw-h-full tw-w-screen\" id=\"cide-lyt-sidebar-page-inner-wrapper\">\r\n <!-- We will use here Sidebar -->\r\n <cide-lyt-sidebar-wrapper id=\"cide-lyt-sidebar-page\"\r\n class=\"cide-lyt-sidebar-page-hide\"></cide-lyt-sidebar-wrapper>\r\n <!-- We will use here Router Outlet -->\r\n <div class=\"cide-lyt-page-wrapper tw-block tw-h-full tw-w-full\" id=\"cide-lyt-page-wrapper\">\r\n <cide-lyt-request-wrapper class=\"tw-w-[inherit] tw-h-auto\"></cide-lyt-request-wrapper>\r\n <div class=\"cide-lyt-outlet-sidedrawer-wrapper tw-table-row\"\r\n id=\"cide-lyt-outlet-sidedrawer-wrapper\">\r\n <div class=\"tw-w-full tw-h-full tw-overflow-y-auto cide-scrollbar-width-thin\"\r\n id=\"cide-lyt-outlet-wrapper\">\r\n <cide-lyt-tab-content></cide-lyt-tab-content>\r\n </div>\r\n <!-- We will use here Side Drawer -->\r\n <cide-lyt-sidedrawer-wrapper></cide-lyt-sidedrawer-wrapper>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"cide-lyt-footer-console-wrapper cide-lyt-footer-console-wrapper-hide tw-relative tw-table-row tw-h-0\"\r\n id=\"cide-lyt-footer-console-wrapper\">\r\n <!-- We will use here footer -->\r\n <cide-lyt-footer-wrapper></cide-lyt-footer-wrapper>\r\n <!-- We will use here Console -->\r\n <cide-lyt-console-wrapper></cide-lyt-console-wrapper>\r\n </div>\r\n</div>","import { Component } from '@angular/core';\r\nimport { CideLytLayoutWrapperComponent } from \"./layout/layout/layout-wrapper/layout-wrapper.component\";\r\nimport { CideEleFloatingContainerManagerComponent } from \"cloud-ide-element\";\r\nimport { CideEleGlobalNotificationsComponent } from \"cloud-ide-element\";\r\n\r\n@Component({\r\n selector: 'cide-lyt-wrapper',\r\n template: `\r\n <cide-lyt-layout-wrapper></cide-lyt-layout-wrapper>\r\n \r\n <!-- Floating Container Manager -->\r\n <cide-ele-floating-container-manager></cide-ele-floating-container-manager>\r\n \r\n <!-- Global Notifications and Confirmation Dialogs -->\r\n <cide-ele-global-notifications></cide-ele-global-notifications>\r\n `,\r\n styles: ``,\r\n imports: [\r\n CideLytLayoutWrapperComponent,\r\n CideEleFloatingContainerManagerComponent,\r\n CideEleGlobalNotificationsComponent\r\n ]\r\n})\r\nexport class CloudIdeLayoutComponent {\r\n\r\n}\r\n","import { Injectable, inject } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { CideLytRequestService } from '../request/request.service';\nimport { CideEleFloatingContainerService } from 'cloud-ide-element';\n\n/**\n * Service to detect component context (tab or floating container) and close appropriately\n * This allows components to close themselves without knowing their context\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ComponentContextService {\n private requestService = inject(CideLytRequestService);\n private floatingContainerService = inject(CideEleFloatingContainerService);\n private router = inject(Router);\n private route = inject(ActivatedRoute);\n\n /**\n * Close the current component context\n * - If in a tab: closes the tab\n * - If in a floating container: closes the floating container\n * - If neither: navigates to a fallback route (optional)\n * \n * @param fallbackRoute Optional route to navigate to if not in tab or floating container\n * @param containerId Optional specific container ID to close (if known)\n */\n close(fallbackRoute?: string[], containerId?: string): void {\n // First, try to close floating container if containerId is provided\n if (containerId) {\n const containers = this.floatingContainerService.visibleContainers();\n const container = containers.find(c => c.id === containerId);\n if (container) {\n console.log('🔒 [ComponentContext] Closing floating container:', containerId);\n this.floatingContainerService.hide(containerId);\n return;\n }\n }\n\n // Try to find and close any floating container that might contain this component\n // We check if there are any visible containers\n const visibleContainers = this.floatingContainerService.visibleContainers();\n if (visibleContainers.length > 0) {\n // Close the topmost container (last in array is typically the most recent)\n const topContainer = visibleContainers[visibleContainers.length - 1];\n console.log('🔒 [ComponentContext] Closing topmost floating container:', topContainer.id);\n this.floatingContainerService.hide(topContainer.id);\n return;\n }\n\n // Check if we're in a tab\n const activeTab = this.requestService.activeTab();\n if (activeTab) {\n // Get current route to match with tab\n const currentUrl = this.router.url.split('?')[0]; // Remove query params for comparison\n const tabRoute = activeTab.route.split('?')[0]; // Remove query params from tab route too\n \n // Normalize routes for comparison (remove leading/trailing slashes and convert to lowercase)\n const normalizeRoute = (route: string) => {\n return route.replace(/^\\/+|\\/+$/g, '').toLowerCase();\n };\n const normalizedCurrent = normalizeRoute(currentUrl);\n const normalizedTab = normalizeRoute(tabRoute);\n \n console.log('🔍 [ComponentContext] Route matching:', {\n currentUrl,\n tabRoute,\n normalizedCurrent,\n normalizedTab,\n activeTabId: activeTab.id,\n activeTabTitle: activeTab.title\n });\n \n // Check if current route matches the active tab route (exact or starts with)\n // Also check if routes end with the same path segment\n const currentSegments = normalizedCurrent.split('/');\n const tabSegments = normalizedTab.split('/');\n const lastCurrentSegment = currentSegments[currentSegments.length - 1];\n const lastTabSegment = tabSegments[tabSegments.length - 1];\n \n const routesMatch = normalizedCurrent === normalizedTab || \n normalizedCurrent.startsWith(normalizedTab + '/') ||\n normalizedTab.startsWith(normalizedCurrent + '/') ||\n (lastCurrentSegment && lastTabSegment && lastCurrentSegment === lastTabSegment);\n \n if (routesMatch) {\n console.log('🔒 [ComponentContext] Closing active tab:', activeTab.id);\n this.requestService.closeTab(activeTab.id);\n return;\n }\n\n // Check all tabs to find a match\n const allTabs = this.requestService.tabs();\n const matchingTab = allTabs.find(tab => {\n const tabRoutePath = tab.route.split('?')[0];\n const normalizedTabPath = normalizeRoute(tabRoutePath);\n const tabSegments = normalizedTabPath.split('/');\n const lastTabSegment = tabSegments[tabSegments.length - 1];\n \n return normalizedCurrent === normalizedTabPath || \n normalizedCurrent.startsWith(normalizedTabPath + '/') ||\n normalizedTabPath.startsWith(normalizedCurrent + '/') ||\n (lastCurrentSegment && lastTabSegment && lastCurrentSegment === lastTabSegment);\n });\n\n if (matchingTab) {\n console.log('🔒 [ComponentContext] Closing matching tab:', matchingTab.id);\n this.requestService.closeTab(matchingTab.id);\n return;\n }\n \n // If no match found but we have an active tab, close it anyway\n // This handles cases where route format might differ slightly\n console.log('🔒 [ComponentContext] No route match found, but closing active tab anyway:', activeTab.id);\n this.requestService.closeTab(activeTab.id);\n return;\n }\n\n // If neither tab nor floating container, navigate to fallback route\n if (fallbackRoute && fallbackRoute.length > 0) {\n console.log('🔒 [ComponentContext] Not in tab or container, navigating to fallback:', fallbackRoute);\n this.router.navigate(fallbackRoute, { relativeTo: this.route });\n } else {\n console.warn('⚠️ [ComponentContext] No context found to close and no fallback route provided');\n }\n }\n\n /**\n * Check if component is in a tab\n */\n isInTab(): boolean {\n const activeTab = this.requestService.activeTab();\n if (!activeTab) return false;\n\n const currentUrl = this.router.url.split('?')[0];\n const tabRoute = activeTab.route.split('?')[0];\n \n return currentUrl === tabRoute || currentUrl.startsWith(tabRoute + '/');\n }\n\n /**\n * Check if component is in a floating container\n */\n isInFloatingContainer(): boolean {\n return this.floatingContainerService.visibleContainers().length > 0;\n }\n\n /**\n * Get the current context type\n */\n getContextType(): 'tab' | 'floating-container' | 'none' {\n if (this.isInFloatingContainer()) {\n return 'floating-container';\n }\n if (this.isInTab()) {\n return 'tab';\n }\n return 'none';\n }\n}\n\n","import { Component, OnInit, viewChild, inject, ChangeDetectionStrategy, input, signal, computed, effect } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { CideLytSharedService } from '../shared.service';\nimport { designConfigControllerResponse, designConfigResponseData, MDesignConfig } from 'cloud-ide-lms-model';\nimport { CideLytSidedrawerService } from '../../sidedrawer/sidedrawer.service';\nimport { AppStateHelperService } from '../../../services/app-state/app-state-helper.service';\nimport { CideEleBreadcrumbComponent } from 'cloud-ide-element';\nimport { ComponentContextService } from '../component-context.service';\n\n@Component({\n selector: 'cide-lyt-shared-wrapper',\n imports: [CideEleBreadcrumbComponent],\n templateUrl: './shared-wrapper.component.html',\n styleUrl: './shared-wrapper.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CideLytSharedWrapperComponent implements OnInit {\n breadcrumb = viewChild(CideEleBreadcrumbComponent);\n public shared_wrapper_setup_param = input<Partial<CideLytSharedWrapperSetupParam>>({});\n public breadcrumb_data = input<BreadcrumbItem[]>([]);\n // Convert page_data to signal so breadcrumb updates reactively when page data loads\n public page_data = signal<designConfigResponseData>({});\n private sharedService = inject(CideLytSharedService);\n private sidedrawerService = inject(CideLytSidedrawerService);\n protected router = inject(Router);\n protected appState = inject(AppStateHelperService);\n private componentContextService = inject(ComponentContextService);\n\n // Signal for additional breadcrumb items that will be appended after Module > Current Page\n private additionalBreadcrumbItems = signal<BreadcrumbItem[]>([]);\n \n // Computed signal that combines default breadcrumb with additional items\n private fullBreadcrumbItems = computed(() => {\n const moduleInfo = this.appState.getActiveModuleInfo();\n const pageCode = this.shared_wrapper_setup_param()?.sypg_page_code;\n const pageData = this.page_data(); // Get current value from signal\n \n // Default breadcrumb items\n const defaultItems: BreadcrumbItem[] = [];\n \n // Add module if available\n if (moduleInfo?.title) {\n defaultItems.push({\n id: moduleInfo.id || 'module',\n label: moduleInfo.title,\n icon: moduleInfo.icon || undefined,\n url: moduleInfo.path || undefined\n });\n }\n \n // Add current page - use title from page data if available, otherwise fallback to page code\n const currentPageTitle = pageData?.page?.sypg_title || pageCode || 'Current';\n defaultItems.push({\n id: 'current-page',\n label: currentPageTitle,\n icon: undefined,\n url: undefined\n });\n \n // Append additional items from input signal, filtering out duplicates\n const inputBreadcrumbData = this.breadcrumb_data();\n if (inputBreadcrumbData.length > 0) {\n // Filter out items that duplicate the current page title or are \"Home\" (already shown as icon)\n const filteredItems = inputBreadcrumbData.filter(item => {\n // Skip \"Home\" items as they're already shown as an icon by the breadcrumb component\n const isHome = item.id === 'home' || item.label?.toLowerCase() === 'home';\n // Skip items that match the current page title (already in defaultItems)\n const matchesCurrentPage = item.label?.toLowerCase() === currentPageTitle.toLowerCase();\n // Skip items that match the module title\n const matchesModule = moduleInfo?.title && item.label?.toLowerCase() === moduleInfo.title.toLowerCase();\n return !isHome && !matchesCurrentPage && !matchesModule;\n });\n return [...defaultItems, ...filteredItems];\n }\n \n // Append additional items from internal signal (for backward compatibility)\n const additionalItems = this.additionalBreadcrumbItems();\n if (additionalItems.length > 0) {\n // Filter out duplicates here too\n const filteredAdditional = additionalItems.filter(item => {\n const isHome = item.id === 'home' || item.label?.toLowerCase() === 'home';\n const matchesCurrentPage = item.label?.toLowerCase() === currentPageTitle.toLowerCase();\n const matchesModule = moduleInfo?.title && item.label?.toLowerCase() === moduleInfo.title.toLowerCase();\n return !isHome && !matchesCurrentPage && !matchesModule;\n });\n return [...defaultItems, ...filteredAdditional];\n }\n \n return defaultItems;\n });\n\n constructor() {\n // Watch for changes in breadcrumb data and update breadcrumb component\n effect(() => {\n const breadcrumbRef = this.breadcrumb();\n const items = this.fullBreadcrumbItems();\n \n console.log('🍞 Shared wrapper breadcrumb effect triggered:', items);\n \n if (breadcrumbRef && items.length > 0) {\n breadcrumbRef.updateItems(items);\n console.log('🍞 Breadcrumb updated with items:', items);\n }\n });\n }\n\n ngOnInit() {\n // Load and process page data using modern approach\n if (this.shared_wrapper_setup_param()?.sypg_page_code) {\n const entityId = this.appState.getActiveEntityId();\n const page_data_payload: MDesignConfig = { \n sypg_page_code: this.shared_wrapper_setup_param()?.sypg_page_code, \n sytm_entity_id_syen: entityId || undefined \n };\n console.log('🔍 Page data payload:', page_data_payload);\n \n this.sharedService.loadAndProcessPageData(page_data_payload, {\n setTitle: true,\n setSidebarContext: true,\n updateLayout: true\n }).subscribe({\n next: (page_data_response: designConfigControllerResponse) => {\n console.log('✅ SHARED WRAPPER: Page data loaded and processed for:', page_data_payload.sypg_page_code);\n // Update page_data signal - this will trigger breadcrumb recomputation\n this.page_data.set(page_data_response?.data || {});\n \n // Sidebar context is automatically set by loadAndProcessPageData when setSidebarContext: true\n const pageId = page_data_response?.data?.page?._id || '';\n const themeId = page_data_response?.data?.theme?._id || '';\n this.sidedrawerService.setContext(pageId, themeId);\n\n // Breadcrumb will be updated automatically by the effect when fullBreadcrumbItems changes\n // Now that page_data is a signal, the computed signal will react to changes\n },\n error: (err) => {\n console.error('❌ SHARED WRAPPER: Error loading page data:', err);\n }\n });\n }\n }\n\n /**\n * Add additional breadcrumb items that will be appended after the default Module > Current Page path\n * @param items Array of breadcrumb items to append\n */\n addBreadcrumbItems(items: BreadcrumbItem[]): void {\n this.additionalBreadcrumbItems.set(items);\n // Update breadcrumb immediately\n const breadcrumbRef = this.breadcrumb();\n if (breadcrumbRef) {\n const fullItems = this.fullBreadcrumbItems();\n breadcrumbRef.updateItems(fullItems);\n }\n }\n\n /**\n * Clear additional breadcrumb items (keeps only default Module > Current Page)\n */\n clearAdditionalBreadcrumbItems(): void {\n this.additionalBreadcrumbItems.set([]);\n // Update breadcrumb immediately\n const breadcrumbRef = this.breadcrumb();\n if (breadcrumbRef) {\n const fullItems = this.fullBreadcrumbItems();\n breadcrumbRef.updateItems(fullItems);\n }\n }\n\n /**\n * Set additional breadcrumb items (replaces any existing additional items)\n * @param items Array of breadcrumb items to set\n */\n setBreadcrumbItems(items: BreadcrumbItem[]): void {\n this.additionalBreadcrumbItems.set(items);\n // Update breadcrumb immediately\n const breadcrumbRef = this.breadcrumb();\n if (breadcrumbRef) {\n const fullItems = this.fullBreadcrumbItems();\n breadcrumbRef.updateItems(fullItems);\n }\n }\n\n /**\n * Handle breadcrumb home button click - navigate to control panel home\n */\n onBreadcrumbHomeClick(): void {\n this.router.navigate(['/control-panel']);\n }\n\n /**\n * Close the current component context\n * - If in a tab: closes the tab\n * - If in a floating container: closes the floating container\n * - If neither: navigates to fallback route (optional)\n * \n * This method can be called from child components to close themselves\n * without needing to know their context (tab vs floating container)\n * \n * @param fallbackRoute Optional route to navigate to if not in tab or floating container\n * @param containerId Optional specific container ID to close (if known)\n */\n close(fallbackRoute?: string[], containerId?: string): void {\n this.componentContextService.close(fallbackRoute, containerId);\n }\n\n}\n\nexport interface CideLytSharedWrapperSetupParam {\n sypg_page_code: string\n}\n\nexport interface BreadcrumbItem {\n id: string;\n label: string;\n icon?: string;\n url?: string;\n}","<div class=\"tw-w-full tw-h-full tw-flex tw-flex-col tw-max-w-full tw-overflow-hidden\">\n <div\n class=\"tw-sticky tw-w-full tw-max-w-full tw-top-0 tw-z-50 tw-bg-white tw-border-b tw-border-gray-200 tw-shadow-sm\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-gap-2 tw-px-3 sm:tw-px-4 tw-py-2 sm:tw-py-0.5 tw-min-w-0 tw-overflow-hidden tw-flex-wrap sm:tw-flex-nowrap\">\n <div class=\"tw-flex-1 tw-min-w-0 tw-overflow-hidden tw-order-1\">\n <cide-ele-breadcrumb style=\"modern\" [compact]=\"true\" (homeClick)=\"onBreadcrumbHomeClick()\"></cide-ele-breadcrumb>\n </div>\n <div class=\"tw-flex-shrink-0 tw-ml-2 sm:tw-ml-4 tw-order-2\">\n <ng-content select=\"[breadcrumb-actions]\"></ng-content>\n </div>\n </div>\n </div>\n\n <div class=\"tw-flex-1 tw-w-full tw-max-w-full tw-overflow-y-auto tw-overflow-x-hidden tw-min-h-0\">\n <ng-content></ng-content>\n </div>\n</div>","import { Injectable, inject, computed, signal, effect } from '@angular/core';\nimport { CideLytSharedService } from './shared.service';\nimport { designConfigResponseData } from 'cloud-ide-lms-model';\nimport { AppStateHelperService } from '../../services/app-state/app-state-helper.service';\n\n/**\n * Common Rights Service\n * Provides a centralized way to check user permissions based on page rights\n * \n * Usage:\n * ```typescript\n * private rightsService = inject(RightsService);\n * \n * ngOnInit() {\n * this.rightsService.initializeRights('fdsk_lead_config');\n * }\n * \n * // Check if user has a specific right\n * if (this.rightsService.hasRight('CREATE')) {\n * // Show create button\n * }\n * \n * // Get all rights for current page\n * const rights = this.rightsService.getRights();\n * ```\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class RightsService {\n private sharedService = inject(CideLytSharedService);\n private appState = inject(AppStateHelperService);\n \n // Current page code signal\n private currentPageCode = signal<string>('');\n \n // Separate signal for rights-only data (when fetched via rights-only endpoint)\n private rightsOnlyCache = signal<{ [pageCode: string]: { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } } }>({});\n \n constructor() {\n // Auto-fetch rights when page code changes and rights are not loaded\n effect(() => {\n const pageCode = this.currentPageCode();\n if (pageCode) {\n const rightsLoaded = this.areRightsLoaded();\n const rightsOnlyLoaded = !!this.rightsOnlyCache()[pageCode];\n \n // Auto-fetch rights-only if not loaded\n if (!rightsLoaded && !rightsOnlyLoaded) {\n // Small delay to avoid race conditions and allow component to set up\n setTimeout(() => {\n // Double-check after delay to avoid duplicate requests\n if (!this.rightsOnlyCache()[pageCode] && !this.areRightsLoaded()) {\n this.loadRightsOnly(pageCode);\n }\n }, 100);\n }\n }\n });\n }\n \n // Computed signal that automatically updates when page data cache changes\n private rightsComputed = computed(() => {\n const pageCode = this.currentPageCode();\n if (!pageCode) {\n return {};\n }\n\n // First check rights-only cache\n const rightsOnlyData = this.rightsOnlyCache()[pageCode];\n if (rightsOnlyData) {\n return rightsOnlyData;\n }\n\n // Fallback to full page config cache\n const cache = this.sharedService.pageDataCache();\n const cached = cache[pageCode];\n \n if (cached?.response?.data?.rights) {\n return cached.response.data.rights;\n }\n\n // Fallback to direct cache lookup\n const cachedData = this.sharedService.getCachedPageData(pageCode);\n return cachedData?.data?.rights || {};\n });\n\n /**\n * Initialize rights for a specific page\n * Call this in component ngOnInit with the page code\n * @param pageCode - Page code to initialize rights for\n * @param forceRefresh - If true, invalidates cache and forces refresh\n * @param fetchRightsOnly - If true, uses the lightweight rights-only endpoint instead of full page config. \n * If 'auto', automatically fetches rights-only if not already loaded.\n */\n initializeRights(pageCode: string, forceRefresh: boolean = false, fetchRightsOnly: boolean | 'auto' = 'auto'): void {\n this.currentPageCode.set(pageCode);\n \n if (forceRefresh) {\n // Invalidate cache to force fresh data from API\n this.sharedService.invalidateCache(pageCode);\n // Also clear rights-only cache\n const currentCache = this.rightsOnlyCache();\n const updatedCache = { ...currentCache };\n delete updatedCache[pageCode];\n this.rightsOnlyCache.set(updatedCache);\n console.log('🔄 RightsService: Cache invalidated, forcing refresh for page:', pageCode);\n }\n \n // Check if rights are already loaded\n const rightsLoaded = this.areRightsLoaded();\n const rightsOnlyLoaded = !!this.rightsOnlyCache()[pageCode];\n \n // Auto-fetch if rights are not loaded and fetchRightsOnly is 'auto' or true\n if (fetchRightsOnly === 'auto' && !rightsLoaded && !rightsOnlyLoaded) {\n // Automatically fetch rights-only if not loaded\n this.loadRightsOnly(pageCode);\n console.log('🔐 RightsService: Auto-fetching rights-only for page:', pageCode);\n } else if (fetchRightsOnly === true && (forceRefresh || !rightsOnlyLoaded)) {\n // Explicitly fetch rights-only\n this.loadRightsOnly(pageCode);\n console.log('🔐 RightsService: Fetching rights-only for page:', pageCode);\n } else if (rightsLoaded || rightsOnlyLoaded) {\n console.log('🔐 RightsService initialized for page:', pageCode, '(rights already loaded)');\n } else {\n console.log('🔐 RightsService initialized for page:', pageCode);\n }\n }\n\n /**\n * Load rights only using the lightweight endpoint\n * This is useful when you only need rights without full page config\n * @param pageCode - Page code to load rights for\n */\n loadRightsOnly(pageCode: string): void {\n this.sharedService.getPageRights(pageCode).subscribe({\n next: (response) => {\n if (response.success && response.data) {\n // Update rights-only cache\n const currentCache = this.rightsOnlyCache();\n this.rightsOnlyCache.set({\n ...currentCache,\n [pageCode]: response.data!.rights\n });\n console.log('🔐 RightsService: Rights fetched via rights-only endpoint for page:', pageCode, response.data.rights);\n }\n },\n error: (error) => {\n console.error('❌ RightsService: Error fetching rights:', error);\n }\n });\n }\n\n /**\n * Get current rights (reactive)\n */\n private getCurrentRights(): { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } } {\n return this.rightsComputed();\n }\n\n /**\n * Check if user has a specific right\n * @param rightCode - The right code to check (e.g., 'CREATE', 'EDIT', 'DELETE', 'VIEW')\n * @returns true if the user has the right, false otherwise\n */\n hasRight(rightCode: string): boolean {\n const rights = this.getCurrentRights();\n const right = rights[rightCode];\n const hasAccess = right?.allowed === true;\n console.log(`🔐 Checking right '${rightCode}' for page '${this.currentPageCode()}':`, hasAccess);\n return hasAccess;\n }\n\n /**\n * Check if user has any of the specified rights\n * @param rightCodes - Array of right codes to check\n * @returns true if user has at least one of the rights\n */\n hasAnyRight(rightCodes: string[]): boolean {\n return rightCodes.some(code => this.hasRight(code));\n }\n\n /**\n * Check if user has all of the specified rights\n * @param rightCodes - Array of right codes to check\n * @returns true if user has all of the rights\n */\n hasAllRights(rightCodes: string[]): boolean {\n return rightCodes.every(code => this.hasRight(code));\n }\n\n /**\n * Get the source of a right (role or exception)\n * @param rightCode - The right code\n * @returns 'role' | 'exception' | null\n */\n getRightSource(rightCode: string): 'role' | 'exception' | null {\n const rights = this.getCurrentRights();\n const right = rights[rightCode];\n return right?.source || null;\n }\n\n /**\n * Get all rights for the current page\n * @returns Object containing all rights with their allowed status and source\n */\n getRights(): { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } } {\n return this.getCurrentRights();\n }\n\n /**\n * Get all allowed rights\n * @returns Array of right codes that are allowed\n */\n getAllowedRights(): string[] {\n const rights = this.getCurrentRights();\n return Object.keys(rights).filter(code => rights[code]?.allowed === true);\n }\n\n /**\n * Get rights as a computed signal (for reactive templates)\n * @returns Computed signal that updates when rights change\n */\n getRightsSignal() {\n return this.rightsComputed;\n }\n\n /**\n * Check rights for a specific page code (without initializing)\n * Useful for checking rights of other pages\n */\n checkRightsForPage(pageCode: string): { [permissionId: string]: { allowed: boolean; source: 'role' | 'exception' } } {\n // First check rights-only cache\n const rightsOnlyData = this.rightsOnlyCache()[pageCode];\n if (rightsOnlyData) {\n return rightsOnlyData;\n }\n \n // Fallback to full page config cache\n const cachedData = this.sharedService.getCachedPageData(pageCode);\n return cachedData?.data?.rights || {};\n }\n\n /**\n * Check if user has a specific right for a specific page\n */\n hasRightForPage(pageCode: string, rightCode: string): boolean {\n const rights = this.checkRightsForPage(pageCode);\n return rights[rightCode]?.allowed === true;\n }\n\n /**\n * Check if rights are loaded for the current page\n * @returns true if rights have been loaded (even if empty)\n */\n areRightsLoaded(): boolean {\n const pageCode = this.currentPageCode();\n if (!pageCode) return false;\n \n const cache = this.sharedService.pageDataCache();\n const cached = cache[pageCode];\n return !!cached?.response?.data;\n }\n\n /**\n * Get current page code\n */\n getCurrentPageCode(): string {\n return this.currentPageCode();\n }\n\n /**\n * Force refresh rights by invalidating cache\n * Call this after rights are updated in the database\n * @param useRightsOnlyEndpoint - If true, uses the lightweight rights-only endpoint\n */\n refreshRights(useRightsOnlyEndpoint: boolean = false): void {\n const pageCode = this.currentPageCode();\n if (pageCode) {\n // Clear rights-only cache\n const currentCache = this.rightsOnlyCache();\n const updatedCache = { ...currentCache };\n delete updatedCache[pageCode];\n this.rightsOnlyCache.set(updatedCache);\n \n // Invalidate full page config cache\n this.sharedService.invalidateCache(pageCode);\n \n // If using rights-only endpoint, fetch immediately\n if (useRightsOnlyEndpoint) {\n this.loadRightsOnly(pageCode);\n }\n \n console.log('🔄 RightsService: Cache invalidated for page:', pageCode);\n }\n }\n}\n\n","import { Route } from '@angular/router';\nimport { authGuard } from 'cloud-ide-shared';\n\nexport const layoutRoutes: Route = {\n path: \"control-panel\",\n loadComponent: () => import('./cloud-ide-layout.component').then(c => c.CloudIdeLayoutComponent),\n canActivate: [authGuard]\n};\n\nexport const layoutControlPannelChildRoutes: Route[] = [{\n path: \"\",\n pathMatch: \"full\",\n redirectTo: \"home\"\n},\n{\n path: \"home\",\n loadComponent: () => import('./layout/home/home-wrapper/home-wrapper.component').then(c => c.CideLytHomeWrapperComponent),\n canActivate: [authGuard],\n data: {\n sypg_page_code: \"cide_lyt_home\" // Used by RequestService to fetch tab properties\n }\n},\n{\n path: \"dashboard-manager\",\n loadComponent: () => import('./components/dashboard-manager/dashboard-manager.component').then(c => c.DashboardManagerComponent),\n canActivate: [authGuard],\n data: {\n sypg_page_code: \"cide_lyt_dashboard_manager\"\n }\n}\n]; ","\r\nimport { Injectable, PLATFORM_ID, InjectionToken, signal, inject } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { tap } from 'rxjs/operators';\r\nimport { Observable, of } from 'rxjs';\r\nimport {\r\n cidePath, designConfigRoutesUrl, hostManagerRoutesUrl,\r\n SystemThemeControllerRespoonse, SystemThemesListControllerRespoonse,\r\n IEnvironmentConfig, SystemThemeUserPreferencesControllerRespoonse,\r\n MSystemThemeUserPreferencesRequest, SystemThemeControllerRespoonseData\r\n} from 'cloud-ide-lms-model';\r\nimport { isPlatformBrowser } from '@angular/common';\r\n\r\n// Define an InjectionToken for the environment configuration\r\n// This is needed to inject environment variables into services provided in 'root'\r\nexport const ENVIRONMENT_CONFIG = new InjectionToken<IEnvironmentConfig>('ENVIRONMENT_CONFIG');\r\n\r\n// Define an interface for your theme for type safety\r\nexport interface Theme {\r\n [key: string]: string; // Allows any string key, e.g., 'color-text-body'\r\n}\r\n\r\n/**\r\n * Utility function to convert database format keys to CSS format and handle units\r\n * @param key - The database format key (e.g., 'font_size_xxxl')\r\n * @param value - The value to be set\r\n * @returns Object with cssVarName and processed value\r\n */\r\nexport function processThemeVariable(key: string, value: string): { cssVarName: string; processedValue: string } {\r\n // 1. Convert the key from the DB format to the CSS format.\r\n const cssVarName = `${key.replace(/_/g, '-')}`;\r\n\r\n // 2. Append the font_size and line_height value to rem\r\n let processedValue = value;\r\n if (cssVarName.includes('font-size') || cssVarName.includes('line-height')) {\r\n processedValue = parseFloat(value) + 'rem';\r\n }\r\n\r\n return { cssVarName, processedValue: processedValue };\r\n}\r\n\r\n/**\r\n * Sets a single CSS variable on the document root element\r\n * @param key - The database format key (e.g., 'font_size_xxxl')\r\n * @param value - The value to be set\r\n * @param platformId - Platform ID for browser check\r\n */\r\nexport function setCSSVariable(key: string, value: string, platformId: object): void {\r\n if (isPlatformBrowser(platformId)) {\r\n const { cssVarName, processedValue } = processThemeVariable(key, value);\r\n const root = document.documentElement;\r\n root.style.setProperty(cssVarName, processedValue);\r\n }\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytThemeService {\r\n // Modern Angular signals for reactive state management\r\n private selectedThemeSignal = signal<string>(\"\");\r\n public selectedTheme = this.selectedThemeSignal.asReadonly();\r\n\r\n // Modern dependency injection\r\n private http = inject(HttpClient);\r\n private platformId = inject(PLATFORM_ID);\r\n private environment = inject(ENVIRONMENT_CONFIG);\r\n\r\n /**\r\n * Fetches the theme from the API and applies it to the document.\r\n * This method is intended to be called when the theme should actually be applied.\r\n */\r\n public fetchAndApplyTheme(): Observable<SystemThemeControllerRespoonse> {\r\n console.log('Fetching and applying theme via CideLytThemeService...');\r\n return this.loadTheme(); // Use the existing loadTheme logic\r\n }\r\n\r\n /**\r\n * Fetches the list of system themes from the API.\r\n */\r\n public fetchSystemThemesList(): Observable<SystemThemesListControllerRespoonse> {\r\n return this.http.get<SystemThemesListControllerRespoonse>(\r\n cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n designConfigRoutesUrl?.module,\r\n designConfigRoutesUrl?.getSystemThemesList\r\n ]));\r\n }\r\n\r\n /**\r\n * Internal method to fetch the theme from the API and apply it.\r\n */\r\n loadTheme() {\r\n return this.http.post<SystemThemeControllerRespoonse>(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, designConfigRoutesUrl?.module, designConfigRoutesUrl?.getSystemTheme]), { syupth_user_id_user: \"659a7ea0a1f0e08246661766\" }).pipe(\r\n tap(theme => {\r\n console.log(\"Applying theme:\", theme);\r\n this.applyTheme(theme?.data as SystemThemeControllerRespoonseData);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Sets the CSS variables on the root element.\r\n * @param theme - An object where keys are CSS variable names (e.g., '--color-text-body')\r\n * and values are the color strings (e.g., '#ffffff').\r\n */\r\n private applyTheme(theme: SystemThemeControllerRespoonseData): void {\r\n console.log(\"Applying theme:\", theme);\r\n let merged = {};\r\n if (theme?.core_system_themes?.syth_properties) {\r\n merged = { ...merged, ...theme.core_system_themes.syth_properties };\r\n this.selectedThemeSignal.set(theme.core_system_themes._id as string);\r\n }\r\n if (theme?.core_system_organization_themes?.syoth_overrides) {\r\n merged = { ...merged, ...theme.core_system_organization_themes.syoth_overrides };\r\n }\r\n if (theme?.core_system_theme_user_preferences?.syupth_overrides) {\r\n merged = { ...merged, ...theme.core_system_theme_user_preferences.syupth_overrides };\r\n }\r\n console.log(\"Merged theme:\", merged);\r\n // Check if the code is running in a browser environment.\r\n if (isPlatformBrowser(this.platformId)) {\r\n const root = document.documentElement;\r\n\r\n for (const [key, value] of Object.entries(merged)) {\r\n const { cssVarName, processedValue } = processThemeVariable(key, value as string);\r\n // Set the CSS custom property on the root element.\r\n root.style.setProperty(cssVarName, processedValue);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Saves the system theme user preferences.\r\n * @param themeVars - The theme variables to save.\r\n * @returns An observable of the system theme user preferences.\r\n */\r\n saveSystemThemeUserPreferences(themeVars: MSystemThemeUserPreferencesRequest): Observable<SystemThemeUserPreferencesControllerRespoonse> {\r\n return this.http.post<SystemThemeUserPreferencesControllerRespoonse>(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, designConfigRoutesUrl?.module, designConfigRoutesUrl?.systemThemeUserPreferences]), themeVars);\r\n }\r\n\r\n /**\r\n * Updates a single CSS variable using the utility function\r\n * @param key - The database format key (e.g., 'font_size_xxxl')\r\n * @param value - The value to be set\r\n */\r\n updateCSSVariable(key: string, value: string): void {\r\n setCSSVariable(key, value, this.platformId);\r\n }\r\n}\r\n\r\n/**\r\n * Factory function for APP_INITIALIZER.\r\n * This function is used in your app.config.ts.\r\n * It conditionally triggers theme loading based on the environment setting.\r\n */\r\nexport function themeFactory(themeService: CideLytThemeService, environmentConfig: IEnvironmentConfig): () => Observable<SystemThemeControllerRespoonse | undefined> {\r\n return () => {\r\n if (!environmentConfig.applyThemeOnLogin) {\r\n // If theme should be applied on app initialize, fetch and apply it.\r\n console.log('APP_INITIALIZER: Applying theme...');\r\n return themeService.fetchAndApplyTheme();\r\n } else {\r\n // If theme should be applied on login, APP_INITIALIZER does nothing for the theme.\r\n // We return an observable that immediately completes.\r\n console.log('APP_INITIALIZER: Theme application deferred to after login (per environment config).');\r\n return of(undefined); // Return an observable that completes immediately\r\n }\r\n };\r\n}","import { Injectable, inject, computed } from '@angular/core';\r\nimport { CideLytSharedService } from '../../layout/shared/shared.service';\r\nimport { Observable } from 'rxjs';\r\nimport { designConfigControllerResponse } from 'cloud-ide-lms-model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CacheManagerService {\r\n private sharedService = inject(CideLytSharedService);\r\n\r\n // Computed cache statistics\r\n public readonly cacheStats = computed(() => {\r\n const info = this.sharedService.cacheInfo();\r\n return {\r\n ...info,\r\n hitRatio: info.totalCached > 0 ? (info.validCached / info.totalCached) * 100 : 0,\r\n memoryEstimate: this.estimateCacheMemoryUsage()\r\n };\r\n });\r\n\r\n // Public access to cache state\r\n public readonly isLoading = (pageCode: string) => this.sharedService.isLoading(pageCode);\r\n public readonly getCachedData = (pageCode: string) => this.sharedService.getCachedPageData(pageCode);\r\n\r\n /**\r\n * Get page data with caching - this is the main method components should use\r\n */\r\n getPageData(pageCode: string, forceRefresh: boolean = false): Observable<designConfigControllerResponse> {\r\n return this.sharedService.loadAndProcessPageData(\r\n { sypg_page_code: pageCode },\r\n { forceRefresh, setTitle: true, setSidebarContext: true, updateLayout: true }\r\n );\r\n }\r\n\r\n /**\r\n * Preload multiple pages for better performance\r\n */\r\n preloadPages(pageCodes: string[]): void {\r\n console.log(`🚀 PRELOADING: Starting preload for ${pageCodes.length} pages`);\r\n this.sharedService.preloadPageData(pageCodes);\r\n }\r\n\r\n /**\r\n * Invalidate specific page cache\r\n */\r\n invalidatePage(pageCode: string): void {\r\n this.sharedService.invalidateCache(pageCode);\r\n }\r\n\r\n /**\r\n * Clear all cache\r\n */\r\n clearCache(): void {\r\n this.sharedService.clearAllCache();\r\n }\r\n\r\n /**\r\n * Get cache status for debugging\r\n */\r\n getCacheStatus(): { pageCode: string; cached: boolean; expired: boolean; loading: boolean }[] {\r\n const cache = this.sharedService.pageDataCache();\r\n const loadingStates = this.sharedService.loadingStates();\r\n \r\n const allPageCodes = new Set([\r\n ...Object.keys(cache),\r\n ...Object.keys(loadingStates)\r\n ]);\r\n\r\n return Array.from(allPageCodes).map(pageCode => ({\r\n pageCode,\r\n cached: !!cache[pageCode],\r\n expired: cache[pageCode] ? !this.isCacheValid(cache[pageCode]) : false,\r\n loading: !!loadingStates[pageCode]\r\n }));\r\n }\r\n\r\n /**\r\n * Estimate memory usage of cache (rough estimate)\r\n */\r\n private estimateCacheMemoryUsage(): string {\r\n const cache = this.sharedService.pageDataCache();\r\n const jsonString = JSON.stringify(cache);\r\n const bytes = new Blob([jsonString]).size;\r\n \r\n if (bytes < 1024) return `${bytes} B`;\r\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\r\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\r\n }\r\n\r\n /**\r\n * Check if cache entry is valid\r\n */\r\n private isCacheValid(cached: { timestamp: number; ttl: number } | undefined): boolean {\r\n if (!cached) return false;\r\n return Date.now() - cached.timestamp < cached.ttl;\r\n }\r\n\r\n /**\r\n * Export cache data for debugging or backup\r\n */\r\n exportCacheData(): string {\r\n return JSON.stringify(this.sharedService.pageDataCache(), null, 2);\r\n }\r\n\r\n /**\r\n * Get performance metrics\r\n */\r\n getPerformanceMetrics(): {\r\n totalPages: number;\r\n cachedPages: number;\r\n loadingPages: number;\r\n cacheHitRatio: number;\r\n averageResponseTime?: number;\r\n } {\r\n const stats = this.cacheStats();\r\n const loadingStates = this.sharedService.loadingStates();\r\n \r\n return {\r\n totalPages: stats.totalCached,\r\n cachedPages: stats.validCached,\r\n loadingPages: Object.keys(loadingStates).length,\r\n cacheHitRatio: stats.hitRatio,\r\n // averageResponseTime could be implemented with timing tracking\r\n };\r\n }\r\n} ","import { Injectable, Signal, inject } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable, throwError, BehaviorSubject } from 'rxjs';\r\nimport { catchError, tap } from 'rxjs/operators';\r\nimport { CideEleFloatingContainerService, FloatingContainerConfig } from 'cloud-ide-element';\r\nimport { \r\n cidePath, \r\n coreRoutesUrl, \r\n generateStringFromObject, \r\n hostManagerRoutesUrl,\r\n CoreEntityAccessPassManagement,\r\n MCoreEntityAccessPassManagement,\r\n MCoreEntityAccessPassManagementInsertUpdate,\r\n MCoreEntityAccessPassManagementDeletePayload,\r\n MCoreEntityAccessPassManagementGetByIdPayload,\r\n MCoreEntityAccessPassManagementToggleStatusPayload,\r\n CoreEntityAccessPassManagementControllerResponse,\r\n CoreEntityAccessPassManagementByIdControllerResponse,\r\n CoreEntityAccessPassManagementInsertUpdateControllerResponse,\r\n CoreEntityAccessPassManagementDeleteControllerResponse,\r\n CoreEntityAccessPassManagementToggleStatusControllerResponse\r\n} from 'cloud-ide-lms-model';\r\n\r\nexport interface EntityRightsSharingData {\r\n syepm_access_passs_to: string;\r\n core_entity_access_pass_management: string;\r\n syepm_user_id_user: string;\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytFloatingEntityRightsSharingService {\r\n private containerService = inject(CideEleFloatingContainerService);\r\n private http = inject(HttpClient);\r\n private entityAccessPassListSubject = new BehaviorSubject<CoreEntityAccessPassManagement[]>([]);\r\n public entityAccessPassList$ = this.entityAccessPassListSubject.asObservable();\r\n\r\n constructor() {\r\n console.log('CideLytFloatingEntityRightsSharingService initialized with entity access pass management');\r\n }\r\n\r\n /**\r\n * Show entity rights sharing in floating container\r\n */\r\n async show(data?: Signal<EntityRightsSharingData>): Promise<string> {\r\n console.log('🚀 Showing entity rights sharing...');\r\n console.log('📋 Current registered components:', this.containerService.getRegisteredComponentIds());\r\n \r\n // Lazy registration - only register if not already registered\r\n if (!this.containerService.isComponentRegistered('entity-rights-sharing')) {\r\n console.log('📝 Registering entity rights sharing component...');\r\n await this.registerEntityRightsSharingComponent();\r\n console.log('📋 Components after registration:', this.containerService.getRegisteredComponentIds());\r\n } else {\r\n console.log('✅ Entity rights sharing component already registered');\r\n }\r\n\r\n const config: FloatingContainerConfig = {\r\n id: 'entity-rights-sharing-main',\r\n title: 'Entity Rights Sharing',\r\n icon: 'share',\r\n width: '450px',\r\n height: '500px',\r\n minWidth: '400px',\r\n minHeight: '400px',\r\n resizable: true,\r\n draggable: true,\r\n closable: true,\r\n minimizable: true,\r\n maximizable: true,\r\n componentId: 'entity-rights-sharing',\r\n componentConfig: {\r\n inputs: data ? { data } : undefined\r\n }\r\n };\r\n\r\n const containerId = this.containerService.show(config);\r\n console.log('✅ Container created with ID:', containerId);\r\n return containerId;\r\n }\r\n\r\n /**\r\n * Hide entity rights sharing\r\n */\r\n hide(): void {\r\n this.containerService.hide('entity-rights-sharing-main');\r\n }\r\n\r\n /**\r\n * Register the entity rights sharing component\r\n */\r\n private async registerEntityRightsSharingComponent(): Promise<void> {\r\n try {\r\n console.log('📦 Importing entity rights sharing component...');\r\n const module = await import('./floating-entity-rights-sharing.component');\r\n console.log('📦 Module imported:', module);\r\n console.log('📦 Component class:', module.CideLytFloatingEntityRightsSharingComponent);\r\n \r\n if (!module.CideLytFloatingEntityRightsSharingComponent) {\r\n throw new Error('Component class not found in module');\r\n }\r\n \r\n this.containerService.registerComponent('entity-rights-sharing', module.CideLytFloatingEntityRightsSharingComponent);\r\n console.log('✅ Entity rights sharing component registered successfully');\r\n console.log('📋 Available components after registration:', this.containerService.getRegisteredComponentIds());\r\n } catch (error) {\r\n console.error('❌ Failed to register entity rights sharing component:', error);\r\n console.error('❌ Error details:', error);\r\n }\r\n }\r\n\r\n // ============================================================================\r\n // ENTITY ACCESS PASS MANAGEMENT METHODS\r\n // ============================================================================\r\n\r\n /**\r\n * Get entity access pass management list from API\r\n */\r\n getEntityAccessPassList(body: MCoreEntityAccessPassManagement): Observable<CoreEntityAccessPassManagementControllerResponse> {\r\n const query = generateStringFromObject(body);\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl?.coreEntityAccessPassManagement,\r\n query\r\n ]);\r\n\r\n console.log('🔍 ENTITY ACCESS PASS SERVICE: Making API call to:', url);\r\n console.log('🔍 ENTITY ACCESS PASS SERVICE: Payload:', body);\r\n\r\n return this.http.get<CoreEntityAccessPassManagementControllerResponse>(url).pipe(\r\n tap(response => {\r\n if (response.success && response.data) {\r\n this.entityAccessPassListSubject.next(response.data);\r\n }\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n /**\r\n * Get entity access pass management by ID\r\n */\r\n getEntityAccessPassById(payload: MCoreEntityAccessPassManagementGetByIdPayload): Observable<CoreEntityAccessPassManagementByIdControllerResponse> {\r\n const query = generateStringFromObject(payload);\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl?.coreEntityAccessPassManagement,\r\n 'byId',\r\n query\r\n ]);\r\n\r\n console.log('🔍 ENTITY ACCESS PASS SERVICE: Getting by ID from:', url);\r\n console.log('🔍 ENTITY ACCESS PASS SERVICE: Payload:', payload);\r\n\r\n return this.http.get<CoreEntityAccessPassManagementByIdControllerResponse>(url).pipe(\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n /**\r\n * Insert or update entity access pass management\r\n */\r\n insertUpdateEntityAccessPass(payload: MCoreEntityAccessPassManagementInsertUpdate): Observable<CoreEntityAccessPassManagementInsertUpdateControllerResponse> {\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl?.coreEntityAccessPassManagement\r\n ]);\r\n\r\n console.log('💾 ENTITY ACCESS PASS SERVICE: Making POST request to:', url);\r\n console.log('💾 ENTITY ACCESS PASS SERVICE: Data payload:', payload);\r\n\r\n return this.http.post<CoreEntityAccessPassManagementInsertUpdateControllerResponse>(url, payload).pipe(\r\n tap(response => {\r\n if (response.success && response.data) {\r\n // Refresh the list after successful insert/update\r\n this.refreshEntityAccessPassList();\r\n }\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n /**\r\n * Delete entity access pass management\r\n */\r\n deleteEntityAccessPass(payload: MCoreEntityAccessPassManagementDeletePayload): Observable<CoreEntityAccessPassManagementDeleteControllerResponse> {\r\n const query = generateStringFromObject(payload);\r\n\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl?.coreEntityAccessPassManagement,\r\n query\r\n ]);\r\n\r\n console.log('🗑️ ENTITY ACCESS PASS SERVICE: Making DELETE request to:', url);\r\n console.log('🗑️ ENTITY ACCESS PASS SERVICE: Payload:', payload);\r\n\r\n return this.http.delete<CoreEntityAccessPassManagementDeleteControllerResponse>(url).pipe(\r\n tap(response => {\r\n if (response.success) {\r\n // Refresh the list after successful deletion\r\n this.refreshEntityAccessPassList();\r\n }\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n /**\r\n * Toggle entity access pass management status\r\n */\r\n toggleEntityAccessPassStatus(payload: MCoreEntityAccessPassManagementToggleStatusPayload): Observable<CoreEntityAccessPassManagementToggleStatusControllerResponse> {\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n coreRoutesUrl.module,\r\n coreRoutesUrl?.coreEntityAccessPassManagement,\r\n 'toggle-status'\r\n ]);\r\n\r\n console.log('🔄 ENTITY ACCESS PASS SERVICE: Making POST request to:', url);\r\n console.log('🔄 ENTITY ACCESS PASS SERVICE: Payload:', payload);\r\n\r\n return this.http.post<CoreEntityAccessPassManagementToggleStatusControllerResponse>(url, payload).pipe(\r\n tap(response => {\r\n if (response.success) {\r\n // Refresh the list after successful status toggle\r\n this.refreshEntityAccessPassList();\r\n }\r\n }),\r\n catchError(this.handleError)\r\n );\r\n }\r\n\r\n /**\r\n * Get entity access pass management for specific user and entity\r\n * @param userId - User ID\r\n * @param entityId - Entity ID (the entity context)\r\n * @param coreEntityAccessPassManagement - The table name (e.g., 'core_entity_access_pass_management_sycad')\r\n * @param accessPassTo - Optional: The primary _id of the specific record whose access is being managed\r\n */\r\n getEntityAccessPassForUserAndEntity(\r\n userId: string, \r\n entityId: string, \r\n coreEntityAccessPassManagement: string,\r\n accessPassTo?: string\r\n ): Observable<CoreEntityAccessPassManagementControllerResponse> {\r\n const payload: MCoreEntityAccessPassManagement = {\r\n syepm_access_passs_to: accessPassTo,\r\n core_entity_access_pass_management: coreEntityAccessPassManagement\r\n };\r\n\r\n return this.getEntityAccessPassList(payload);\r\n }\r\n\r\n /**\r\n * Create or update entity access pass for user and entity\r\n * @param userId - User ID\r\n * @param entityId - Entity ID (the entity context)\r\n * @param accessPassTo - The primary _id of the specific record whose access is being managed (e.g., address _id from core_user_contact_addresses)\r\n * @param coreEntityAccessPassManagement - The table name (e.g., 'core_entity_access_pass_management_sycad')\r\n * @param rights - The access rights to be granted\r\n * @param existingId - Optional: Existing access pass ID for updates\r\n */\r\n saveEntityAccessPassForUserAndEntity(\r\n userId: string,\r\n entityId: string,\r\n accessPassTo: string,\r\n coreEntityAccessPassManagement: string,\r\n rights: {\r\n can_view?: boolean;\r\n can_edit?: boolean;\r\n is_owner?: boolean;\r\n syepm_isactive?: boolean;\r\n },\r\n existingId?: string\r\n ): Observable<CoreEntityAccessPassManagementInsertUpdateControllerResponse> {\r\n const payload: MCoreEntityAccessPassManagementInsertUpdate = {\r\n _id: existingId || '',\r\n syepm_user_id_user: userId,\r\n syepm_entity_id_syen: entityId,\r\n syepm_access_passs_to: accessPassTo,\r\n core_entity_access_pass_management: coreEntityAccessPassManagement,\r\n syepm_can_view: rights.can_view || false,\r\n syepm_can_edit: rights.can_edit || false,\r\n syepm_is_owner: rights.is_owner || false,\r\n syepm_isactive: rights.syepm_isactive !== undefined ? rights.syepm_isactive : true\r\n };\r\n\r\n return this.insertUpdateEntityAccessPass(payload);\r\n }\r\n\r\n /**\r\n * Refresh the entity access pass list\r\n */\r\n private refreshEntityAccessPassList(): void {\r\n // This would typically reload the list with current filters\r\n // For now, we'll just emit the current list\r\n const currentList = this.entityAccessPassListSubject.value;\r\n this.entityAccessPassListSubject.next([...currentList]);\r\n }\r\n\r\n /**\r\n * Handle HTTP errors\r\n */\r\n private handleError = (error: any): Observable<never> => {\r\n console.error('❌ ENTITY ACCESS PASS SERVICE ERROR:', error);\r\n return throwError(() => error);\r\n };\r\n\r\n /**\r\n * Get current entity access pass list\r\n */\r\n getCurrentEntityAccessPassList(): CoreEntityAccessPassManagement[] {\r\n return this.entityAccessPassListSubject.value;\r\n }\r\n\r\n /**\r\n * Clear entity access pass list\r\n */\r\n clearEntityAccessPassList(): void {\r\n this.entityAccessPassListSubject.next([]);\r\n }\r\n}\r\n","import { Component, inject, signal, input, output, OnInit, effect, computed, ChangeDetectionStrategy } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormBuilder, FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { CideEleButtonComponent, CideInputComponent, CideIconComponent, CideSpinnerComponent } from 'cloud-ide-element';\r\nimport { CoreSystemEntity, entityControllerResponse, MEntity } from 'cloud-ide-lms-model';\r\nimport { ENTITY_SERVICE_TOKEN, IEntityService } from 'cloud-ide-shared';\r\nimport { \r\n CoreEntityAccessPassManagement,\r\n CoreEntityAccessPassManagementControllerResponse,\r\n CoreEntityAccessPassManagementInsertUpdateControllerResponse\r\n} from 'cloud-ide-lms-model';\r\nimport { AppStateService } from '../../services/app-state/app-state.service';\r\nimport { CideLytFloatingEntityRightsSharingService } from './floating-entity-rights-sharing.service';\r\nimport { firstValueFrom, forkJoin, Observable } from 'rxjs';\r\n\r\n// Enhanced entity type with permission data\r\ninterface EntityWithPermissions extends CoreSystemEntity {\r\n permissions: CoreEntityAccessPassManagement | null;\r\n canView: boolean;\r\n canEdit: boolean;\r\n isOwner: boolean;\r\n isActive: boolean;\r\n}\r\n\r\n@Component({\r\n selector: 'cide-lyt-floating-entity-rights-sharing',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n CideEleButtonComponent,\r\n CideInputComponent,\r\n CideIconComponent,\r\n CideSpinnerComponent\r\n ],\r\n template: `\r\n <!-- Entity Rights Sharing Content -->\r\n <div class=\"tw-flex tw-flex-col tw-h-full\">\r\n <!-- Main Content Area -->\r\n <div class=\"tw-flex-1 tw-p-4 tw-overflow-y-auto tw-scrollbar-thin tw-scrollbar-thumb-gray-300 tw-scrollbar-track-transparent tw-select-none\">\r\n <!-- Tabs / Pills -->\r\n <div class=\"tw-mb-3 tw-flex tw-items-center tw-gap-2\">\r\n <button type=\"button\"\r\n class=\"tw-text-xs tw-font-medium tw-rounded-full tw-px-3 tw-py-1 tw-transition-colors\"\r\n [class.tw-bg-blue-600]=\"selectedTab() === 'user'\"\r\n [class.tw-text-white]=\"selectedTab() === 'user'\"\r\n [class.tw-bg-gray-100]=\"selectedTab() !== 'user'\"\r\n [class.tw-text-gray-700]=\"selectedTab() !== 'user'\"\r\n (click)=\"selectTab('user')\">\r\n User Linked\r\n </button>\r\n <button type=\"button\"\r\n class=\"tw-text-xs tw-font-medium tw-rounded-full tw-px-3 tw-py-1 tw-transition-colors\"\r\n [class.tw-bg-blue-600]=\"selectedTab() === 'hierarchy'\"\r\n [class.tw-text-white]=\"selectedTab() === 'hierarchy'\"\r\n [class.tw-bg-gray-100]=\"selectedTab() !== 'hierarchy'\"\r\n [class.tw-text-gray-700]=\"selectedTab() !== 'hierarchy'\"\r\n (click)=\"selectTab('hierarchy')\">\r\n Entity Hierarchy\r\n </button>\r\n </div>\r\n\r\n <!-- User Linked Entities -->\r\n @if (selectedTab() === 'user') {\r\n <div class=\"tw-mb-4\">\r\n \r\n @if (entitiesLoading()) {\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-py-6\">\r\n <cide-ele-spinner size=\"sm\"></cide-ele-spinner>\r\n <span class=\"tw-ml-3 tw-text-gray-600 tw-text-sm\">Loading entities...</span>\r\n </div>\r\n } @else if (entities().length === 0) {\r\n <div class=\"tw-text-center tw-py-6\">\r\n <div class=\"tw-w-10 tw-h-10 tw-bg-gray-100 tw-rounded-xl tw-flex tw-items-center tw-justify-center tw-mx-auto tw-mb-2\">\r\n <cide-ele-icon class=\"tw-w-5 tw-h-5 tw-text-gray-400\">business</cide-ele-icon>\r\n </div>\r\n <p class=\"tw-text-gray-500 tw-text-sm\">No entities available</p>\r\n </div>\r\n } @else {\r\n <div class=\"tw-space-y-2\">\r\n @defer (when entitiesWithPermissions().length > 0) {\r\n @for (entity of entitiesWithPermissions(); track entity._id || entity.syen_name) {\r\n <div class=\"tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-border tw-border-gray-200 tw-border-opacity-50 tw-rounded-xl tw-p-3 tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-shadow-md hover:tw-border-blue-300 hover:tw-border-opacity-50 hover:tw-scale-[1.01] tw-group tw-select-none\"\r\n [class.tw-border-blue-500]=\"selectedEntityId() === entity._id\"\r\n [class.tw-bg-blue-50]=\"selectedEntityId() === entity._id\"\r\n [class.tw-opacity-50]=\"!entity.isActive\"\r\n [class.tw-bg-gray-100]=\"!entity.isActive\"\r\n [class.tw-border-gray-300]=\"!entity.isActive\"\r\n (click)=\"selectEntity(entity._id || '')\">\r\n <div class=\"tw-flex tw-items-start tw-space-x-3\">\r\n <div class=\"tw-w-6 tw-h-6 tw-rounded-lg tw-flex tw-items-center tw-justify-center tw-flex-shrink-0\"\r\n [class.tw-bg-gray-100]=\"entity.isActive\"\r\n [class.tw-bg-gray-200]=\"!entity.isActive\">\r\n <cide-ele-icon [class.tw-text-gray-600]=\"entity.isActive\" [class.tw-text-gray-400]=\"!entity.isActive\">person</cide-ele-icon>\r\n </div>\r\n <div class=\"tw-flex-1 tw-min-w-0\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2 tw-mb-1\">\r\n <h4 class=\"tw-text-sm tw-font-semibold tw-truncate\"\r\n [class.tw-text-gray-900]=\"entity.isActive\"\r\n [class.tw-text-gray-500]=\"!entity.isActive\">{{ entity.syen_name }}</h4>\r\n @if (hasPendingChanges(entity._id || '')) {\r\n <div class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-orange-100 tw-text-orange-800\">\r\n <cide-ele-icon>edit</cide-ele-icon>\r\n <span>Modified</span>\r\n </div>\r\n }\r\n @if (entity.isOwner) {\r\n <div class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-space-x-1\">\r\n <cide-ele-icon>admin_panel_settings</cide-ele-icon>\r\n <span>Owner</span>\r\n </div>\r\n }\r\n </div>\r\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\r\n @if (entity.canView) {\r\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\r\n <cide-ele-icon [class.tw-text-green-500]=\"entity.isActive\" [class.tw-text-gray-400]=\"!entity.isActive\">visibility</cide-ele-icon>\r\n <span class=\"tw-text-xs\" [class.tw-text-green-600]=\"entity.isActive\" [class.tw-text-gray-500]=\"!entity.isActive\">View</span>\r\n </div>\r\n }\r\n @if (entity.canEdit) {\r\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\r\n <cide-ele-icon [class.tw-text-blue-500]=\"entity.isActive\" [class.tw-text-gray-400]=\"!entity.isActive\">edit</cide-ele-icon>\r\n <span class=\"tw-text-xs\" [class.tw-text-blue-600]=\"entity.isActive\" [class.tw-text-gray-500]=\"!entity.isActive\">Edit</span>\r\n </div>\r\n }\r\n @if (entity.isOwner) {\r\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\r\n <cide-ele-icon [class.tw-text-purple-500]=\"entity.isActive\" [class.tw-text-gray-400]=\"!entity.isActive\">admin_panel_settings</cide-ele-icon>\r\n <span class=\"tw-text-xs\" [class.tw-text-purple-600]=\"entity.isActive\" [class.tw-text-gray-500]=\"!entity.isActive\">Owner</span>\r\n </div>\r\n }\r\n @if (!entity.isActive) {\r\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\r\n <cide-ele-icon class=\"tw-text-red-400\">block</cide-ele-icon>\r\n <span class=\"tw-text-xs tw-text-red-500\">Inactive</span>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n @if (selectedEntityId() === entity._id) {\r\n <div class=\"tw-w-4 tw-h-4 tw-bg-green-500 tw-rounded-full tw-flex tw-items-center tw-justify-center tw-flex-shrink-0\">\r\n <cide-ele-icon class=\"tw-text-white\">done</cide-ele-icon>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n }\r\n } @placeholder {\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-py-4\">\r\n <cide-ele-spinner size=\"sm\"></cide-ele-spinner>\r\n <span class=\"tw-ml-2 tw-text-sm tw-text-gray-600\">Loading entities...</span>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Entity Hierarchy -->\r\n @if (selectedTab() === 'hierarchy') {\r\n <div class=\"tw-mb-4\">\r\n @if (hierarchyLoading()) {\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-py-6\">\r\n <cide-ele-spinner size=\"sm\"></cide-ele-spinner>\r\n <span class=\"tw-ml-3 tw-text-gray-600 tw-text-sm\">Loading hierarchy...</span>\r\n </div>\r\n } @else {\r\n <div class=\"tw-space-y-2\">\r\n @for (node of hierarchy(); track node._id) {\r\n <div class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-p-3\">\r\n <div class=\"tw-flex tw-items-center tw-justify-between\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <cide-ele-icon class=\"tw-text-gray-500\">account_tree</cide-ele-icon>\r\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-800\">{{ node.syen_name }}</span>\r\n </div>\r\n <span class=\"tw-text-xs tw-text-gray-500\">Code: {{ node.syen_entity_code }}</span>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n\r\n <!-- Rights Management -->\r\n @if (selectedEntityId()) {\r\n <div class=\"tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-border tw-border-gray-200 tw-border-opacity-50 tw-rounded-xl tw-p-3 tw-shadow-sm\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2 tw-mb-3\">\r\n <cide-ele-icon class=\"tw-text-green-600\">security</cide-ele-icon>\r\n <h3 class=\"tw-text-sm tw-font-semibold tw-text-gray-900\">Manage Rights</h3>\r\n </div>\r\n \r\n @if (accessPassLoading()) {\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-min-h-[80px]\">\r\n <cide-ele-spinner size=\"sm\"></cide-ele-spinner>\r\n <span class=\"tw-ml-3 tw-text-gray-600 tw-text-sm\">Loading...</span>\r\n </div>\r\n } @else {\r\n @defer (when !accessPassLoading()) {\r\n <form [formGroup]=\"rightsForm\" (ngSubmit)=\"saveRights()\">\r\n <div class=\"tw-flex tw-flex-wrap tw-gap-3 tw-min-h-[80px] tw-items-center\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input \r\n type=\"checkbox\" \r\n formControlName=\"can_view\" \r\n label=\"View\">\r\n </cide-ele-input>\r\n </div>\r\n \r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input \r\n type=\"checkbox\" \r\n formControlName=\"can_edit\" \r\n label=\"Edit\">\r\n </cide-ele-input>\r\n </div>\r\n \r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input \r\n type=\"checkbox\" \r\n formControlName=\"is_owner\" \r\n label=\"Is Owner\">\r\n </cide-ele-input>\r\n </div>\r\n \r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input \r\n type=\"checkbox\" \r\n formControlName=\"syepm_isactive\" \r\n label=\"Is Active\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n </form>\r\n } @placeholder {\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-min-h-[80px]\">\r\n <cide-ele-spinner size=\"sm\"></cide-ele-spinner>\r\n <span class=\"tw-ml-2 tw-text-sm tw-text-gray-600\">Loading rights...</span>\r\n </div>\r\n }\r\n }\r\n </div>\r\n }\r\n </div>\r\n \r\n <!-- Fixed Footer -->\r\n <div class=\"tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-px-4 tw-py-3 tw-border-t tw-border-gray-200 tw-border-opacity-30 tw-flex tw-justify-end tw-space-x-2 tw-flex-shrink-0\">\r\n <button cideEleButton variant=\"secondary\" size=\"xs\" type=\"button\" (click)=\"onCancel()\">\r\n Cancel\r\n </button>\r\n @if (selectedEntityId()) {\r\n <button cideEleButton variant=\"primary\" size=\"xs\" type=\"button\" (click)=\"saveRights()\" \r\n [disabled]=\"rightsForm.invalid || saving()\" [loading]=\"saving()\">\r\n @if (pendingChangesCount() > 0) {\r\n Save {{ pendingChangesCount() }} Change{{ pendingChangesCount() > 1 ? 's' : '' }}\r\n } @else {\r\n {{ saving() ? 'Saving...' : 'Save' }}\r\n }\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n `,\r\n styles: []\r\n})\r\nexport class CideLytFloatingEntityRightsSharingComponent implements OnInit {\r\n // Signal-based inputs\r\n data = input<any>();\r\n \r\n // Signal-based outputs\r\n close = output<void>();\r\n save = output<any>();\r\n\r\n // Batch update tracking\r\n private pendingUpdates = new Map<string, {\r\n entityId: string;\r\n formValue: any;\r\n existingId: string;\r\n timestamp: number;\r\n }>();\r\n pendingChangesCount = signal(0);\r\n\r\n // Entity data caching\r\n private entityDataCache = new Map<string, {\r\n data: CoreEntityAccessPassManagement | null;\r\n timestamp: number;\r\n entityId: string;\r\n }>();\r\n private readonly CACHE_DURATION = 5 * 60 * 1000; // 5 minutes cache duration\r\n\r\n private fb = inject(FormBuilder);\r\n private entityService = inject(ENTITY_SERVICE_TOKEN) as IEntityService;\r\n // Inject the merged service that now includes entity access pass management\r\n private entityAccessPassService = inject(CideLytFloatingEntityRightsSharingService);\r\n private appState = inject(AppStateService);\r\n\r\n // Tabs\r\n selectedTab = signal<'user' | 'hierarchy'>('user');\r\n\r\n // State signals\r\n entities = signal<CoreSystemEntity[]>([]);\r\n selectedEntityId = signal<string>('');\r\n entitiesLoading = signal(false);\r\n accessPassLoading = signal(false);\r\n saving = signal(false);\r\n currentAccessPass = signal<CoreEntityAccessPassManagement | null>(null);\r\n accessPassList = signal<CoreEntityAccessPassManagement[]>([]);\r\n\r\n // Hierarchy state (mock)\r\n hierarchy = signal<CoreSystemEntity[]>([]);\r\n hierarchyLoading = signal(false);\r\n\r\n // Computed signals for performance optimization\r\n entityPermissionsMap = computed(() => {\r\n const map = new Map<string, CoreEntityAccessPassManagement>();\r\n this.accessPassList().forEach(accessPass => {\r\n if (accessPass.syepm_entity_id_syen) {\r\n map.set(accessPass.syepm_entity_id_syen, accessPass);\r\n }\r\n });\r\n return map;\r\n });\r\n\r\n // Enhanced entities with permission data for template performance\r\n entitiesWithPermissions = computed((): EntityWithPermissions[] => {\r\n const permissionsMap = this.entityPermissionsMap();\r\n return this.entities().map(entity => ({\r\n ...entity,\r\n permissions: permissionsMap.get(entity._id || '') || null,\r\n canView: permissionsMap.get(entity._id || '')?.syepm_can_view || false,\r\n canEdit: permissionsMap.get(entity._id || '')?.syepm_can_edit || false,\r\n isOwner: permissionsMap.get(entity._id || '')?.syepm_is_owner || false,\r\n isActive: permissionsMap.get(entity._id || '')?.syepm_isactive !== false // Default to true if no permissions\r\n }));\r\n });\r\n\r\n // Form\r\n rightsForm!: FormGroup;\r\n\r\n ngOnInit() {\r\n this.initializeForm();\r\n this.loadEntities();\r\n this.loadAccessPassData();\r\n \r\n // Track form changes for batch updates\r\n this.rightsForm.valueChanges.subscribe(() => {\r\n this.trackPendingChanges();\r\n });\r\n }\r\n\r\n /**\r\n * Track pending changes for batch update\r\n */\r\n private trackPendingChanges(): void {\r\n if (!this.selectedEntityId()) return;\r\n \r\n const formValue = this.rightsForm.value;\r\n const entityId = this.selectedEntityId();\r\n \r\n // Get original values for comparison\r\n const originalValues = this.getOriginalValuesForEntity(entityId);\r\n \r\n // Check if there are actual changes\r\n const hasChanges = this.hasActualChanges(formValue, originalValues);\r\n \r\n const updateKey = `${entityId}`;\r\n \r\n if (hasChanges) {\r\n // Store the pending update with complete form data and entity's _id\r\n this.pendingUpdates.set(updateKey, {\r\n entityId,\r\n formValue: { ...formValue }, // Deep copy to prevent reference issues\r\n existingId: this.currentAccessPass()?._id || '', // Store the entity's specific _id\r\n timestamp: Date.now()\r\n });\r\n \r\n console.log('📝 Tracked changes for entity:', entityId, 'Total pending:', this.pendingUpdates.size);\r\n } else {\r\n // Remove from pending updates if no changes\r\n this.pendingUpdates.delete(updateKey);\r\n console.log('📝 No changes detected for entity:', entityId, 'Removed from pending');\r\n }\r\n \r\n // Update pending changes count\r\n this.pendingChangesCount.set(this.pendingUpdates.size);\r\n }\r\n\r\n /**\r\n * Get original values for an entity\r\n */\r\n private getOriginalValuesForEntity(entityId: string): any {\r\n const cachedData = this.entityDataCache.get(entityId);\r\n if (!cachedData) {\r\n return {\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n };\r\n }\r\n \r\n if (cachedData.data) {\r\n return {\r\n can_view: cachedData.data.syepm_can_view || false,\r\n can_edit: cachedData.data.syepm_can_edit || false,\r\n is_owner: cachedData.data.syepm_is_owner || false,\r\n syepm_isactive: cachedData.data.syepm_isactive !== undefined ? cachedData.data.syepm_isactive : true\r\n };\r\n }\r\n \r\n return {\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n };\r\n }\r\n\r\n /**\r\n * Check if there are actual changes between current and original values\r\n */\r\n private hasActualChanges(currentValues: any, originalValues: any): boolean {\r\n return !!(\r\n currentValues.can_view !== originalValues.can_view ||\r\n currentValues.can_edit !== originalValues.can_edit ||\r\n currentValues.is_owner !== originalValues.is_owner ||\r\n currentValues.syepm_isactive !== originalValues.syepm_isactive\r\n );\r\n }\r\n\r\n /**\r\n * Clear pending changes for a specific entity\r\n */\r\n private clearPendingChanges(entityId: string): void {\r\n const updateKey = `${entityId}`;\r\n this.pendingUpdates.delete(updateKey);\r\n this.pendingChangesCount.set(this.pendingUpdates.size);\r\n }\r\n\r\n /**\r\n * Clear all pending changes\r\n */\r\n private clearAllPendingChanges(): void {\r\n this.pendingUpdates.clear();\r\n this.pendingChangesCount.set(0);\r\n }\r\n\r\n /**\r\n * Check if cached data exists and is still valid\r\n */\r\n private getCachedEntityData(entityId: string): CoreEntityAccessPassManagement | null | undefined {\r\n const cached = this.entityDataCache.get(entityId);\r\n if (!cached) return undefined;\r\n\r\n const now = Date.now();\r\n const isExpired = (now - cached.timestamp) > this.CACHE_DURATION;\r\n \r\n if (isExpired) {\r\n // Remove expired cache entry\r\n this.entityDataCache.delete(entityId);\r\n return undefined;\r\n }\r\n\r\n console.log('📦 Using cached data for entity:', entityId);\r\n return cached.data;\r\n }\r\n\r\n /**\r\n * Cache entity data\r\n */\r\n private setCachedEntityData(entityId: string, data: CoreEntityAccessPassManagement | null): void {\r\n this.entityDataCache.set(entityId, {\r\n data,\r\n timestamp: Date.now(),\r\n entityId\r\n });\r\n console.log('💾 Cached data for entity:', entityId);\r\n }\r\n\r\n /**\r\n * Clear cache for specific entity (useful after updates)\r\n */\r\n private clearEntityCache(entityId: string): void {\r\n this.entityDataCache.delete(entityId);\r\n console.log('🗑️ Cleared cache for entity:', entityId);\r\n }\r\n\r\n /**\r\n * Clear all cached data\r\n */\r\n private clearAllCache(): void {\r\n this.entityDataCache.clear();\r\n console.log('🗑️ Cleared all cached data');\r\n }\r\n\r\n /**\r\n * Check if entity has pending changes\r\n */\r\n hasPendingChanges(entityId: string): boolean {\r\n const pendingChange = this.pendingUpdates.get(entityId);\r\n if (!pendingChange) return false;\r\n \r\n // Get the original cached data for this entity\r\n const cachedData = this.entityDataCache.get(entityId);\r\n if (!cachedData) return true; // If no cached data, consider it changed\r\n \r\n // Compare current form values with original cached values\r\n const currentValues = pendingChange.formValue;\r\n const originalValues = cachedData.data ? {\r\n can_view: cachedData.data.syepm_can_view || false,\r\n can_edit: cachedData.data.syepm_can_edit || false,\r\n is_owner: cachedData.data.syepm_is_owner || false,\r\n syepm_isactive: cachedData.data.syepm_isactive !== undefined ? cachedData.data.syepm_isactive : true\r\n } : {\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n };\r\n \r\n // Check if any values have actually changed\r\n const hasChanges = \r\n currentValues.can_view !== originalValues.can_view ||\r\n currentValues.can_edit !== originalValues.can_edit ||\r\n currentValues.is_owner !== originalValues.is_owner ||\r\n currentValues.syepm_isactive !== originalValues.syepm_isactive;\r\n \r\n return hasChanges;\r\n }\r\n\r\n constructor() {\r\n // Watch for changes in data input and reload access pass data\r\n // Only run when essential data changes to prevent unnecessary re-renders\r\n effect(() => {\r\n const data = this.data();\r\n if (data?.syepm_access_passs_to && data?.core_entity_access_pass_management) {\r\n // Use setTimeout to prevent synchronous execution during change detection\r\n setTimeout(() => this.loadAccessPassData(), 0);\r\n }\r\n });\r\n }\r\n\r\n\r\n selectTab(tab: 'user' | 'hierarchy') {\r\n this.selectedTab.set(tab);\r\n }\r\n\r\n private initializeForm() {\r\n this.rightsForm = this.fb.group({\r\n can_view: [false],\r\n can_edit: [false],\r\n is_owner: [false],\r\n syepm_isactive: [true]\r\n });\r\n }\r\n\r\n async loadEntities() {\r\n this.entitiesLoading.set(true);\r\n try {\r\n const payload: MEntity = { \r\n syen_id: \"\" \r\n // Note here list of entity is got from loggied in user id to which he is mapped\r\n };\r\n const resp: entityControllerResponse = await firstValueFrom(this.entityService.getEntityList(payload));\r\n const list: CoreSystemEntity[] = resp?.data || [];\r\n this.entities.set(list);\r\n } catch (error) {\r\n console.error('Error loading entities:', error);\r\n } finally {\r\n this.entitiesLoading.set(false);\r\n }\r\n }\r\n\r\n selectEntity(entityId: string) {\r\n // Allow selection of any entity to manage rights\r\n this.selectedEntityId.set(entityId);\r\n \r\n // Check cache first before making API call\r\n const cachedData = this.getCachedEntityData(entityId);\r\n if (cachedData !== undefined) {\r\n // Use cached data\r\n this.currentAccessPass.set(cachedData);\r\n this.populateFormWithCachedData(cachedData);\r\n return;\r\n }\r\n \r\n // Load rights for the selected entity (will cache the result)\r\n this.loadRightsForSelectedEntity(entityId);\r\n }\r\n\r\n /**\r\n * Populate form with cached data\r\n */\r\n private populateFormWithCachedData(data: CoreEntityAccessPassManagement | null): void {\r\n const entityId = this.selectedEntityId();\r\n \r\n // Check if there are pending changes for this entity first\r\n const pendingChange = this.pendingUpdates.get(entityId);\r\n if (pendingChange) {\r\n console.log('📝 Restoring pending changes for entity:', entityId);\r\n this.rightsForm.patchValue(pendingChange.formValue);\r\n return;\r\n }\r\n \r\n // No pending changes, use cached data\r\n this.setFormValues(data);\r\n }\r\n\r\n /**\r\n * Set form values based on data or defaults\r\n */\r\n private setFormValues(data: CoreEntityAccessPassManagement | null): void {\r\n if (data) {\r\n this.rightsForm.patchValue({\r\n can_view: data.syepm_can_view || false,\r\n can_edit: data.syepm_can_edit || false,\r\n is_owner: data.syepm_is_owner || false,\r\n syepm_isactive: data.syepm_isactive !== undefined ? data.syepm_isactive : true\r\n });\r\n } else {\r\n this.rightsForm.patchValue({\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n });\r\n }\r\n }\r\n\r\n async loadRightsForSelectedEntity(entityId: string) {\r\n if (!entityId) {\r\n // Reset form to blank values if no entity selected\r\n this.rightsForm.patchValue({\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n });\r\n this.currentAccessPass.set(null);\r\n return;\r\n }\r\n\r\n this.accessPassLoading.set(true);\r\n try {\r\n const currentUser = this.appState.currentUser();\r\n if (!currentUser) {\r\n console.error('No current user found');\r\n return;\r\n }\r\n\r\n // Get the core_entity_access_pass_management value from the data input\r\n const coreEntityAccessPassManagement = this.data()?.core_entity_access_pass_management || 'core_entity_access_pass_management_sycad';\r\n \r\n // Get the access pass to value - this is the primary _id of the specific table record \r\n // (like core_user_contact_addresses) whose access we are managing\r\n const accessPassTo = this.data()?.syepm_access_passs_to;\r\n \r\n if (!accessPassTo) {\r\n console.error('No accessPassTo provided - this should be the primary _id of the record whose access is being managed');\r\n return;\r\n }\r\n\r\n // Check if we have an existing _id for this entity in our access pass list\r\n const existingAccessPass = this.accessPassList().find(accessPass => \r\n accessPass.syepm_entity_id_syen === entityId\r\n );\r\n\r\n if (existingAccessPass && existingAccessPass._id) {\r\n // We have an existing _id, make targeted getById API call\r\n console.log('🎯 Making targeted getById API call for entity:', entityId, 'with _id:', existingAccessPass._id);\r\n \r\n const response = await firstValueFrom(\r\n this.entityAccessPassService.getEntityAccessPassById({\r\n syepm_id: existingAccessPass._id,\r\n core_entity_access_pass_management: coreEntityAccessPassManagement\r\n })\r\n );\r\n\r\n if (response.success && response.data) {\r\n // Entity has existing permissions, load them\r\n this.currentAccessPass.set(response.data);\r\n \r\n // Check for pending changes first, otherwise use API data\r\n const pendingChange = this.pendingUpdates.get(entityId);\r\n if (pendingChange) {\r\n console.log('📝 Restoring pending changes for entity:', entityId);\r\n this.rightsForm.patchValue(pendingChange.formValue);\r\n } else {\r\n this.setFormValues(response.data);\r\n }\r\n \r\n // Cache the data\r\n this.setCachedEntityData(entityId, response.data);\r\n } else {\r\n // API call failed, use default values\r\n this.currentAccessPass.set(null);\r\n this.setFormValues(null);\r\n this.setCachedEntityData(entityId, null);\r\n }\r\n } else {\r\n // No existing _id found, no API call needed - entity has no permissions\r\n console.log('🚫 No existing _id found for entity:', entityId, '- skipping API call');\r\n \r\n this.currentAccessPass.set(null);\r\n this.setFormValues(null);\r\n this.setCachedEntityData(entityId, null);\r\n }\r\n } catch (error) {\r\n console.error('Error loading rights for selected entity:', error);\r\n // Set default values on error\r\n this.currentAccessPass.set(null);\r\n \r\n // Check for pending changes first, otherwise use default values\r\n const pendingChange = this.pendingUpdates.get(entityId);\r\n if (pendingChange) {\r\n console.log('📝 Restoring pending changes for entity:', entityId);\r\n this.rightsForm.patchValue(pendingChange.formValue);\r\n } else {\r\n this.setFormValues(null);\r\n }\r\n \r\n // Cache null data on error\r\n this.setCachedEntityData(entityId, null);\r\n } finally {\r\n this.accessPassLoading.set(false);\r\n }\r\n }\r\n\r\n async loadAccessPassData() {\r\n // Prevent multiple simultaneous calls\r\n if (this.accessPassLoading()) {\r\n return;\r\n }\r\n\r\n this.accessPassLoading.set(true);\r\n try {\r\n const currentUser = this.appState.currentUser();\r\n if (!currentUser) {\r\n console.error('No current user found');\r\n return;\r\n }\r\n\r\n // Get the core_entity_access_pass_management value from the data input\r\n const coreEntityAccessPassManagement = this.data()?.core_entity_access_pass_management || 'core_entity_access_pass_management_sycad';\r\n \r\n // Get the access pass to value - this is the primary _id of the specific table record \r\n // (like core_user_contact_addresses) whose access we are managing\r\n const accessPassTo = this.data()?.syepm_access_passs_to;\r\n \r\n if (!accessPassTo) {\r\n console.error('No accessPassTo provided - this should be the primary _id of the record whose access is being managed');\r\n this.accessPassLoading.set(false);\r\n return;\r\n }\r\n \r\n // Load existing access pass data using the received data\r\n const response: CoreEntityAccessPassManagementControllerResponse = await firstValueFrom(\r\n this.entityAccessPassService.getEntityAccessPassList({\r\n syepm_access_passs_to: accessPassTo,\r\n core_entity_access_pass_management: coreEntityAccessPassManagement,\r\n syepm_entity_id_syen: this.appState.activeEntity()?._id || ''\r\n })\r\n );\r\n\r\n if (response.success && response.data) {\r\n // Store the full access pass list for dynamic entity permissions\r\n this.accessPassList.set(response.data);\r\n \r\n // Don't automatically set any access pass as current\r\n // Let the user explicitly select which access pass to edit\r\n this.currentAccessPass.set(null);\r\n \r\n // Set default form values\r\n this.rightsForm.patchValue({\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n });\r\n } else {\r\n // No existing access pass, set default values\r\n this.accessPassList.set([]);\r\n this.currentAccessPass.set(null);\r\n this.rightsForm.patchValue({\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n });\r\n }\r\n } catch (error) {\r\n console.error('Error loading access pass data:', error);\r\n // Set default values on error\r\n this.rightsForm.patchValue({\r\n can_view: false,\r\n can_edit: false,\r\n is_owner: false,\r\n syepm_isactive: true\r\n });\r\n } finally {\r\n this.accessPassLoading.set(false);\r\n }\r\n }\r\n\r\n async saveRights() {\r\n if (this.rightsForm.invalid) return;\r\n\r\n this.saving.set(true);\r\n try {\r\n // Get all pending updates\r\n const updates = Array.from(this.pendingUpdates.values());\r\n \r\n if (updates.length === 0) {\r\n console.log('No pending changes to save');\r\n return;\r\n }\r\n\r\n console.log('Saving merged API calls for updates:', updates);\r\n\r\n const currentUser = this.appState.currentUser();\r\n \r\n if (!currentUser) {\r\n console.error('No current user found');\r\n return;\r\n }\r\n\r\n // Get the core_entity_access_pass_management value from the data input\r\n const coreEntityAccessPassManagement = this.data()?.core_entity_access_pass_management || 'core_entity_access_pass_management_sycad';\r\n \r\n // Get the access pass to value - this is the primary _id of the specific table record \r\n // (like core_user_contact_addresses) whose access we are managing\r\n const accessPassTo = this.data()?.syepm_access_passs_to;\r\n \r\n if (!accessPassTo) {\r\n console.error('No accessPassTo provided - this should be the primary _id of the record whose access is being managed');\r\n return;\r\n }\r\n\r\n // Create array of Observable API calls\r\n const apiCalls: Observable<CoreEntityAccessPassManagementInsertUpdateControllerResponse>[] = updates.map(update => {\r\n const formValue = update.formValue;\r\n \r\n console.log(`🔄 Creating API call for entity ${update.entityId} with existingId: ${update.existingId}`);\r\n \r\n return this.entityAccessPassService.saveEntityAccessPassForUserAndEntity(\r\n currentUser._id || '',\r\n update.entityId,\r\n accessPassTo,\r\n coreEntityAccessPassManagement,\r\n {\r\n can_view: formValue.can_view || false,\r\n can_edit: formValue.can_edit || false,\r\n is_owner: formValue.is_owner || false,\r\n syepm_isactive: formValue.syepm_isactive !== undefined ? formValue.syepm_isactive : true\r\n },\r\n update.existingId // Use the entity-specific existingId\r\n );\r\n });\r\n\r\n // Execute all API calls and wait for all to complete\r\n const responses = await Promise.all(apiCalls.map(apiCall => firstValueFrom(apiCall)));\r\n\r\n // Check if all responses were successful\r\n const allSuccessful = responses.every(response => response.success);\r\n \r\n if (allSuccessful) {\r\n console.log('All rights saved successfully via merged API calls');\r\n \r\n // Update cache and accessPassList with new saved data\r\n const updatedAccessPassList = [...this.accessPassList()];\r\n \r\n // Loop through each updated entity and find its corresponding response\r\n updates.forEach(update => {\r\n // Find the response that matches this entity's ID\r\n const response = responses.find(response => {\r\n // Check if this response corresponds to the current update\r\n // We can match by checking if the response data has the same entity ID\r\n return response.data && response.data.syepm_entity_id_syen === update.entityId;\r\n });\r\n \r\n if (response && response.success && response.data) {\r\n // Update cache with the new saved data\r\n this.setCachedEntityData(update.entityId, response.data);\r\n console.log('💾 Updated cache with new data for entity:', update.entityId);\r\n \r\n // Find and update the existing access pass in the list\r\n const existingIndex = updatedAccessPassList.findIndex(\r\n accessPass => accessPass.syepm_entity_id_syen === update.entityId\r\n );\r\n if (existingIndex !== -1) {\r\n updatedAccessPassList[existingIndex] = response.data;\r\n } else {\r\n // Add new access pass if it didn't exist before\r\n updatedAccessPassList.push(response.data);\r\n }\r\n }\r\n });\r\n \r\n // Update the access pass list\r\n this.accessPassList.set(updatedAccessPassList);\r\n \r\n // Clear all pending changes\r\n this.clearAllPendingChanges();\r\n \r\n // Close the manage rights section by clearing selected entity\r\n this.selectedEntityId.set('');\r\n \r\n this.save.emit({\r\n responses,\r\n success: true,\r\n totalUpdates: updates.length\r\n });\r\n } else {\r\n // Handle partial failures\r\n const failedResponses = responses.filter(response => !response.success);\r\n console.error('Some rights failed to save:', failedResponses);\r\n \r\n // You can choose to either:\r\n // 1. Clear all pending changes (optimistic)\r\n // 2. Keep failed changes in pending (conservative)\r\n this.clearAllPendingChanges(); // Optimistic approach\r\n \r\n this.save.emit({\r\n responses,\r\n success: false,\r\n failedCount: failedResponses.length,\r\n totalUpdates: updates.length\r\n });\r\n }\r\n } catch (error) {\r\n console.error('Error saving merged rights:', error);\r\n \r\n // Clear pending changes on error (you can modify this behavior)\r\n this.clearAllPendingChanges();\r\n } finally {\r\n this.saving.set(false);\r\n }\r\n }\r\n\r\n onCancel() {\r\n // Clear all pending changes when canceling\r\n this.clearAllPendingChanges();\r\n // Clear all cached data when canceling\r\n this.clearAllCache();\r\n // Close the floating container\r\n this.entityAccessPassService.hide();\r\n // Also emit close event for any parent components\r\n this.close.emit();\r\n }\r\n}\r\n\r\n","/*\n * Public API Surface of cloud-ide-layout\n */\n\nexport * from './lib/cloud-ide-layout.service';\nexport * from './lib/cloud-ide-layout.component';\nexport * from './lib/layout/shared/shared-wrapper/shared-wrapper.component';\nexport * from './lib/layout/shared/shared.service';\nexport * from './lib/layout/shared/component-context.service';\nexport * from './lib/layout/shared/rights.service';\nexport * from './lib/cloud-ide-layout.routes';\nexport * from './lib/utils';\nexport * from './lib/utils/custom-route-reuse-strategy';\n\n// App State Management\nexport * from './lib/services/app-state/app-state.service';\nexport * from './lib/services/app-state';\nexport * from './lib/services/user-status/user-status.service';\nexport * from './lib/services/theme/theme.service';\n\n// Modern Page Data Management (Legacy code removed)\nexport * from './lib/services/cache-manager/cache-manager.service';\n\n// File Manager Management\nexport * from './lib/services';\n\n// Floating Entity Rights Sharing\nexport * from './lib/components/floating-entity-rights-sharing';\n\n// Floating Container (moved to cloud-ide-element)\n// export * from './lib/components/floating-container';\n\n// Layout Components","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","take","i1.CideLytRequestService"],"mappings":";;;;;;;;;;;;;;;;;;;MAKa,qBAAqB,CAAA;AAEhC,IAAA,WAAA,GAAA;uGAFW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAArB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cAFpB,MAAM,EAAA,CAAA;;2FAEP,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCCY,oBAAoB,CAAA;IACxB,aAAa,GAAY,KAAK;AAErC,IAAA,WAAA,GAAA;;IAGA,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,aAAa,GAAG,KAAK;AAC1B,QAAA,QAAQ,CAAC,aAAa,CAAC,CAAA,wBAAA,CAA0B,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,8BAA8B,CAAC;AACjG,QAAA,QAAQ,CAAC,aAAa,CAAC,CAAA,IAAA,CAAM,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,uBAAuB,CAAC;;;IAI3E,UAAU,GAAA;AACR,QAAA,IAAI,CAAC,aAAa,GAAG,IAAI;AACzB,QAAA,QAAQ,CAAC,aAAa,CAAC,CAAA,wBAAA,CAA0B,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,8BAA8B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