cloud-ide-layout 1.0.183 → 1.0.185

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (12) hide show
  1. package/fesm2022/{cloud-ide-layout-cloud-ide-layout-DKS9wXiJ.mjs → cloud-ide-layout-cloud-ide-layout-BvT1pY8z.mjs} +19 -74
  2. package/fesm2022/{cloud-ide-layout-cloud-ide-layout-DKS9wXiJ.mjs.map → cloud-ide-layout-cloud-ide-layout-BvT1pY8z.mjs.map} +1 -1
  3. package/fesm2022/{cloud-ide-layout-dashboard-manager.component-14bzX9WU.mjs → cloud-ide-layout-dashboard-manager.component-DYixwEQa.mjs} +2 -2
  4. package/fesm2022/{cloud-ide-layout-dashboard-manager.component-14bzX9WU.mjs.map → cloud-ide-layout-dashboard-manager.component-DYixwEQa.mjs.map} +1 -1
  5. package/fesm2022/{cloud-ide-layout-drawer-theme.component-CMznktiP.mjs → cloud-ide-layout-drawer-theme.component-yixL0kiC.mjs} +2 -2
  6. package/fesm2022/{cloud-ide-layout-drawer-theme.component-CMznktiP.mjs.map → cloud-ide-layout-drawer-theme.component-yixL0kiC.mjs.map} +1 -1
  7. package/fesm2022/{cloud-ide-layout-home-wrapper.component-CjeRFIUF.mjs → cloud-ide-layout-home-wrapper.component-DoPrXEV9.mjs} +2 -2
  8. package/fesm2022/{cloud-ide-layout-home-wrapper.component-CjeRFIUF.mjs.map → cloud-ide-layout-home-wrapper.component-DoPrXEV9.mjs.map} +1 -1
  9. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-S669EsVL.mjs → cloud-ide-layout-sidedrawer-notes.component-Cg9oFVf0.mjs} +2 -2
  10. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-S669EsVL.mjs.map → cloud-ide-layout-sidedrawer-notes.component-Cg9oFVf0.mjs.map} +1 -1
  11. package/fesm2022/cloud-ide-layout.mjs +1 -1
  12. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, signal, computed, effect, DestroyRef, Component, Injector, runInInjectionContext, ViewChild, ElementRef, HostListener, ChangeDetectionStrategy, ComponentRef, ViewContainerRef, ViewChildren, viewChild, input, InjectionToken, PLATFORM_ID, output } from '@angular/core';
2
+ import { Injectable, inject, signal, computed, effect, DestroyRef, Component, Injector, runInInjectionContext, ViewChild, ElementRef, HostListener, ChangeDetectionStrategy, ViewContainerRef, ViewChildren, viewChild, input, InjectionToken, PLATFORM_ID, output } from '@angular/core';
3
3
  import { HttpClient } from '@angular/common/http';
4
4
  import { cidePath, hostManagerRoutesUrl, coreRoutesUrl, commonRoutesUrl, designConfigRoutesUrl, generateStringFromObject } from 'cloud-ide-lms-model';
5
5
  import { BehaviorSubject, Observable, throwError, of, interval, take as take$1, firstValueFrom } from 'rxjs';
@@ -4716,19 +4716,7 @@ class CustomRouteReuseStrategy {
4716
4716
  if (!pathKey || !this.storedRoutes[pathKey]) {
4717
4717
  return null;
4718
4718
  }
4719
- const handle = this.storedRoutes[pathKey];
4720
- // Verify the handle is still valid (not destroyed)
4721
- // If the component was destroyed, remove it from stored routes
4722
- if (handle && typeof handle === 'object') {
4723
- const handleAny = handle;
4724
- // Check if ComponentRef is destroyed
4725
- if (handleAny.destroyed === true || (handleAny.hostView && handleAny.hostView.destroyed)) {
4726
- console.log(`⚠️ Stored route handle for ${pathKey} is already destroyed, removing from cache`);
4727
- delete this.storedRoutes[pathKey];
4728
- return null;
4729
- }
4730
- }
4731
- return handle;
4719
+ return this.storedRoutes[pathKey];
4732
4720
  }
4733
4721
  // Determines if a route should be reused.
4734
4722
  shouldReuseRoute(future, curr) {
@@ -4743,70 +4731,27 @@ class CustomRouteReuseStrategy {
4743
4731
  // Properly destroy the component instance to prevent memory leaks
4744
4732
  // and ensure clean state when the route is reopened
4745
4733
  try {
4746
- // In Angular, DetachedRouteHandle is typically a ComponentRef
4747
- // We need to destroy it to remove the component from DOM and clean up resources
4748
- // Method 1: Check if handle is a ComponentRef directly
4749
- if (handle && typeof handle.destroy === 'function') {
4750
- const componentRef = handle;
4751
- // Verify it has hostView (ComponentRef signature)
4752
- if (componentRef.hostView || componentRef.location) {
4753
- console.log(`🗑️ Destroying component instance (ComponentRef) for route: ${pathKey}`);
4734
+ // The handle contains the component instance and view container
4735
+ // We need to destroy it properly to clean up resources
4736
+ if (handle && typeof handle === 'object' && 'componentRef' in handle) {
4737
+ const componentRef = handle.componentRef;
4738
+ if (componentRef && typeof componentRef.destroy === 'function') {
4754
4739
  componentRef.destroy();
4755
4740
  }
4756
4741
  }
4757
- // Method 2: Check if handle is a ViewContainerRef
4758
- if (handle && typeof handle.clear === 'function' && typeof handle.length === 'number') {
4759
- const viewContainerRef = handle;
4760
- console.log(`🗑️ Clearing view container for route: ${pathKey}`);
4761
- viewContainerRef.clear();
4762
- }
4763
- // Method 3: Check if handle is an object with nested ComponentRef
4764
- if (handle && typeof handle === 'object' && !(handle instanceof ComponentRef) && !(handle instanceof ViewContainerRef)) {
4765
- const handleObj = handle;
4766
- // Try to find and destroy ComponentRef from various possible properties
4767
- let componentRef = null;
4768
- // Check common property names
4769
- if (handleObj.componentRef && typeof handleObj.componentRef.destroy === 'function') {
4770
- componentRef = handleObj.componentRef;
4771
- }
4772
- else if (handleObj.component && typeof handleObj.component.destroy === 'function') {
4773
- componentRef = handleObj.component;
4774
- }
4775
- else if (handleObj.context && typeof handleObj.context.destroy === 'function') {
4776
- componentRef = handleObj.context;
4777
- }
4778
- else if (handleObj._componentRef && typeof handleObj._componentRef.destroy === 'function') {
4779
- componentRef = handleObj._componentRef;
4780
- }
4781
- if (componentRef) {
4782
- console.log(`🗑️ Destroying component instance from handle object for route: ${pathKey}`);
4783
- componentRef.destroy();
4784
- }
4785
- // Also try to clear view container if it exists
4786
- if (handleObj.viewContainerRef && typeof handleObj.viewContainerRef.clear === 'function') {
4787
- console.log(`🗑️ Clearing view container from handle object for route: ${pathKey}`);
4788
- handleObj.viewContainerRef.clear();
4789
- }
4790
- // Try to destroy any nested components
4791
- if (handleObj.components && Array.isArray(handleObj.components)) {
4792
- handleObj.components.forEach((comp, index) => {
4793
- if (comp && typeof comp.destroy === 'function') {
4794
- console.log(`🗑️ Destroying nested component ${index} for route: ${pathKey}`);
4795
- comp.destroy();
4796
- }
4797
- });
4742
+ // Also destroy the view container if it exists
4743
+ if (handle && typeof handle === 'object' && 'viewContainerRef' in handle) {
4744
+ const viewContainerRef = handle.viewContainerRef;
4745
+ if (viewContainerRef && typeof viewContainerRef.clear === 'function') {
4746
+ viewContainerRef.clear();
4798
4747
  }
4799
4748
  }
4800
4749
  }
4801
4750
  catch (error) {
4802
- console.warn(`⚠️ Error destroying route handle for ${pathKey}:`, error);
4751
+ console.warn('Error destroying route handle:', error);
4803
4752
  }
4804
- // Remove from stored routes - this ensures shouldAttach will return false for this route
4753
+ // Remove from stored routes
4805
4754
  delete this.storedRoutes[pathKey];
4806
- console.log(`✅ Cleared stored route: ${pathKey} (removed from storedRoutes map)`);
4807
- }
4808
- else {
4809
- console.log(`ℹ️ No stored route found for: ${pathKey}`);
4810
4755
  }
4811
4756
  }
4812
4757
  // Clears all stored routes (useful for cleanup)
@@ -5305,8 +5250,8 @@ class CideLytSidedrawerWrapperComponent {
5305
5250
  }
5306
5251
  ngOnInit() {
5307
5252
  // Initialize the component map (You'd likely populate this from a config or service)
5308
- this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-S669EsVL.mjs').then(m => m.CideLytSidedrawerNotesComponent);
5309
- this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-CMznktiP.mjs').then(m => m.CideLytDrawerThemeComponent);
5253
+ this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-Cg9oFVf0.mjs').then(m => m.CideLytSidedrawerNotesComponent);
5254
+ this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-yixL0kiC.mjs').then(m => m.CideLytDrawerThemeComponent);
5310
5255
  }
5311
5256
  async loadComponent(configFor) {
5312
5257
  console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
@@ -6998,7 +6943,7 @@ const layoutControlPannelChildRoutes = [{
6998
6943
  },
6999
6944
  {
7000
6945
  path: "home",
7001
- loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-CjeRFIUF.mjs').then(c => c.CideLytHomeWrapperComponent),
6946
+ loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-DoPrXEV9.mjs').then(c => c.CideLytHomeWrapperComponent),
7002
6947
  canActivate: [authGuard],
7003
6948
  data: {
7004
6949
  sypg_page_code: "cide_lyt_home" // Used by RequestService to fetch tab properties
@@ -7006,7 +6951,7 @@ const layoutControlPannelChildRoutes = [{
7006
6951
  },
7007
6952
  {
7008
6953
  path: "dashboard-manager",
7009
- loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-14bzX9WU.mjs').then(c => c.DashboardManagerComponent),
6954
+ loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-DYixwEQa.mjs').then(c => c.DashboardManagerComponent),
7010
6955
  canActivate: [authGuard],
7011
6956
  data: {
7012
6957
  sypg_page_code: "cide_lyt_dashboard_manager"
@@ -8830,4 +8775,4 @@ var floatingEntitySelection_component = /*#__PURE__*/Object.freeze({
8830
8775
  */
8831
8776
 
8832
8777
  export { AppStateHelperService as A, CideLytSharedWrapperComponent as C, ENVIRONMENT_CONFIG as E, NotificationSettingsService as N, RightsService as R, CideLytSidebarService as a, CideLytSidedrawerService as b, CideLytThemeService as c, CloudIdeLayoutService as d, CloudIdeLayoutComponent as e, CideLytSharedService as f, ComponentContextService as g, layoutControlPannelChildRoutes as h, CustomRouteReuseStrategy as i, AppStateService as j, CideLytUserStatusService as k, layoutRoutes as l, CacheManagerService as m, CideLytFileManagerService as n, CideLytFloatingEntityRightsSharingComponent as o, processThemeVariable as p, CideLytFloatingEntityRightsSharingService as q, CideLytFloatingEntitySelectionComponent as r, setCSSVariable as s, themeFactory as t, CideLytFloatingEntitySelectionService as u };
8833
- //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-DKS9wXiJ.mjs.map
8778
+ //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-BvT1pY8z.mjs.map