cloud-ide-layout 1.0.179 → 1.0.180
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-BlLjLM3N.mjs → cloud-ide-layout-cloud-ide-layout-W4WjBty3.mjs} +108 -64
- package/fesm2022/cloud-ide-layout-cloud-ide-layout-W4WjBty3.mjs.map +1 -0
- package/fesm2022/cloud-ide-layout-dashboard-cards.service-BGaKcq7H.mjs.map +1 -1
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-DWxN9ReS.mjs → cloud-ide-layout-dashboard-manager.component-BVtdt1TW.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-DWxN9ReS.mjs.map → cloud-ide-layout-dashboard-manager.component-BVtdt1TW.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-D4qmt25K.mjs → cloud-ide-layout-drawer-theme.component-DywE01AM.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-D4qmt25K.mjs.map → cloud-ide-layout-drawer-theme.component-DywE01AM.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-DeR1T21C.mjs → cloud-ide-layout-home-wrapper.component-DTKumUOV.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-DeR1T21C.mjs.map → cloud-ide-layout-home-wrapper.component-DTKumUOV.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-BuDfM6ms.mjs → cloud-ide-layout-sidedrawer-notes.component-D4zenTjI.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-BuDfM6ms.mjs.map → cloud-ide-layout-sidedrawer-notes.component-D4zenTjI.mjs.map} +1 -1
- package/fesm2022/cloud-ide-layout.mjs +1 -1
- package/index.d.ts +10 -0
- package/package.json +1 -1
- package/fesm2022/cloud-ide-layout-cloud-ide-layout-BlLjLM3N.mjs.map +0 -1
|
@@ -4734,11 +4734,82 @@ class CustomRouteReuseStrategy {
|
|
|
4734
4734
|
shouldReuseRoute(future, curr) {
|
|
4735
4735
|
return future.routeConfig === curr.routeConfig;
|
|
4736
4736
|
}
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4737
|
+
/**
|
|
4738
|
+
* Clears a stored route by path and optional parameters.
|
|
4739
|
+
* This method attempts to find a matching stored route using a robust matching algorithm.
|
|
4740
|
+
*/
|
|
4741
|
+
clearRoute(path, params) {
|
|
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];
|
|
4742
4813
|
if (handle) {
|
|
4743
4814
|
// Properly destroy the component instance to prevent memory leaks
|
|
4744
4815
|
// and ensure clean state when the route is reopened
|
|
@@ -4750,14 +4821,14 @@ class CustomRouteReuseStrategy {
|
|
|
4750
4821
|
const componentRef = handle;
|
|
4751
4822
|
// Verify it has hostView (ComponentRef signature)
|
|
4752
4823
|
if (componentRef.hostView || componentRef.location) {
|
|
4753
|
-
console.log(`🗑️ Destroying component instance (ComponentRef) for route: ${
|
|
4824
|
+
console.log(`🗑️ Destroying component instance (ComponentRef) for route: ${key}`);
|
|
4754
4825
|
componentRef.destroy();
|
|
4755
4826
|
}
|
|
4756
4827
|
}
|
|
4757
4828
|
// Method 2: Check if handle is a ViewContainerRef
|
|
4758
4829
|
if (handle && typeof handle.clear === 'function' && typeof handle.length === 'number') {
|
|
4759
4830
|
const viewContainerRef = handle;
|
|
4760
|
-
console.log(`🗑️ Clearing view container for route: ${
|
|
4831
|
+
console.log(`🗑️ Clearing view container for route: ${key}`);
|
|
4761
4832
|
viewContainerRef.clear();
|
|
4762
4833
|
}
|
|
4763
4834
|
// Method 3: Check if handle is an object with nested ComponentRef
|
|
@@ -4779,19 +4850,19 @@ class CustomRouteReuseStrategy {
|
|
|
4779
4850
|
componentRef = handleObj._componentRef;
|
|
4780
4851
|
}
|
|
4781
4852
|
if (componentRef) {
|
|
4782
|
-
console.log(`🗑️ Destroying component instance from handle object for route: ${
|
|
4853
|
+
console.log(`🗑️ Destroying component instance from handle object for route: ${key}`);
|
|
4783
4854
|
componentRef.destroy();
|
|
4784
4855
|
}
|
|
4785
4856
|
// Also try to clear view container if it exists
|
|
4786
4857
|
if (handleObj.viewContainerRef && typeof handleObj.viewContainerRef.clear === 'function') {
|
|
4787
|
-
console.log(`🗑️ Clearing view container from handle object for route: ${
|
|
4858
|
+
console.log(`🗑️ Clearing view container from handle object for route: ${key}`);
|
|
4788
4859
|
handleObj.viewContainerRef.clear();
|
|
4789
4860
|
}
|
|
4790
4861
|
// Try to destroy any nested components
|
|
4791
4862
|
if (handleObj.components && Array.isArray(handleObj.components)) {
|
|
4792
4863
|
handleObj.components.forEach((comp, index) => {
|
|
4793
4864
|
if (comp && typeof comp.destroy === 'function') {
|
|
4794
|
-
console.log(`🗑️ Destroying nested component ${index} for route: ${
|
|
4865
|
+
console.log(`🗑️ Destroying nested component ${index} for route: ${key}`);
|
|
4795
4866
|
comp.destroy();
|
|
4796
4867
|
}
|
|
4797
4868
|
});
|
|
@@ -4799,16 +4870,23 @@ class CustomRouteReuseStrategy {
|
|
|
4799
4870
|
}
|
|
4800
4871
|
}
|
|
4801
4872
|
catch (error) {
|
|
4802
|
-
console.warn(`⚠️ Error destroying route handle for ${
|
|
4873
|
+
console.warn(`⚠️ Error destroying route handle for ${key}:`, error);
|
|
4803
4874
|
}
|
|
4804
4875
|
// Remove from stored routes - this ensures shouldAttach will return false for this route
|
|
4805
|
-
delete this.storedRoutes[
|
|
4806
|
-
console.log(`✅ Cleared stored route: ${
|
|
4876
|
+
delete this.storedRoutes[key];
|
|
4877
|
+
console.log(`✅ Cleared stored route: ${key} (removed from storedRoutes map)`);
|
|
4807
4878
|
}
|
|
4808
4879
|
else {
|
|
4809
|
-
console.log(`ℹ️ No stored route found for: ${
|
|
4880
|
+
console.log(`ℹ️ No stored route found for: ${key}`);
|
|
4810
4881
|
}
|
|
4811
4882
|
}
|
|
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
|
+
}
|
|
4812
4890
|
// Clears all stored routes (useful for cleanup)
|
|
4813
4891
|
// This method ensures all component instances are destroyed and removed from DOM
|
|
4814
4892
|
clearAllStoredRoutes() {
|
|
@@ -5082,18 +5160,12 @@ class CideLytRequestService {
|
|
|
5082
5160
|
}
|
|
5083
5161
|
// Before navigating, ensure the route is fresh by clearing any cached state
|
|
5084
5162
|
// This prevents old component data from persisting when reopening a tab
|
|
5163
|
+
// Before navigating, ensure the route is fresh by clearing any cached state
|
|
5164
|
+
// This prevents old component data from persisting when reopening a tab
|
|
5085
5165
|
if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
.sort()
|
|
5090
|
-
.map(key => `${key}=${tabToActivate.params[key]}`)
|
|
5091
|
-
.join('&');
|
|
5092
|
-
pathKey += '?' + queryParamsString;
|
|
5093
|
-
}
|
|
5094
|
-
// Clear any cached route to ensure fresh component state
|
|
5095
|
-
this.routeReuseStrategy.clearStoredRoute(pathKey);
|
|
5096
|
-
console.log(`🔄 REQUEST SERVICE: Cleared cached route ${pathKey} before activating tab`);
|
|
5166
|
+
// Use the new robust clearRoute method
|
|
5167
|
+
this.routeReuseStrategy.clearRoute(tabToActivate.route, tabToActivate.params);
|
|
5168
|
+
console.log(`🔄 REQUEST SERVICE: Cleared cached route for ${tabToActivate.title} before activating tab`);
|
|
5097
5169
|
}
|
|
5098
5170
|
// Update tabs: deactivate all, then activate the target
|
|
5099
5171
|
const updatedTabs = tabs.map(tab => ({
|
|
@@ -5122,30 +5194,11 @@ class CideLytRequestService {
|
|
|
5122
5194
|
// Sync with TabStateService by removing the tab state
|
|
5123
5195
|
this.tabStateService.removeTab(id);
|
|
5124
5196
|
// Clear stored route from strategy and ensure proper component cleanup
|
|
5197
|
+
// Clear stored route from strategy and ensure proper component cleanup
|
|
5125
5198
|
if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {
|
|
5126
|
-
//
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
// Only add query params if the route is marked for reuse (matching getPathKey logic)
|
|
5130
|
-
// But we'll try to clear with both formats to be safe
|
|
5131
|
-
if (tabToClose.params && Object.keys(tabToClose.params).length > 0) {
|
|
5132
|
-
const queryParamsString = Object.keys(tabToClose.params)
|
|
5133
|
-
.sort()
|
|
5134
|
-
.map(key => `${key}=${tabToClose.params[key]}`)
|
|
5135
|
-
.join('&');
|
|
5136
|
-
pathKey += '?' + queryParamsString;
|
|
5137
|
-
}
|
|
5138
|
-
// Clear the stored route and destroy the component instance
|
|
5139
|
-
this.routeReuseStrategy.clearStoredRoute(pathKey);
|
|
5140
|
-
// Also try clearing without query params in case the route wasn't marked for reuse
|
|
5141
|
-
// This ensures we catch all possible pathKey variations
|
|
5142
|
-
const pathKeyWithoutParams = tabToClose.route.startsWith('/') ? tabToClose.route.substring(1) : tabToClose.route;
|
|
5143
|
-
if (pathKeyWithoutParams !== pathKey) {
|
|
5144
|
-
this.routeReuseStrategy.clearStoredRoute(pathKeyWithoutParams);
|
|
5145
|
-
}
|
|
5146
|
-
// Force a route refresh to ensure clean component state
|
|
5147
|
-
// This prevents old data from persisting when the same route is reopened
|
|
5148
|
-
console.log(`🧹 REQUEST SERVICE: Cleared stored route for ${pathKey} and destroyed component instance`);
|
|
5199
|
+
// Use the new robust clearRoute method
|
|
5200
|
+
this.routeReuseStrategy.clearRoute(tabToClose.route, tabToClose.params);
|
|
5201
|
+
console.log(`🧹 REQUEST SERVICE: Cleared stored route for closed tab ${tabToClose.title}`);
|
|
5149
5202
|
// If this was the active tab, navigate away to ensure component is removed from DOM
|
|
5150
5203
|
if (wasActive) {
|
|
5151
5204
|
// The navigation to the new active tab will happen below, which will properly clear the router outlet
|
|
@@ -5257,17 +5310,8 @@ class CideLytRequestService {
|
|
|
5257
5310
|
*/
|
|
5258
5311
|
forceRefreshRoute(route, params) {
|
|
5259
5312
|
if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
const queryParamsString = Object.keys(params)
|
|
5263
|
-
.sort()
|
|
5264
|
-
.map(key => `${key}=${params[key]}`)
|
|
5265
|
-
.join('&');
|
|
5266
|
-
pathKey += '?' + queryParamsString;
|
|
5267
|
-
}
|
|
5268
|
-
// Clear the stored route to force a fresh component instance
|
|
5269
|
-
this.routeReuseStrategy.clearStoredRoute(pathKey);
|
|
5270
|
-
console.log(`🔄 REQUEST SERVICE: Force refreshed route ${pathKey}`);
|
|
5313
|
+
this.routeReuseStrategy.clearRoute(route, params);
|
|
5314
|
+
console.log(`🔄 REQUEST SERVICE: Force refreshed route ${route}`);
|
|
5271
5315
|
}
|
|
5272
5316
|
}
|
|
5273
5317
|
/**
|
|
@@ -5373,8 +5417,8 @@ class CideLytSidedrawerWrapperComponent {
|
|
|
5373
5417
|
}
|
|
5374
5418
|
ngOnInit() {
|
|
5375
5419
|
// Initialize the component map (You'd likely populate this from a config or service)
|
|
5376
|
-
this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-
|
|
5377
|
-
this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-
|
|
5420
|
+
this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-D4zenTjI.mjs').then(m => m.CideLytSidedrawerNotesComponent);
|
|
5421
|
+
this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-DywE01AM.mjs').then(m => m.CideLytDrawerThemeComponent);
|
|
5378
5422
|
}
|
|
5379
5423
|
async loadComponent(configFor) {
|
|
5380
5424
|
console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
|
|
@@ -7066,7 +7110,7 @@ const layoutControlPannelChildRoutes = [{
|
|
|
7066
7110
|
},
|
|
7067
7111
|
{
|
|
7068
7112
|
path: "home",
|
|
7069
|
-
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-
|
|
7113
|
+
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-DTKumUOV.mjs').then(c => c.CideLytHomeWrapperComponent),
|
|
7070
7114
|
canActivate: [authGuard],
|
|
7071
7115
|
data: {
|
|
7072
7116
|
sypg_page_code: "cide_lyt_home" // Used by RequestService to fetch tab properties
|
|
@@ -7074,7 +7118,7 @@ const layoutControlPannelChildRoutes = [{
|
|
|
7074
7118
|
},
|
|
7075
7119
|
{
|
|
7076
7120
|
path: "dashboard-manager",
|
|
7077
|
-
loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-
|
|
7121
|
+
loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-BVtdt1TW.mjs').then(c => c.DashboardManagerComponent),
|
|
7078
7122
|
canActivate: [authGuard],
|
|
7079
7123
|
data: {
|
|
7080
7124
|
sypg_page_code: "cide_lyt_dashboard_manager"
|
|
@@ -8898,4 +8942,4 @@ var floatingEntitySelection_component = /*#__PURE__*/Object.freeze({
|
|
|
8898
8942
|
*/
|
|
8899
8943
|
|
|
8900
8944
|
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 };
|
|
8901
|
-
//# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-
|
|
8945
|
+
//# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-W4WjBty3.mjs.map
|