cloud-ide-layout 1.0.181 → 1.0.183
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-DKS9wXiJ.mjs} +16 -84
- package/fesm2022/cloud-ide-layout-cloud-ide-layout-DKS9wXiJ.mjs.map +1 -0
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-DWxN9ReS.mjs → cloud-ide-layout-dashboard-manager.component-14bzX9WU.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-DWxN9ReS.mjs.map → cloud-ide-layout-dashboard-manager.component-14bzX9WU.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-D4qmt25K.mjs → cloud-ide-layout-drawer-theme.component-CMznktiP.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-D4qmt25K.mjs.map → cloud-ide-layout-drawer-theme.component-CMznktiP.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-DeR1T21C.mjs → cloud-ide-layout-home-wrapper.component-CjeRFIUF.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-DeR1T21C.mjs.map → cloud-ide-layout-home-wrapper.component-CjeRFIUF.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-BuDfM6ms.mjs → cloud-ide-layout-sidedrawer-notes.component-S669EsVL.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-BuDfM6ms.mjs.map → cloud-ide-layout-sidedrawer-notes.component-S669EsVL.mjs.map} +1 -1
- package/fesm2022/cloud-ide-layout.mjs +1 -1
- package/package.json +1 -1
- package/fesm2022/cloud-ide-layout-cloud-ide-layout-BlLjLM3N.mjs.map +0 -1
|
@@ -4810,23 +4810,10 @@ class CustomRouteReuseStrategy {
|
|
|
4810
4810
|
}
|
|
4811
4811
|
}
|
|
4812
4812
|
// Clears all stored routes (useful for cleanup)
|
|
4813
|
-
// This method ensures all component instances are destroyed and removed from DOM
|
|
4814
4813
|
clearAllStoredRoutes() {
|
|
4815
|
-
|
|
4816
|
-
console.log(`🧹 [RouteReuseStrategy] Clearing ${routeKeys.length} stored route(s) to remove components from DOM`);
|
|
4817
|
-
routeKeys.forEach(pathKey => {
|
|
4814
|
+
Object.keys(this.storedRoutes).forEach(pathKey => {
|
|
4818
4815
|
this.clearStoredRoute(pathKey);
|
|
4819
4816
|
});
|
|
4820
|
-
// Double-check that all routes are cleared
|
|
4821
|
-
const remainingRoutes = Object.keys(this.storedRoutes).length;
|
|
4822
|
-
if (remainingRoutes > 0) {
|
|
4823
|
-
console.warn(`⚠️ [RouteReuseStrategy] ${remainingRoutes} route(s) still remain after clearing. Force clearing...`);
|
|
4824
|
-
// Force clear any remaining routes
|
|
4825
|
-
Object.keys(this.storedRoutes).forEach(pathKey => {
|
|
4826
|
-
delete this.storedRoutes[pathKey];
|
|
4827
|
-
});
|
|
4828
|
-
}
|
|
4829
|
-
console.log(`✅ [RouteReuseStrategy] All stored routes cleared. Components should be removed from DOM.`);
|
|
4830
4817
|
}
|
|
4831
4818
|
// Gets the count of stored routes (useful for debugging)
|
|
4832
4819
|
getStoredRoutesCount() {
|
|
@@ -4972,8 +4959,6 @@ class CideLytRequestService {
|
|
|
4972
4959
|
tabStateService = inject(TabStateService);
|
|
4973
4960
|
sidedrawerService = inject(CideLytSidedrawerService);
|
|
4974
4961
|
sharedService = inject(CideLytSharedService);
|
|
4975
|
-
floatingContainerService = inject(CideEleFloatingContainerService);
|
|
4976
|
-
appStateService = inject(AppStateService);
|
|
4977
4962
|
constructor() {
|
|
4978
4963
|
// Initialize router
|
|
4979
4964
|
this.router = inject(Router);
|
|
@@ -4982,12 +4967,6 @@ class CideLytRequestService {
|
|
|
4982
4967
|
this.sharedService.registerTabManagement(this.handleRouteBasedTabManagement.bind(this));
|
|
4983
4968
|
// Register request visibility callback
|
|
4984
4969
|
this.sharedService.registerRequestVisibility(this.handleRequestVisibility.bind(this));
|
|
4985
|
-
// Register entity change handler with AppStateService to close tabs when entity changes
|
|
4986
|
-
// This is safe because AppStateService no longer imports CideLytRequestService
|
|
4987
|
-
this.appStateService.registerEntityChangeHandler((entity) => {
|
|
4988
|
-
console.log('🏢 [RequestService] Entity changed, closing all tabs:', entity?._id);
|
|
4989
|
-
this.closeAllTabs();
|
|
4990
|
-
});
|
|
4991
4970
|
}
|
|
4992
4971
|
/**
|
|
4993
4972
|
* Handle request visibility changes from shared service
|
|
@@ -5040,8 +5019,16 @@ class CideLytRequestService {
|
|
|
5040
5019
|
const id = this.generateId();
|
|
5041
5020
|
const currentTabs = this.tabsSignal();
|
|
5042
5021
|
console.log('currentTabs', currentTabs, route);
|
|
5043
|
-
//
|
|
5044
|
-
|
|
5022
|
+
// Check if a tab with the same route and params already exists
|
|
5023
|
+
const existingTab = currentTabs.find((tab) => {
|
|
5024
|
+
const paramsMatch = JSON.stringify(tab.params || {}) === JSON.stringify(params || {});
|
|
5025
|
+
return tab.route === route && paramsMatch;
|
|
5026
|
+
});
|
|
5027
|
+
console.log('existingTab', existingTab);
|
|
5028
|
+
if (existingTab) {
|
|
5029
|
+
this.activateTab(existingTab.id);
|
|
5030
|
+
return existingTab.id;
|
|
5031
|
+
}
|
|
5045
5032
|
// Create new tab
|
|
5046
5033
|
const newTab = {
|
|
5047
5034
|
id,
|
|
@@ -5123,11 +5110,7 @@ class CideLytRequestService {
|
|
|
5123
5110
|
this.tabStateService.removeTab(id);
|
|
5124
5111
|
// Clear stored route from strategy and ensure proper component cleanup
|
|
5125
5112
|
if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {
|
|
5126
|
-
// Generate pathKey in the same format as CustomRouteReuseStrategy.getPathKey()
|
|
5127
|
-
// Remove leading slash to match the format used by getPathKey
|
|
5128
5113
|
let pathKey = tabToClose.route.startsWith('/') ? tabToClose.route.substring(1) : tabToClose.route;
|
|
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
5114
|
if (tabToClose.params && Object.keys(tabToClose.params).length > 0) {
|
|
5132
5115
|
const queryParamsString = Object.keys(tabToClose.params)
|
|
5133
5116
|
.sort()
|
|
@@ -5137,21 +5120,9 @@ class CideLytRequestService {
|
|
|
5137
5120
|
}
|
|
5138
5121
|
// Clear the stored route and destroy the component instance
|
|
5139
5122
|
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
5123
|
// Force a route refresh to ensure clean component state
|
|
5147
5124
|
// This prevents old data from persisting when the same route is reopened
|
|
5148
5125
|
console.log(`🧹 REQUEST SERVICE: Cleared stored route for ${pathKey} and destroyed component instance`);
|
|
5149
|
-
// If this was the active tab, navigate away to ensure component is removed from DOM
|
|
5150
|
-
if (wasActive) {
|
|
5151
|
-
// The navigation to the new active tab will happen below, which will properly clear the router outlet
|
|
5152
|
-
// But we also want to ensure the component is removed immediately
|
|
5153
|
-
console.log(`🧹 REQUEST SERVICE: Active tab closed, component will be removed on navigation`);
|
|
5154
|
-
}
|
|
5155
5126
|
}
|
|
5156
5127
|
// Remove the tab from this service's list
|
|
5157
5128
|
const newTabs = currentTabs.filter((tab) => tab.id !== id);
|
|
@@ -5177,50 +5148,11 @@ class CideLytRequestService {
|
|
|
5177
5148
|
this.tabStateService.setActiveTab(null);
|
|
5178
5149
|
// Clear sidedrawer as no tabs are open
|
|
5179
5150
|
this.sidedrawerService.updateDrawerItems(undefined);
|
|
5180
|
-
// Redirect to home screen when all tabs are closed
|
|
5181
|
-
// Use replaceUrl to prevent back navigation to closed tabs and ensure clean state
|
|
5182
|
-
this.router.navigate(['/control-panel'], { replaceUrl: true });
|
|
5183
5151
|
}
|
|
5184
5152
|
this.tabsSignal.set(newTabs);
|
|
5185
5153
|
// Request wrapper visibility is now controlled by layout configuration
|
|
5186
5154
|
// The wrapper will be hidden/shown based on sytm_layout_request.status in setPageData
|
|
5187
5155
|
}
|
|
5188
|
-
/**
|
|
5189
|
-
* Close all tabs and navigate to home
|
|
5190
|
-
* This is used when entity changes to ensure all components are destroyed and refreshed
|
|
5191
|
-
* IMPORTANT: This method ensures all tab components are removed from DOM by:
|
|
5192
|
-
* 1. Clearing all stored routes from route reuse strategy (destroys component instances)
|
|
5193
|
-
* 2. Clearing all tabs from TabStateService
|
|
5194
|
-
* 3. Navigating to home to clear router outlet
|
|
5195
|
-
*/
|
|
5196
|
-
closeAllTabs() {
|
|
5197
|
-
console.log('🧹 REQUEST SERVICE: Closing all tabs due to entity change');
|
|
5198
|
-
const currentTabs = this.tabsSignal();
|
|
5199
|
-
// Close all floating containers first
|
|
5200
|
-
this.floatingContainerService.hideAll();
|
|
5201
|
-
console.log('🧹 REQUEST SERVICE: Closed all floating containers');
|
|
5202
|
-
// Clear all tabs from TabStateService first
|
|
5203
|
-
currentTabs.forEach(tab => {
|
|
5204
|
-
this.tabStateService.removeTab(tab.id);
|
|
5205
|
-
});
|
|
5206
|
-
// Clear ALL stored routes from route reuse strategy
|
|
5207
|
-
// This ensures all component instances are destroyed and removed from DOM
|
|
5208
|
-
if (this.routeReuseStrategy instanceof CustomRouteReuseStrategy) {
|
|
5209
|
-
console.log('🧹 REQUEST SERVICE: Clearing all stored routes to remove components from DOM');
|
|
5210
|
-
this.routeReuseStrategy.clearAllStoredRoutes();
|
|
5211
|
-
console.log('✅ REQUEST SERVICE: All stored routes cleared, components destroyed');
|
|
5212
|
-
}
|
|
5213
|
-
// Clear all tabs from signals
|
|
5214
|
-
this.tabsSignal.set([]);
|
|
5215
|
-
this.activeTabIdSignal.set(null);
|
|
5216
|
-
this.tabStateService.setActiveTab(null);
|
|
5217
|
-
// Clear sidedrawer
|
|
5218
|
-
this.sidedrawerService.updateDrawerItems(undefined);
|
|
5219
|
-
// Navigate to home - this ensures router outlet is cleared and any remaining components are removed
|
|
5220
|
-
// Use replaceUrl to prevent back navigation to closed tabs
|
|
5221
|
-
this.router.navigate(['/control-panel'], { replaceUrl: true });
|
|
5222
|
-
console.log('✅ REQUEST SERVICE: All tabs and floating containers closed, navigated to home');
|
|
5223
|
-
}
|
|
5224
5156
|
// Hide Request
|
|
5225
5157
|
hideRequest() {
|
|
5226
5158
|
console.log('🚫 REQUEST SERVICE - Hiding request wrapper');
|
|
@@ -5373,8 +5305,8 @@ class CideLytSidedrawerWrapperComponent {
|
|
|
5373
5305
|
}
|
|
5374
5306
|
ngOnInit() {
|
|
5375
5307
|
// 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-
|
|
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);
|
|
5378
5310
|
}
|
|
5379
5311
|
async loadComponent(configFor) {
|
|
5380
5312
|
console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
|
|
@@ -7066,7 +6998,7 @@ const layoutControlPannelChildRoutes = [{
|
|
|
7066
6998
|
},
|
|
7067
6999
|
{
|
|
7068
7000
|
path: "home",
|
|
7069
|
-
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-
|
|
7001
|
+
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-CjeRFIUF.mjs').then(c => c.CideLytHomeWrapperComponent),
|
|
7070
7002
|
canActivate: [authGuard],
|
|
7071
7003
|
data: {
|
|
7072
7004
|
sypg_page_code: "cide_lyt_home" // Used by RequestService to fetch tab properties
|
|
@@ -7074,7 +7006,7 @@ const layoutControlPannelChildRoutes = [{
|
|
|
7074
7006
|
},
|
|
7075
7007
|
{
|
|
7076
7008
|
path: "dashboard-manager",
|
|
7077
|
-
loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-
|
|
7009
|
+
loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-14bzX9WU.mjs').then(c => c.DashboardManagerComponent),
|
|
7078
7010
|
canActivate: [authGuard],
|
|
7079
7011
|
data: {
|
|
7080
7012
|
sypg_page_code: "cide_lyt_dashboard_manager"
|
|
@@ -8898,4 +8830,4 @@ var floatingEntitySelection_component = /*#__PURE__*/Object.freeze({
|
|
|
8898
8830
|
*/
|
|
8899
8831
|
|
|
8900
8832
|
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-
|
|
8833
|
+
//# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-DKS9wXiJ.mjs.map
|