cloud-ide-layout 1.0.196 → 1.0.198
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-DNJnD_Vr.mjs → cloud-ide-layout-cloud-ide-layout-IWRXJZWw.mjs} +57 -5
- package/fesm2022/cloud-ide-layout-cloud-ide-layout-IWRXJZWw.mjs.map +1 -0
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-BC7_konM.mjs → cloud-ide-layout-dashboard-manager.component-Nj16vAo6.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-BC7_konM.mjs.map → cloud-ide-layout-dashboard-manager.component-Nj16vAo6.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-kfMpJ8HO.mjs → cloud-ide-layout-drawer-theme.component-DzKVXMjI.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-kfMpJ8HO.mjs.map → cloud-ide-layout-drawer-theme.component-DzKVXMjI.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-Bcw1UvWD.mjs → cloud-ide-layout-home-wrapper.component-wkXPWz-K.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-Bcw1UvWD.mjs.map → cloud-ide-layout-home-wrapper.component-wkXPWz-K.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-i21oz3ul.mjs → cloud-ide-layout-sidedrawer-notes.component-Dz9RmJNj.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-i21oz3ul.mjs.map → cloud-ide-layout-sidedrawer-notes.component-Dz9RmJNj.mjs.map} +1 -1
- package/fesm2022/cloud-ide-layout.mjs +1 -1
- package/index.d.ts +5 -0
- package/package.json +1 -1
- package/fesm2022/cloud-ide-layout-cloud-ide-layout-DNJnD_Vr.mjs.map +0 -1
|
@@ -4674,7 +4674,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
4674
4674
|
* to persist component state, especially for tabbed navigation.
|
|
4675
4675
|
*/
|
|
4676
4676
|
class CustomRouteReuseStrategy {
|
|
4677
|
+
injector = inject(Injector);
|
|
4677
4678
|
storedRoutes = {};
|
|
4679
|
+
routesToDestroy = new Set(); // Keys marked for destruction (do not store)
|
|
4678
4680
|
// Generates a unique key for a route.
|
|
4679
4681
|
// This key includes sorted query parameters to ensure distinct states for tabs differing by query params.
|
|
4680
4682
|
getPathKey(route) {
|
|
@@ -4706,6 +4708,27 @@ class CustomRouteReuseStrategy {
|
|
|
4706
4708
|
const hasChildren = route.firstChild !== null;
|
|
4707
4709
|
const shouldDetach = hasComponent && !hasChildren;
|
|
4708
4710
|
const pathKey = this.getPathKey(route);
|
|
4711
|
+
// Check if this page is configured to NOT use tabs (sytm_layout_request.status === false)
|
|
4712
|
+
// We check cached page data from SharedService
|
|
4713
|
+
if (shouldDetach) {
|
|
4714
|
+
try {
|
|
4715
|
+
// Lazy inject to avoid circular dependency (Router -> Strategy -> Shared -> Router)
|
|
4716
|
+
const sharedService = this.injector.get(CideLytSharedService);
|
|
4717
|
+
const pageCode = route.data['sypg_page_code'] || route.queryParams['sypg_page_code'];
|
|
4718
|
+
if (pageCode) {
|
|
4719
|
+
// Check cache directly (synchronous)
|
|
4720
|
+
const cachedData = sharedService.getCachedPageData(pageCode);
|
|
4721
|
+
const requestStatus = cachedData?.data?.theme?.sytm_layout?.sytm_layout_request?.status;
|
|
4722
|
+
if (requestStatus === false) {
|
|
4723
|
+
console.log(`🚫 [shouldDetach] Preventing detach for ${pathKey} because request layout is disabled (e.g. Home page)`);
|
|
4724
|
+
return false;
|
|
4725
|
+
}
|
|
4726
|
+
}
|
|
4727
|
+
}
|
|
4728
|
+
catch (e) {
|
|
4729
|
+
// Ignore errors if service not ready
|
|
4730
|
+
}
|
|
4731
|
+
}
|
|
4709
4732
|
console.log(`🔍 [shouldDetach] Route: ${pathKey}, hasComponent: ${hasComponent}, hasChildren: ${hasChildren}, shouldDetach: ${shouldDetach}`);
|
|
4710
4733
|
return shouldDetach;
|
|
4711
4734
|
}
|
|
@@ -4713,11 +4736,29 @@ class CustomRouteReuseStrategy {
|
|
|
4713
4736
|
// IMPORTANT: We ALWAYS store routes to support tab-based navigation
|
|
4714
4737
|
store(route, handle) {
|
|
4715
4738
|
const pathKey = this.getPathKey(route);
|
|
4739
|
+
// If this route is marked for destruction, DO NOT store it, and destroy the handle immediately
|
|
4740
|
+
if (pathKey && this.routesToDestroy.has(pathKey)) {
|
|
4741
|
+
console.log(`🚫 [RouteReuseStrategy] Prevented storage of closed route: ${pathKey}`);
|
|
4742
|
+
this.routesToDestroy.delete(pathKey); // Cleanup
|
|
4743
|
+
if (handle) {
|
|
4744
|
+
// Destroy the handle immediately
|
|
4745
|
+
const componentRef = handle.componentRef || handle.component;
|
|
4746
|
+
if (componentRef && typeof componentRef.destroy === 'function') {
|
|
4747
|
+
componentRef.destroy();
|
|
4748
|
+
}
|
|
4749
|
+
}
|
|
4750
|
+
return;
|
|
4751
|
+
}
|
|
4716
4752
|
if (handle && pathKey) {
|
|
4717
4753
|
this.storedRoutes[pathKey] = handle;
|
|
4718
4754
|
console.log(`📦 [RouteReuseStrategy] Stored route: ${pathKey}`);
|
|
4719
4755
|
}
|
|
4720
4756
|
}
|
|
4757
|
+
// Mark a route key to NOT be stored (used when closing an active tab)
|
|
4758
|
+
doNotStore(pathKey) {
|
|
4759
|
+
this.routesToDestroy.add(pathKey);
|
|
4760
|
+
console.log(`💀 [RouteReuseStrategy] Marked route for destruction (will not store): ${pathKey}`);
|
|
4761
|
+
}
|
|
4721
4762
|
// Determines if this route (and its subtree) should be reattached.
|
|
4722
4763
|
shouldAttach(route) {
|
|
4723
4764
|
const pathKey = this.getPathKey(route);
|
|
@@ -4849,7 +4890,15 @@ class CustomRouteReuseStrategy {
|
|
|
4849
4890
|
getAllStoredRouteKeys() {
|
|
4850
4891
|
return Object.keys(this.storedRoutes);
|
|
4851
4892
|
}
|
|
4893
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CustomRouteReuseStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4894
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CustomRouteReuseStrategy, providedIn: 'root' });
|
|
4852
4895
|
}
|
|
4896
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CustomRouteReuseStrategy, decorators: [{
|
|
4897
|
+
type: Injectable,
|
|
4898
|
+
args: [{
|
|
4899
|
+
providedIn: 'root'
|
|
4900
|
+
}]
|
|
4901
|
+
}] });
|
|
4853
4902
|
|
|
4854
4903
|
/**
|
|
4855
4904
|
* Creates the default state for a new tab.
|
|
@@ -5148,6 +5197,8 @@ class CideLytRequestService {
|
|
|
5148
5197
|
}
|
|
5149
5198
|
// Clear the stored route and destroy the component instance
|
|
5150
5199
|
this.routeReuseStrategy.clearStoredRoute(pathKey);
|
|
5200
|
+
// IMPORTANT: Mark this key to NOT be stored again (fixing active tab race condition)
|
|
5201
|
+
this.routeReuseStrategy.doNotStore(pathKey);
|
|
5151
5202
|
// Also try clearing without query params in case the route wasn't marked for reuse
|
|
5152
5203
|
// This ensures we catch all possible pathKey variations
|
|
5153
5204
|
const pathKeyWithoutParams = tabToClose.route.startsWith('/') ? tabToClose.route.substring(1) : tabToClose.route;
|
|
@@ -5161,6 +5212,7 @@ class CideLytRequestService {
|
|
|
5161
5212
|
console.log('🎯 [CLOSE TAB] Found fuzzy matches:', fuzzyMatches);
|
|
5162
5213
|
fuzzyMatches.forEach(key => {
|
|
5163
5214
|
this.routeReuseStrategy.clearStoredRoute(key);
|
|
5215
|
+
this.routeReuseStrategy.doNotStore(key);
|
|
5164
5216
|
});
|
|
5165
5217
|
}
|
|
5166
5218
|
const remainingKeys = this.routeReuseStrategy.getAllStoredRouteKeys();
|
|
@@ -5417,8 +5469,8 @@ class CideLytSidedrawerWrapperComponent {
|
|
|
5417
5469
|
}
|
|
5418
5470
|
ngOnInit() {
|
|
5419
5471
|
// 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-
|
|
5421
|
-
this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-
|
|
5472
|
+
this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-Dz9RmJNj.mjs').then(m => m.CideLytSidedrawerNotesComponent);
|
|
5473
|
+
this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-DzKVXMjI.mjs').then(m => m.CideLytDrawerThemeComponent);
|
|
5422
5474
|
}
|
|
5423
5475
|
async loadComponent(configFor) {
|
|
5424
5476
|
console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
|
|
@@ -7110,7 +7162,7 @@ const layoutControlPannelChildRoutes = [{
|
|
|
7110
7162
|
},
|
|
7111
7163
|
{
|
|
7112
7164
|
path: "home",
|
|
7113
|
-
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-
|
|
7165
|
+
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-wkXPWz-K.mjs').then(c => c.CideLytHomeWrapperComponent),
|
|
7114
7166
|
canActivate: [authGuard],
|
|
7115
7167
|
data: {
|
|
7116
7168
|
sypg_page_code: "cide_lyt_home" // Used by RequestService to fetch tab properties
|
|
@@ -7118,7 +7170,7 @@ const layoutControlPannelChildRoutes = [{
|
|
|
7118
7170
|
},
|
|
7119
7171
|
{
|
|
7120
7172
|
path: "dashboard-manager",
|
|
7121
|
-
loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-
|
|
7173
|
+
loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-Nj16vAo6.mjs').then(c => c.DashboardManagerComponent),
|
|
7122
7174
|
canActivate: [authGuard],
|
|
7123
7175
|
data: {
|
|
7124
7176
|
sypg_page_code: "cide_lyt_dashboard_manager"
|
|
@@ -8942,4 +8994,4 @@ var floatingEntitySelection_component = /*#__PURE__*/Object.freeze({
|
|
|
8942
8994
|
*/
|
|
8943
8995
|
|
|
8944
8996
|
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-
|
|
8997
|
+
//# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-IWRXJZWw.mjs.map
|