cloud-ide-layout 1.0.182 → 1.0.184
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-l6s-ph1q.mjs → cloud-ide-layout-cloud-ide-layout-BvT1pY8z.mjs} +75 -237
- package/fesm2022/cloud-ide-layout-cloud-ide-layout-BvT1pY8z.mjs.map +1 -0
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-BFmWPx5q.mjs → cloud-ide-layout-dashboard-manager.component-DYixwEQa.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-BFmWPx5q.mjs.map → cloud-ide-layout-dashboard-manager.component-DYixwEQa.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-HsFPpuk1.mjs → cloud-ide-layout-drawer-theme.component-yixL0kiC.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-HsFPpuk1.mjs.map → cloud-ide-layout-drawer-theme.component-yixL0kiC.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-C9F3Ph0U.mjs → cloud-ide-layout-home-wrapper.component-DoPrXEV9.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-C9F3Ph0U.mjs.map → cloud-ide-layout-home-wrapper.component-DoPrXEV9.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-9ZGNNWMi.mjs → cloud-ide-layout-sidedrawer-notes.component-Cg9oFVf0.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-9ZGNNWMi.mjs.map → cloud-ide-layout-sidedrawer-notes.component-Cg9oFVf0.mjs.map} +1 -1
- package/fesm2022/cloud-ide-layout.mjs +1 -1
- package/index.d.ts +0 -10
- package/package.json +1 -1
- package/fesm2022/cloud-ide-layout-cloud-ide-layout-l6s-ph1q.mjs.map +0 -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,
|
|
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,195 +4716,49 @@ class CustomRouteReuseStrategy {
|
|
|
4716
4716
|
if (!pathKey || !this.storedRoutes[pathKey]) {
|
|
4717
4717
|
return null;
|
|
4718
4718
|
}
|
|
4719
|
-
|
|
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) {
|
|
4735
4723
|
return future.routeConfig === curr.routeConfig;
|
|
4736
4724
|
}
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
// 1. Try to construct the exact key first
|
|
4743
|
-
let exactKey = path;
|
|
4744
|
-
// Normalize path: remove leading slash if present
|
|
4745
|
-
if (exactKey.startsWith('/')) {
|
|
4746
|
-
exactKey = exactKey.substring(1);
|
|
4747
|
-
}
|
|
4748
|
-
// Attempt to construct key with params if they exist
|
|
4749
|
-
let exactKeyWithParams = exactKey;
|
|
4750
|
-
if (params && Object.keys(params).length > 0) {
|
|
4751
|
-
const queryParams = Object.keys(params)
|
|
4752
|
-
.sort()
|
|
4753
|
-
.map(key => `${key}=${params[key]}`)
|
|
4754
|
-
.join('&');
|
|
4755
|
-
exactKeyWithParams += '?' + queryParams;
|
|
4756
|
-
}
|
|
4757
|
-
// Check strict match first
|
|
4758
|
-
if (this.storedRoutes[exactKeyWithParams]) {
|
|
4759
|
-
console.log(`🎯 [RouteReuseStrategy] Found exact match for clearing: ${exactKeyWithParams}`);
|
|
4760
|
-
this.destroyAndRemove(exactKeyWithParams);
|
|
4761
|
-
return;
|
|
4762
|
-
}
|
|
4763
|
-
// Check if the key exists without params (sometimes stored without them if no reuseTab data at that moment)
|
|
4764
|
-
if (this.storedRoutes[exactKey]) {
|
|
4765
|
-
console.log(`🎯 [RouteReuseStrategy] Found path-only match for clearing: ${exactKey}`);
|
|
4766
|
-
this.destroyAndRemove(exactKey);
|
|
4767
|
-
return;
|
|
4768
|
-
}
|
|
4769
|
-
// 2. Fuzzy Match: Iterate through all keys to find a substantial match
|
|
4770
|
-
// This handles cases where params might be string vs number, or order differences not caught by simple sort
|
|
4771
|
-
console.log(`🔍 [RouteReuseStrategy] No exact match for ${exactKeyWithParams}. Searching candidates...`);
|
|
4772
|
-
const candidates = Object.keys(this.storedRoutes);
|
|
4773
|
-
for (const startKey of candidates) {
|
|
4774
|
-
// Check if the path part matches
|
|
4775
|
-
const [storedPath, storedQuery] = startKey.split('?');
|
|
4776
|
-
if (storedPath === exactKey || storedPath === '/' + exactKey) {
|
|
4777
|
-
// Path matches. Now check params if requested
|
|
4778
|
-
if (!params || Object.keys(params).length === 0) {
|
|
4779
|
-
// If we didn't ask for specific params, and we found a path match, this is likely it
|
|
4780
|
-
// BUT be careful not to delete a specific parameterized tab if we meant a generic one
|
|
4781
|
-
// For safety, if the stored route HAS params, but we didn't specify any, strictness might be needed.
|
|
4782
|
-
// For now, let's assume if path matches and we have no params, it's a match.
|
|
4783
|
-
console.log(`⚠️ [RouteReuseStrategy] Fuzzy match (Path match, input has no params): ${startKey}`);
|
|
4784
|
-
this.destroyAndRemove(startKey);
|
|
4785
|
-
return;
|
|
4786
|
-
}
|
|
4787
|
-
// Both have params, compare them
|
|
4788
|
-
if (storedQuery) {
|
|
4789
|
-
const storedParams = new URLSearchParams(storedQuery);
|
|
4790
|
-
let allParamsMatch = true;
|
|
4791
|
-
for (const key of Object.keys(params)) {
|
|
4792
|
-
const val = params[key];
|
|
4793
|
-
const storedVal = storedParams.get(key);
|
|
4794
|
-
// Loose equality for string/number match
|
|
4795
|
-
if (storedVal != val) {
|
|
4796
|
-
allParamsMatch = false;
|
|
4797
|
-
break;
|
|
4798
|
-
}
|
|
4799
|
-
}
|
|
4800
|
-
if (allParamsMatch) {
|
|
4801
|
-
console.log(`⚠️ [RouteReuseStrategy] Fuzzy match (Params match loose equality): ${startKey}`);
|
|
4802
|
-
this.destroyAndRemove(startKey);
|
|
4803
|
-
return;
|
|
4804
|
-
}
|
|
4805
|
-
}
|
|
4806
|
-
}
|
|
4807
|
-
}
|
|
4808
|
-
console.warn(`❌ [RouteReuseStrategy] Could not find route to clear for: ${path}`, params);
|
|
4809
|
-
}
|
|
4810
|
-
// Private helper to destroy component and remove from map
|
|
4811
|
-
destroyAndRemove(key) {
|
|
4812
|
-
const handle = this.storedRoutes[key];
|
|
4725
|
+
// Clears a stored route, typically when a tab is closed.
|
|
4726
|
+
// This method now properly destroys the component instance to prevent memory leaks
|
|
4727
|
+
// and ensure old data doesn't persist when reopening the same route.
|
|
4728
|
+
clearStoredRoute(pathKey) {
|
|
4729
|
+
const handle = this.storedRoutes[pathKey];
|
|
4813
4730
|
if (handle) {
|
|
4814
4731
|
// Properly destroy the component instance to prevent memory leaks
|
|
4815
4732
|
// and ensure clean state when the route is reopened
|
|
4816
4733
|
try {
|
|
4817
|
-
//
|
|
4818
|
-
// We need to destroy it to
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
// Verify it has hostView (ComponentRef signature)
|
|
4823
|
-
if (componentRef.hostView || componentRef.location) {
|
|
4824
|
-
console.log(`🗑️ Destroying component instance (ComponentRef) for route: ${key}`);
|
|
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') {
|
|
4825
4739
|
componentRef.destroy();
|
|
4826
4740
|
}
|
|
4827
4741
|
}
|
|
4828
|
-
//
|
|
4829
|
-
if (handle && typeof handle
|
|
4830
|
-
const viewContainerRef = handle;
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
}
|
|
4834
|
-
// Method 3: Check if handle is an object with nested ComponentRef
|
|
4835
|
-
if (handle && typeof handle === 'object' && !(handle instanceof ComponentRef) && !(handle instanceof ViewContainerRef)) {
|
|
4836
|
-
const handleObj = handle;
|
|
4837
|
-
// Try to find and destroy ComponentRef from various possible properties
|
|
4838
|
-
let componentRef = null;
|
|
4839
|
-
// Check common property names
|
|
4840
|
-
if (handleObj.componentRef && typeof handleObj.componentRef.destroy === 'function') {
|
|
4841
|
-
componentRef = handleObj.componentRef;
|
|
4842
|
-
}
|
|
4843
|
-
else if (handleObj.component && typeof handleObj.component.destroy === 'function') {
|
|
4844
|
-
componentRef = handleObj.component;
|
|
4845
|
-
}
|
|
4846
|
-
else if (handleObj.context && typeof handleObj.context.destroy === 'function') {
|
|
4847
|
-
componentRef = handleObj.context;
|
|
4848
|
-
}
|
|
4849
|
-
else if (handleObj._componentRef && typeof handleObj._componentRef.destroy === 'function') {
|
|
4850
|
-
componentRef = handleObj._componentRef;
|
|
4851
|
-
}
|
|
4852
|
-
if (componentRef) {
|
|
4853
|
-
console.log(`🗑️ Destroying component instance from handle object for route: ${key}`);
|
|
4854
|
-
componentRef.destroy();
|
|
4855
|
-
}
|
|
4856
|
-
// Also try to clear view container if it exists
|
|
4857
|
-
if (handleObj.viewContainerRef && typeof handleObj.viewContainerRef.clear === 'function') {
|
|
4858
|
-
console.log(`🗑️ Clearing view container from handle object for route: ${key}`);
|
|
4859
|
-
handleObj.viewContainerRef.clear();
|
|
4860
|
-
}
|
|
4861
|
-
// Try to destroy any nested components
|
|
4862
|
-
if (handleObj.components && Array.isArray(handleObj.components)) {
|
|
4863
|
-
handleObj.components.forEach((comp, index) => {
|
|
4864
|
-
if (comp && typeof comp.destroy === 'function') {
|
|
4865
|
-
console.log(`🗑️ Destroying nested component ${index} for route: ${key}`);
|
|
4866
|
-
comp.destroy();
|
|
4867
|
-
}
|
|
4868
|
-
});
|
|
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();
|
|
4869
4747
|
}
|
|
4870
4748
|
}
|
|
4871
4749
|
}
|
|
4872
4750
|
catch (error) {
|
|
4873
|
-
console.warn(
|
|
4751
|
+
console.warn('Error destroying route handle:', error);
|
|
4874
4752
|
}
|
|
4875
|
-
// Remove from stored routes
|
|
4876
|
-
delete this.storedRoutes[
|
|
4877
|
-
console.log(`✅ Cleared stored route: ${key} (removed from storedRoutes map)`);
|
|
4878
|
-
}
|
|
4879
|
-
else {
|
|
4880
|
-
console.log(`ℹ️ No stored route found for: ${key}`);
|
|
4753
|
+
// Remove from stored routes
|
|
4754
|
+
delete this.storedRoutes[pathKey];
|
|
4881
4755
|
}
|
|
4882
4756
|
}
|
|
4883
|
-
/**
|
|
4884
|
-
* Legacy method for backward compatibility, redirects to new clearRoute or destroys directly if key provided
|
|
4885
|
-
* @deprecated Use clearRoute instead
|
|
4886
|
-
*/
|
|
4887
|
-
clearStoredRoute(pathKey) {
|
|
4888
|
-
this.destroyAndRemove(pathKey);
|
|
4889
|
-
}
|
|
4890
4757
|
// Clears all stored routes (useful for cleanup)
|
|
4891
|
-
// This method ensures all component instances are destroyed and removed from DOM
|
|
4892
4758
|
clearAllStoredRoutes() {
|
|
4893
|
-
|
|
4894
|
-
console.log(`🧹 [RouteReuseStrategy] Clearing ${routeKeys.length} stored route(s) to remove components from DOM`);
|
|
4895
|
-
routeKeys.forEach(pathKey => {
|
|
4759
|
+
Object.keys(this.storedRoutes).forEach(pathKey => {
|
|
4896
4760
|
this.clearStoredRoute(pathKey);
|
|
4897
4761
|
});
|
|
4898
|
-
// Double-check that all routes are cleared
|
|
4899
|
-
const remainingRoutes = Object.keys(this.storedRoutes).length;
|
|
4900
|
-
if (remainingRoutes > 0) {
|
|
4901
|
-
console.warn(`⚠️ [RouteReuseStrategy] ${remainingRoutes} route(s) still remain after clearing. Force clearing...`);
|
|
4902
|
-
// Force clear any remaining routes
|
|
4903
|
-
Object.keys(this.storedRoutes).forEach(pathKey => {
|
|
4904
|
-
delete this.storedRoutes[pathKey];
|
|
4905
|
-
});
|
|
4906
|
-
}
|
|
4907
|
-
console.log(`✅ [RouteReuseStrategy] All stored routes cleared. Components should be removed from DOM.`);
|
|
4908
4762
|
}
|
|
4909
4763
|
// Gets the count of stored routes (useful for debugging)
|
|
4910
4764
|
getStoredRoutesCount() {
|
|
@@ -5050,8 +4904,6 @@ class CideLytRequestService {
|
|
|
5050
4904
|
tabStateService = inject(TabStateService);
|
|
5051
4905
|
sidedrawerService = inject(CideLytSidedrawerService);
|
|
5052
4906
|
sharedService = inject(CideLytSharedService);
|
|
5053
|
-
floatingContainerService = inject(CideEleFloatingContainerService);
|
|
5054
|
-
appStateService = inject(AppStateService);
|
|
5055
4907
|
constructor() {
|
|
5056
4908
|
// Initialize router
|
|
5057
4909
|
this.router = inject(Router);
|
|
@@ -5060,12 +4912,6 @@ class CideLytRequestService {
|
|
|
5060
4912
|
this.sharedService.registerTabManagement(this.handleRouteBasedTabManagement.bind(this));
|
|
5061
4913
|
// Register request visibility callback
|
|
5062
4914
|
this.sharedService.registerRequestVisibility(this.handleRequestVisibility.bind(this));
|
|
5063
|
-
// Register entity change handler with AppStateService to close tabs when entity changes
|
|
5064
|
-
// This is safe because AppStateService no longer imports CideLytRequestService
|
|
5065
|
-
this.appStateService.registerEntityChangeHandler((entity) => {
|
|
5066
|
-
console.log('🏢 [RequestService] Entity changed, closing all tabs:', entity?._id);
|
|
5067
|
-
this.closeAllTabs();
|
|
5068
|
-
});
|
|
5069
4915
|
}
|
|
5070
4916
|
/**
|
|
5071
4917
|
* Handle request visibility changes from shared service
|
|
@@ -5118,8 +4964,16 @@ class CideLytRequestService {
|
|
|
5118
4964
|
const id = this.generateId();
|
|
5119
4965
|
const currentTabs = this.tabsSignal();
|
|
5120
4966
|
console.log('currentTabs', currentTabs, route);
|
|
5121
|
-
//
|
|
5122
|
-
|
|
4967
|
+
// Check if a tab with the same route and params already exists
|
|
4968
|
+
const existingTab = currentTabs.find((tab) => {
|
|
4969
|
+
const paramsMatch = JSON.stringify(tab.params || {}) === JSON.stringify(params || {});
|
|
4970
|
+
return tab.route === route && paramsMatch;
|
|
4971
|
+
});
|
|
4972
|
+
console.log('existingTab', existingTab);
|
|
4973
|
+
if (existingTab) {
|
|
4974
|
+
this.activateTab(existingTab.id);
|
|
4975
|
+
return existingTab.id;
|
|
4976
|
+
}
|
|
5123
4977
|
// Create new tab
|
|
5124
4978
|
const newTab = {
|
|
5125
4979
|
id,
|
|
@@ -5158,10 +5012,21 @@ class CideLytRequestService {
|
|
|
5158
5012
|
console.warn('⚠️ Tab not found:', tabId);
|
|
5159
5013
|
return;
|
|
5160
5014
|
}
|
|
5161
|
-
//
|
|
5162
|
-
//
|
|
5163
|
-
|
|
5164
|
-
|
|
5015
|
+
// Before navigating, ensure the route is fresh by clearing any cached state
|
|
5016
|
+
// This prevents old component data from persisting when reopening a tab
|
|
5017
|
+
if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {
|
|
5018
|
+
let pathKey = tabToActivate.route.startsWith('/') ? tabToActivate.route.substring(1) : tabToActivate.route;
|
|
5019
|
+
if (tabToActivate.params && Object.keys(tabToActivate.params).length > 0) {
|
|
5020
|
+
const queryParamsString = Object.keys(tabToActivate.params)
|
|
5021
|
+
.sort()
|
|
5022
|
+
.map(key => `${key}=${tabToActivate.params[key]}`)
|
|
5023
|
+
.join('&');
|
|
5024
|
+
pathKey += '?' + queryParamsString;
|
|
5025
|
+
}
|
|
5026
|
+
// Clear any cached route to ensure fresh component state
|
|
5027
|
+
this.routeReuseStrategy.clearStoredRoute(pathKey);
|
|
5028
|
+
console.log(`🔄 REQUEST SERVICE: Cleared cached route ${pathKey} before activating tab`);
|
|
5029
|
+
}
|
|
5165
5030
|
// Update tabs: deactivate all, then activate the target
|
|
5166
5031
|
const updatedTabs = tabs.map(tab => ({
|
|
5167
5032
|
...tab,
|
|
@@ -5189,17 +5054,20 @@ class CideLytRequestService {
|
|
|
5189
5054
|
// Sync with TabStateService by removing the tab state
|
|
5190
5055
|
this.tabStateService.removeTab(id);
|
|
5191
5056
|
// Clear stored route from strategy and ensure proper component cleanup
|
|
5192
|
-
// Clear stored route from strategy and ensure proper component cleanup
|
|
5193
5057
|
if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5058
|
+
let pathKey = tabToClose.route.startsWith('/') ? tabToClose.route.substring(1) : tabToClose.route;
|
|
5059
|
+
if (tabToClose.params && Object.keys(tabToClose.params).length > 0) {
|
|
5060
|
+
const queryParamsString = Object.keys(tabToClose.params)
|
|
5061
|
+
.sort()
|
|
5062
|
+
.map(key => `${key}=${tabToClose.params[key]}`)
|
|
5063
|
+
.join('&');
|
|
5064
|
+
pathKey += '?' + queryParamsString;
|
|
5065
|
+
}
|
|
5066
|
+
// Clear the stored route and destroy the component instance
|
|
5067
|
+
this.routeReuseStrategy.clearStoredRoute(pathKey);
|
|
5068
|
+
// Force a route refresh to ensure clean component state
|
|
5069
|
+
// This prevents old data from persisting when the same route is reopened
|
|
5070
|
+
console.log(`🧹 REQUEST SERVICE: Cleared stored route for ${pathKey} and destroyed component instance`);
|
|
5203
5071
|
}
|
|
5204
5072
|
// Remove the tab from this service's list
|
|
5205
5073
|
const newTabs = currentTabs.filter((tab) => tab.id !== id);
|
|
@@ -5225,50 +5093,11 @@ class CideLytRequestService {
|
|
|
5225
5093
|
this.tabStateService.setActiveTab(null);
|
|
5226
5094
|
// Clear sidedrawer as no tabs are open
|
|
5227
5095
|
this.sidedrawerService.updateDrawerItems(undefined);
|
|
5228
|
-
// Redirect to home screen when all tabs are closed
|
|
5229
|
-
// Use replaceUrl to prevent back navigation to closed tabs and ensure clean state
|
|
5230
|
-
this.router.navigate(['/control-panel'], { replaceUrl: true });
|
|
5231
5096
|
}
|
|
5232
5097
|
this.tabsSignal.set(newTabs);
|
|
5233
5098
|
// Request wrapper visibility is now controlled by layout configuration
|
|
5234
5099
|
// The wrapper will be hidden/shown based on sytm_layout_request.status in setPageData
|
|
5235
5100
|
}
|
|
5236
|
-
/**
|
|
5237
|
-
* Close all tabs and navigate to home
|
|
5238
|
-
* This is used when entity changes to ensure all components are destroyed and refreshed
|
|
5239
|
-
* IMPORTANT: This method ensures all tab components are removed from DOM by:
|
|
5240
|
-
* 1. Clearing all stored routes from route reuse strategy (destroys component instances)
|
|
5241
|
-
* 2. Clearing all tabs from TabStateService
|
|
5242
|
-
* 3. Navigating to home to clear router outlet
|
|
5243
|
-
*/
|
|
5244
|
-
closeAllTabs() {
|
|
5245
|
-
console.log('🧹 REQUEST SERVICE: Closing all tabs due to entity change');
|
|
5246
|
-
const currentTabs = this.tabsSignal();
|
|
5247
|
-
// Close all floating containers first
|
|
5248
|
-
this.floatingContainerService.hideAll();
|
|
5249
|
-
console.log('🧹 REQUEST SERVICE: Closed all floating containers');
|
|
5250
|
-
// Clear all tabs from TabStateService first
|
|
5251
|
-
currentTabs.forEach(tab => {
|
|
5252
|
-
this.tabStateService.removeTab(tab.id);
|
|
5253
|
-
});
|
|
5254
|
-
// Clear ALL stored routes from route reuse strategy
|
|
5255
|
-
// This ensures all component instances are destroyed and removed from DOM
|
|
5256
|
-
if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {
|
|
5257
|
-
console.log('🧹 REQUEST SERVICE: Clearing all stored routes to remove components from DOM');
|
|
5258
|
-
this.routeReuseStrategy.clearAllStoredRoutes();
|
|
5259
|
-
console.log('✅ REQUEST SERVICE: All stored routes cleared, components destroyed');
|
|
5260
|
-
}
|
|
5261
|
-
// Clear all tabs from signals
|
|
5262
|
-
this.tabsSignal.set([]);
|
|
5263
|
-
this.activeTabIdSignal.set(null);
|
|
5264
|
-
this.tabStateService.setActiveTab(null);
|
|
5265
|
-
// Clear sidedrawer
|
|
5266
|
-
this.sidedrawerService.updateDrawerItems(undefined);
|
|
5267
|
-
// Navigate to home - this ensures router outlet is cleared and any remaining components are removed
|
|
5268
|
-
// Use replaceUrl to prevent back navigation to closed tabs
|
|
5269
|
-
this.router.navigate(['/control-panel'], { replaceUrl: true });
|
|
5270
|
-
console.log('✅ REQUEST SERVICE: All tabs and floating containers closed, navigated to home');
|
|
5271
|
-
}
|
|
5272
5101
|
// Hide Request
|
|
5273
5102
|
hideRequest() {
|
|
5274
5103
|
console.log('🚫 REQUEST SERVICE - Hiding request wrapper');
|
|
@@ -5305,8 +5134,17 @@ class CideLytRequestService {
|
|
|
5305
5134
|
*/
|
|
5306
5135
|
forceRefreshRoute(route, params) {
|
|
5307
5136
|
if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {
|
|
5308
|
-
|
|
5309
|
-
|
|
5137
|
+
let pathKey = route.startsWith('/') ? route.substring(1) : route;
|
|
5138
|
+
if (params && Object.keys(params).length > 0) {
|
|
5139
|
+
const queryParamsString = Object.keys(params)
|
|
5140
|
+
.sort()
|
|
5141
|
+
.map(key => `${key}=${params[key]}`)
|
|
5142
|
+
.join('&');
|
|
5143
|
+
pathKey += '?' + queryParamsString;
|
|
5144
|
+
}
|
|
5145
|
+
// Clear the stored route to force a fresh component instance
|
|
5146
|
+
this.routeReuseStrategy.clearStoredRoute(pathKey);
|
|
5147
|
+
console.log(`🔄 REQUEST SERVICE: Force refreshed route ${pathKey}`);
|
|
5310
5148
|
}
|
|
5311
5149
|
}
|
|
5312
5150
|
/**
|
|
@@ -5412,8 +5250,8 @@ class CideLytSidedrawerWrapperComponent {
|
|
|
5412
5250
|
}
|
|
5413
5251
|
ngOnInit() {
|
|
5414
5252
|
// Initialize the component map (You'd likely populate this from a config or service)
|
|
5415
|
-
this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-
|
|
5416
|
-
this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-
|
|
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);
|
|
5417
5255
|
}
|
|
5418
5256
|
async loadComponent(configFor) {
|
|
5419
5257
|
console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
|
|
@@ -7105,7 +6943,7 @@ const layoutControlPannelChildRoutes = [{
|
|
|
7105
6943
|
},
|
|
7106
6944
|
{
|
|
7107
6945
|
path: "home",
|
|
7108
|
-
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-
|
|
6946
|
+
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-DoPrXEV9.mjs').then(c => c.CideLytHomeWrapperComponent),
|
|
7109
6947
|
canActivate: [authGuard],
|
|
7110
6948
|
data: {
|
|
7111
6949
|
sypg_page_code: "cide_lyt_home" // Used by RequestService to fetch tab properties
|
|
@@ -7113,7 +6951,7 @@ const layoutControlPannelChildRoutes = [{
|
|
|
7113
6951
|
},
|
|
7114
6952
|
{
|
|
7115
6953
|
path: "dashboard-manager",
|
|
7116
|
-
loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-
|
|
6954
|
+
loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-DYixwEQa.mjs').then(c => c.DashboardManagerComponent),
|
|
7117
6955
|
canActivate: [authGuard],
|
|
7118
6956
|
data: {
|
|
7119
6957
|
sypg_page_code: "cide_lyt_dashboard_manager"
|
|
@@ -8937,4 +8775,4 @@ var floatingEntitySelection_component = /*#__PURE__*/Object.freeze({
|
|
|
8937
8775
|
*/
|
|
8938
8776
|
|
|
8939
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 };
|
|
8940
|
-
//# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-
|
|
8778
|
+
//# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-BvT1pY8z.mjs.map
|