cloud-ide-layout 1.0.118 → 1.0.121

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 (18) hide show
  1. package/fesm2022/{cloud-ide-layout-cloud-ide-layout-DUv_E9sG.mjs → cloud-ide-layout-cloud-ide-layout-DUnpe3KX.mjs} +136 -9
  2. package/fesm2022/cloud-ide-layout-cloud-ide-layout-DUnpe3KX.mjs.map +1 -0
  3. package/fesm2022/{cloud-ide-layout-dashboard-manager.component-c-ZdOmN3.mjs → cloud-ide-layout-dashboard-manager.component-uoSX0eId.mjs} +2 -2
  4. package/fesm2022/{cloud-ide-layout-dashboard-manager.component-c-ZdOmN3.mjs.map → cloud-ide-layout-dashboard-manager.component-uoSX0eId.mjs.map} +1 -1
  5. package/fesm2022/{cloud-ide-layout-drawer-theme.component-BzHno5lQ.mjs → cloud-ide-layout-drawer-theme.component-Bk0gPznP.mjs} +2 -2
  6. package/fesm2022/{cloud-ide-layout-drawer-theme.component-BzHno5lQ.mjs.map → cloud-ide-layout-drawer-theme.component-Bk0gPznP.mjs.map} +1 -1
  7. package/fesm2022/{cloud-ide-layout-floating-entity-selection.component-mTvyE-l4.mjs → cloud-ide-layout-floating-entity-selection.component-aRv23Kgi.mjs} +2 -2
  8. package/fesm2022/{cloud-ide-layout-floating-entity-selection.component-mTvyE-l4.mjs.map → cloud-ide-layout-floating-entity-selection.component-aRv23Kgi.mjs.map} +1 -1
  9. package/fesm2022/cloud-ide-layout-home-wrapper.component-BlFRXWJb.mjs +272 -0
  10. package/fesm2022/cloud-ide-layout-home-wrapper.component-BlFRXWJb.mjs.map +1 -0
  11. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-wrww8-QA.mjs → cloud-ide-layout-sidedrawer-notes.component-gdoG3xVZ.mjs} +2 -2
  12. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-wrww8-QA.mjs.map → cloud-ide-layout-sidedrawer-notes.component-gdoG3xVZ.mjs.map} +1 -1
  13. package/fesm2022/cloud-ide-layout.mjs +1 -1
  14. package/index.d.ts +39 -1
  15. package/package.json +1 -1
  16. package/fesm2022/cloud-ide-layout-cloud-ide-layout-DUv_E9sG.mjs.map +0 -1
  17. package/fesm2022/cloud-ide-layout-home-wrapper.component-XOQWh4_1.mjs +0 -253
  18. package/fesm2022/cloud-ide-layout-home-wrapper.component-XOQWh4_1.mjs.map +0 -1
@@ -897,6 +897,21 @@ class CideLytSharedService {
897
897
  const cached = this.pageDataCacheSignal()[pageCode];
898
898
  return this.isCacheValid(cached) ? cached.response : null;
899
899
  }
900
+ /**
901
+ * Get page rights only (without loading full page config)
902
+ * This is a lightweight endpoint that only fetches rights
903
+ * @param pageCode - Page code to get rights for
904
+ * @returns Observable with rights data
905
+ */
906
+ getPageRights(pageCode) {
907
+ const url = cidePath.join([
908
+ hostManagerRoutesUrl.cideSuiteHost,
909
+ designConfigRoutesUrl?.module,
910
+ designConfigRoutesUrl?.getPageRights || 'page-rights',
911
+ pageCode
912
+ ]);
913
+ return this.http.get(url);
914
+ }
900
915
  /**
901
916
  * Check if loading for a specific page code
902
917
  */
@@ -1268,7 +1283,7 @@ class CideLytFloatingEntitySelectionService {
1268
1283
  }
1269
1284
  try {
1270
1285
  // Use relative import to avoid circular dependency
1271
- const module = await import('./cloud-ide-layout-floating-entity-selection.component-mTvyE-l4.mjs');
1286
+ const module = await import('./cloud-ide-layout-floating-entity-selection.component-aRv23Kgi.mjs');
1272
1287
  if (module.CideLytFloatingEntitySelectionComponent) {
1273
1288
  this.containerService.registerComponent('entity-selection-header', module.CideLytFloatingEntitySelectionComponent);
1274
1289
  console.log('✅ Entity selection component registered successfully');
@@ -4820,8 +4835,8 @@ class CideLytSidedrawerWrapperComponent {
4820
4835
  }
4821
4836
  ngOnInit() {
4822
4837
  // Initialize the component map (You'd likely populate this from a config or service)
4823
- this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-wrww8-QA.mjs').then(m => m.CideLytSidedrawerNotesComponent);
4824
- this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-BzHno5lQ.mjs').then(m => m.CideLytDrawerThemeComponent);
4838
+ this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-gdoG3xVZ.mjs').then(m => m.CideLytSidedrawerNotesComponent);
4839
+ this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-Bk0gPznP.mjs').then(m => m.CideLytDrawerThemeComponent);
4825
4840
  }
4826
4841
  async loadComponent(configFor) {
4827
4842
  console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
@@ -6232,12 +6247,40 @@ class RightsService {
6232
6247
  appState = inject(AppStateHelperService);
6233
6248
  // Current page code signal
6234
6249
  currentPageCode = signal('', ...(ngDevMode ? [{ debugName: "currentPageCode" }] : []));
6250
+ // Separate signal for rights-only data (when fetched via rights-only endpoint)
6251
+ rightsOnlyCache = signal({}, ...(ngDevMode ? [{ debugName: "rightsOnlyCache" }] : []));
6252
+ constructor() {
6253
+ // Auto-fetch rights when page code changes and rights are not loaded
6254
+ effect(() => {
6255
+ const pageCode = this.currentPageCode();
6256
+ if (pageCode) {
6257
+ const rightsLoaded = this.areRightsLoaded();
6258
+ const rightsOnlyLoaded = !!this.rightsOnlyCache()[pageCode];
6259
+ // Auto-fetch rights-only if not loaded
6260
+ if (!rightsLoaded && !rightsOnlyLoaded) {
6261
+ // Small delay to avoid race conditions and allow component to set up
6262
+ setTimeout(() => {
6263
+ // Double-check after delay to avoid duplicate requests
6264
+ if (!this.rightsOnlyCache()[pageCode] && !this.areRightsLoaded()) {
6265
+ this.loadRightsOnly(pageCode);
6266
+ }
6267
+ }, 100);
6268
+ }
6269
+ }
6270
+ });
6271
+ }
6235
6272
  // Computed signal that automatically updates when page data cache changes
6236
6273
  rightsComputed = computed(() => {
6237
6274
  const pageCode = this.currentPageCode();
6238
6275
  if (!pageCode) {
6239
6276
  return {};
6240
6277
  }
6278
+ // First check rights-only cache
6279
+ const rightsOnlyData = this.rightsOnlyCache()[pageCode];
6280
+ if (rightsOnlyData) {
6281
+ return rightsOnlyData;
6282
+ }
6283
+ // Fallback to full page config cache
6241
6284
  const cache = this.sharedService.pageDataCache();
6242
6285
  const cached = cache[pageCode];
6243
6286
  if (cached?.response?.data?.rights) {
@@ -6250,10 +6293,66 @@ class RightsService {
6250
6293
  /**
6251
6294
  * Initialize rights for a specific page
6252
6295
  * Call this in component ngOnInit with the page code
6296
+ * @param pageCode - Page code to initialize rights for
6297
+ * @param forceRefresh - If true, invalidates cache and forces refresh
6298
+ * @param fetchRightsOnly - If true, uses the lightweight rights-only endpoint instead of full page config.
6299
+ * If 'auto', automatically fetches rights-only if not already loaded.
6253
6300
  */
6254
- initializeRights(pageCode) {
6301
+ initializeRights(pageCode, forceRefresh = false, fetchRightsOnly = 'auto') {
6255
6302
  this.currentPageCode.set(pageCode);
6256
- console.log('🔐 RightsService initialized for page:', pageCode);
6303
+ if (forceRefresh) {
6304
+ // Invalidate cache to force fresh data from API
6305
+ this.sharedService.invalidateCache(pageCode);
6306
+ // Also clear rights-only cache
6307
+ const currentCache = this.rightsOnlyCache();
6308
+ const updatedCache = { ...currentCache };
6309
+ delete updatedCache[pageCode];
6310
+ this.rightsOnlyCache.set(updatedCache);
6311
+ console.log('🔄 RightsService: Cache invalidated, forcing refresh for page:', pageCode);
6312
+ }
6313
+ // Check if rights are already loaded
6314
+ const rightsLoaded = this.areRightsLoaded();
6315
+ const rightsOnlyLoaded = !!this.rightsOnlyCache()[pageCode];
6316
+ // Auto-fetch if rights are not loaded and fetchRightsOnly is 'auto' or true
6317
+ if (fetchRightsOnly === 'auto' && !rightsLoaded && !rightsOnlyLoaded) {
6318
+ // Automatically fetch rights-only if not loaded
6319
+ this.loadRightsOnly(pageCode);
6320
+ console.log('🔐 RightsService: Auto-fetching rights-only for page:', pageCode);
6321
+ }
6322
+ else if (fetchRightsOnly === true && (forceRefresh || !rightsOnlyLoaded)) {
6323
+ // Explicitly fetch rights-only
6324
+ this.loadRightsOnly(pageCode);
6325
+ console.log('🔐 RightsService: Fetching rights-only for page:', pageCode);
6326
+ }
6327
+ else if (rightsLoaded || rightsOnlyLoaded) {
6328
+ console.log('🔐 RightsService initialized for page:', pageCode, '(rights already loaded)');
6329
+ }
6330
+ else {
6331
+ console.log('🔐 RightsService initialized for page:', pageCode);
6332
+ }
6333
+ }
6334
+ /**
6335
+ * Load rights only using the lightweight endpoint
6336
+ * This is useful when you only need rights without full page config
6337
+ * @param pageCode - Page code to load rights for
6338
+ */
6339
+ loadRightsOnly(pageCode) {
6340
+ this.sharedService.getPageRights(pageCode).subscribe({
6341
+ next: (response) => {
6342
+ if (response.success && response.data) {
6343
+ // Update rights-only cache
6344
+ const currentCache = this.rightsOnlyCache();
6345
+ this.rightsOnlyCache.set({
6346
+ ...currentCache,
6347
+ [pageCode]: response.data.rights
6348
+ });
6349
+ console.log('🔐 RightsService: Rights fetched via rights-only endpoint for page:', pageCode, response.data.rights);
6350
+ }
6351
+ },
6352
+ error: (error) => {
6353
+ console.error('❌ RightsService: Error fetching rights:', error);
6354
+ }
6355
+ });
6257
6356
  }
6258
6357
  /**
6259
6358
  * Get current rights (reactive)
@@ -6326,6 +6425,12 @@ class RightsService {
6326
6425
  * Useful for checking rights of other pages
6327
6426
  */
6328
6427
  checkRightsForPage(pageCode) {
6428
+ // First check rights-only cache
6429
+ const rightsOnlyData = this.rightsOnlyCache()[pageCode];
6430
+ if (rightsOnlyData) {
6431
+ return rightsOnlyData;
6432
+ }
6433
+ // Fallback to full page config cache
6329
6434
  const cachedData = this.sharedService.getCachedPageData(pageCode);
6330
6435
  return cachedData?.data?.rights || {};
6331
6436
  }
@@ -6354,6 +6459,28 @@ class RightsService {
6354
6459
  getCurrentPageCode() {
6355
6460
  return this.currentPageCode();
6356
6461
  }
6462
+ /**
6463
+ * Force refresh rights by invalidating cache
6464
+ * Call this after rights are updated in the database
6465
+ * @param useRightsOnlyEndpoint - If true, uses the lightweight rights-only endpoint
6466
+ */
6467
+ refreshRights(useRightsOnlyEndpoint = false) {
6468
+ const pageCode = this.currentPageCode();
6469
+ if (pageCode) {
6470
+ // Clear rights-only cache
6471
+ const currentCache = this.rightsOnlyCache();
6472
+ const updatedCache = { ...currentCache };
6473
+ delete updatedCache[pageCode];
6474
+ this.rightsOnlyCache.set(updatedCache);
6475
+ // Invalidate full page config cache
6476
+ this.sharedService.invalidateCache(pageCode);
6477
+ // If using rights-only endpoint, fetch immediately
6478
+ if (useRightsOnlyEndpoint) {
6479
+ this.loadRightsOnly(pageCode);
6480
+ }
6481
+ console.log('🔄 RightsService: Cache invalidated for page:', pageCode);
6482
+ }
6483
+ }
6357
6484
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: RightsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6358
6485
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: RightsService, providedIn: 'root' });
6359
6486
  }
@@ -6362,7 +6489,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
6362
6489
  args: [{
6363
6490
  providedIn: 'root'
6364
6491
  }]
6365
- }] });
6492
+ }], ctorParameters: () => [] });
6366
6493
 
6367
6494
  const layoutRoutes = {
6368
6495
  path: "control-panel",
@@ -6376,7 +6503,7 @@ const layoutControlPannelChildRoutes = [{
6376
6503
  },
6377
6504
  {
6378
6505
  path: "home",
6379
- loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-XOQWh4_1.mjs').then(c => c.CideLytHomeWrapperComponent),
6506
+ loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-BlFRXWJb.mjs').then(c => c.CideLytHomeWrapperComponent),
6380
6507
  canActivate: [authGuard],
6381
6508
  data: {
6382
6509
  sypg_page_code: "cide_lyt_home" // Used by RequestService to fetch tab properties
@@ -6384,7 +6511,7 @@ const layoutControlPannelChildRoutes = [{
6384
6511
  },
6385
6512
  {
6386
6513
  path: "dashboard-manager",
6387
- loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-c-ZdOmN3.mjs').then(c => c.DashboardManagerComponent),
6514
+ loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-uoSX0eId.mjs').then(c => c.DashboardManagerComponent),
6388
6515
  canActivate: [authGuard],
6389
6516
  data: {
6390
6517
  sypg_page_code: "cide_lyt_dashboard_manager"
@@ -7951,4 +8078,4 @@ var floatingEntityRightsSharing_component = /*#__PURE__*/Object.freeze({
7951
8078
  */
7952
8079
 
7953
8080
  export { AppStateHelperService as A, CideLytSharedWrapperComponent as C, ENVIRONMENT_CONFIG as E, NotificationSettingsService as N, RightsService as R, CideLytSidebarService as a, CideLytRequestService as b, CideLytSidedrawerService as c, CideLytThemeService as d, AppStateService as e, CloudIdeLayoutService as f, CloudIdeLayoutComponent as g, CideLytSharedService as h, ComponentContextService as i, layoutControlPannelChildRoutes as j, CustomRouteReuseStrategy as k, layoutRoutes as l, CideLytUserStatusService as m, CacheManagerService as n, CideLytFileManagerService as o, processThemeVariable as p, CideLytFloatingEntityRightsSharingComponent as q, CideLytFloatingEntityRightsSharingService as r, setCSSVariable as s, themeFactory as t };
7954
- //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-DUv_E9sG.mjs.map
8081
+ //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-DUnpe3KX.mjs.map