cloud-ide-layout 1.0.196 → 1.0.197

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 (14) hide show
  1. package/fesm2022/{cloud-ide-layout-cloud-ide-layout-DNJnD_Vr.mjs → cloud-ide-layout-cloud-ide-layout-BR5F10rp.mjs} +27 -5
  2. package/fesm2022/cloud-ide-layout-cloud-ide-layout-BR5F10rp.mjs.map +1 -0
  3. package/fesm2022/{cloud-ide-layout-dashboard-manager.component-BC7_konM.mjs → cloud-ide-layout-dashboard-manager.component-Z6CVGUD0.mjs} +2 -2
  4. package/fesm2022/{cloud-ide-layout-dashboard-manager.component-BC7_konM.mjs.map → cloud-ide-layout-dashboard-manager.component-Z6CVGUD0.mjs.map} +1 -1
  5. package/fesm2022/{cloud-ide-layout-drawer-theme.component-kfMpJ8HO.mjs → cloud-ide-layout-drawer-theme.component-BMtGe5Hj.mjs} +2 -2
  6. package/fesm2022/{cloud-ide-layout-drawer-theme.component-kfMpJ8HO.mjs.map → cloud-ide-layout-drawer-theme.component-BMtGe5Hj.mjs.map} +1 -1
  7. package/fesm2022/{cloud-ide-layout-home-wrapper.component-Bcw1UvWD.mjs → cloud-ide-layout-home-wrapper.component-yBUZQiWN.mjs} +2 -2
  8. package/fesm2022/{cloud-ide-layout-home-wrapper.component-Bcw1UvWD.mjs.map → cloud-ide-layout-home-wrapper.component-yBUZQiWN.mjs.map} +1 -1
  9. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-i21oz3ul.mjs → cloud-ide-layout-sidedrawer-notes.component-B6H0UYkd.mjs} +2 -2
  10. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-i21oz3ul.mjs.map → cloud-ide-layout-sidedrawer-notes.component-B6H0UYkd.mjs.map} +1 -1
  11. package/fesm2022/cloud-ide-layout.mjs +1 -1
  12. package/index.d.ts +2 -0
  13. package/package.json +1 -1
  14. package/fesm2022/cloud-ide-layout-cloud-ide-layout-DNJnD_Vr.mjs.map +0 -1
@@ -4675,6 +4675,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
4675
4675
  */
4676
4676
  class CustomRouteReuseStrategy {
4677
4677
  storedRoutes = {};
4678
+ routesToDestroy = new Set(); // Keys marked for destruction (do not store)
4678
4679
  // Generates a unique key for a route.
4679
4680
  // This key includes sorted query parameters to ensure distinct states for tabs differing by query params.
4680
4681
  getPathKey(route) {
@@ -4713,11 +4714,29 @@ class CustomRouteReuseStrategy {
4713
4714
  // IMPORTANT: We ALWAYS store routes to support tab-based navigation
4714
4715
  store(route, handle) {
4715
4716
  const pathKey = this.getPathKey(route);
4717
+ // If this route is marked for destruction, DO NOT store it, and destroy the handle immediately
4718
+ if (pathKey && this.routesToDestroy.has(pathKey)) {
4719
+ console.log(`🚫 [RouteReuseStrategy] Prevented storage of closed route: ${pathKey}`);
4720
+ this.routesToDestroy.delete(pathKey); // Cleanup
4721
+ if (handle) {
4722
+ // Destroy the handle immediately
4723
+ const componentRef = handle.componentRef || handle.component;
4724
+ if (componentRef && typeof componentRef.destroy === 'function') {
4725
+ componentRef.destroy();
4726
+ }
4727
+ }
4728
+ return;
4729
+ }
4716
4730
  if (handle && pathKey) {
4717
4731
  this.storedRoutes[pathKey] = handle;
4718
4732
  console.log(`📦 [RouteReuseStrategy] Stored route: ${pathKey}`);
4719
4733
  }
4720
4734
  }
4735
+ // Mark a route key to NOT be stored (used when closing an active tab)
4736
+ doNotStore(pathKey) {
4737
+ this.routesToDestroy.add(pathKey);
4738
+ console.log(`💀 [RouteReuseStrategy] Marked route for destruction (will not store): ${pathKey}`);
4739
+ }
4721
4740
  // Determines if this route (and its subtree) should be reattached.
4722
4741
  shouldAttach(route) {
4723
4742
  const pathKey = this.getPathKey(route);
@@ -5148,6 +5167,8 @@ class CideLytRequestService {
5148
5167
  }
5149
5168
  // Clear the stored route and destroy the component instance
5150
5169
  this.routeReuseStrategy.clearStoredRoute(pathKey);
5170
+ // IMPORTANT: Mark this key to NOT be stored again (fixing active tab race condition)
5171
+ this.routeReuseStrategy.doNotStore(pathKey);
5151
5172
  // Also try clearing without query params in case the route wasn't marked for reuse
5152
5173
  // This ensures we catch all possible pathKey variations
5153
5174
  const pathKeyWithoutParams = tabToClose.route.startsWith('/') ? tabToClose.route.substring(1) : tabToClose.route;
@@ -5161,6 +5182,7 @@ class CideLytRequestService {
5161
5182
  console.log('🎯 [CLOSE TAB] Found fuzzy matches:', fuzzyMatches);
5162
5183
  fuzzyMatches.forEach(key => {
5163
5184
  this.routeReuseStrategy.clearStoredRoute(key);
5185
+ this.routeReuseStrategy.doNotStore(key);
5164
5186
  });
5165
5187
  }
5166
5188
  const remainingKeys = this.routeReuseStrategy.getAllStoredRouteKeys();
@@ -5417,8 +5439,8 @@ class CideLytSidedrawerWrapperComponent {
5417
5439
  }
5418
5440
  ngOnInit() {
5419
5441
  // Initialize the component map (You'd likely populate this from a config or service)
5420
- this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-i21oz3ul.mjs').then(m => m.CideLytSidedrawerNotesComponent);
5421
- this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-kfMpJ8HO.mjs').then(m => m.CideLytDrawerThemeComponent);
5442
+ this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-B6H0UYkd.mjs').then(m => m.CideLytSidedrawerNotesComponent);
5443
+ this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-BMtGe5Hj.mjs').then(m => m.CideLytDrawerThemeComponent);
5422
5444
  }
5423
5445
  async loadComponent(configFor) {
5424
5446
  console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
@@ -7110,7 +7132,7 @@ const layoutControlPannelChildRoutes = [{
7110
7132
  },
7111
7133
  {
7112
7134
  path: "home",
7113
- loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-Bcw1UvWD.mjs').then(c => c.CideLytHomeWrapperComponent),
7135
+ loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-yBUZQiWN.mjs').then(c => c.CideLytHomeWrapperComponent),
7114
7136
  canActivate: [authGuard],
7115
7137
  data: {
7116
7138
  sypg_page_code: "cide_lyt_home" // Used by RequestService to fetch tab properties
@@ -7118,7 +7140,7 @@ const layoutControlPannelChildRoutes = [{
7118
7140
  },
7119
7141
  {
7120
7142
  path: "dashboard-manager",
7121
- loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-BC7_konM.mjs').then(c => c.DashboardManagerComponent),
7143
+ loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-Z6CVGUD0.mjs').then(c => c.DashboardManagerComponent),
7122
7144
  canActivate: [authGuard],
7123
7145
  data: {
7124
7146
  sypg_page_code: "cide_lyt_dashboard_manager"
@@ -8942,4 +8964,4 @@ var floatingEntitySelection_component = /*#__PURE__*/Object.freeze({
8942
8964
  */
8943
8965
 
8944
8966
  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 };
8945
- //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-DNJnD_Vr.mjs.map
8967
+ //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-BR5F10rp.mjs.map