cloud-ide-layout 1.0.212 → 1.0.216

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 (14) hide show
  1. package/fesm2022/{cloud-ide-layout-cloud-ide-layout-DLUn03lq.mjs → cloud-ide-layout-cloud-ide-layout-fLgpr_dY.mjs} +80 -12
  2. package/fesm2022/cloud-ide-layout-cloud-ide-layout-fLgpr_dY.mjs.map +1 -0
  3. package/fesm2022/{cloud-ide-layout-dashboard-manager.component-vczS3dAl.mjs → cloud-ide-layout-dashboard-manager.component-CVYP8nuM.mjs} +2 -2
  4. package/fesm2022/{cloud-ide-layout-dashboard-manager.component-vczS3dAl.mjs.map → cloud-ide-layout-dashboard-manager.component-CVYP8nuM.mjs.map} +1 -1
  5. package/fesm2022/{cloud-ide-layout-drawer-theme.component-CXq6X6hn.mjs → cloud-ide-layout-drawer-theme.component-B2lokDrC.mjs} +2 -2
  6. package/fesm2022/{cloud-ide-layout-drawer-theme.component-CXq6X6hn.mjs.map → cloud-ide-layout-drawer-theme.component-B2lokDrC.mjs.map} +1 -1
  7. package/fesm2022/{cloud-ide-layout-home-wrapper.component-DeBWYUJP.mjs → cloud-ide-layout-home-wrapper.component-CuyPLv7n.mjs} +2 -2
  8. package/fesm2022/{cloud-ide-layout-home-wrapper.component-DeBWYUJP.mjs.map → cloud-ide-layout-home-wrapper.component-CuyPLv7n.mjs.map} +1 -1
  9. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-D4O-fRSQ.mjs → cloud-ide-layout-sidedrawer-notes.component-CRz1cgo4.mjs} +2 -2
  10. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-D4O-fRSQ.mjs.map → cloud-ide-layout-sidedrawer-notes.component-CRz1cgo4.mjs.map} +1 -1
  11. package/fesm2022/cloud-ide-layout.mjs +1 -1
  12. package/index.d.ts +16 -0
  13. package/package.json +1 -1
  14. package/fesm2022/cloud-ide-layout-cloud-ide-layout-DLUn03lq.mjs.map +0 -1
@@ -288,6 +288,8 @@ class AppStateService {
288
288
  activeEntitySignal = signal(null, ...(ngDevMode ? [{ debugName: "activeEntitySignal" }] : []));
289
289
  // Private signal for active academic year
290
290
  activeAcademicYearSignal = signal(null, ...(ngDevMode ? [{ debugName: "activeAcademicYearSignal" }] : []));
291
+ // Private signal for student model
292
+ studentModelSignal = signal(null, ...(ngDevMode ? [{ debugName: "studentModelSignal" }] : []));
291
293
  // Track if entity change handler is initialized (to prevent triggering on initial load)
292
294
  entityChangeHandlerInitialized = false;
293
295
  // Callback registration for entity change handlers (to avoid circular dependencies)
@@ -300,6 +302,8 @@ class AppStateService {
300
302
  activeEntity = computed(() => this.activeEntitySignal(), ...(ngDevMode ? [{ debugName: "activeEntity" }] : []));
301
303
  // Public computed signal for active academic year
302
304
  activeAcademicYear = computed(() => this.activeAcademicYearSignal(), ...(ngDevMode ? [{ debugName: "activeAcademicYear" }] : []));
305
+ // Public computed signal for student model
306
+ studentModel = computed(() => this.studentModelSignal(), ...(ngDevMode ? [{ debugName: "studentModel" }] : []));
303
307
  // Computed signals for derived state
304
308
  isAuthenticated = computed(() => !!this.currentUserSignal(), ...(ngDevMode ? [{ debugName: "isAuthenticated" }] : []));
305
309
  userInfo = computed(() => {
@@ -338,11 +342,13 @@ class AppStateService {
338
342
  const activeModule = this.activeModuleSignal();
339
343
  const activeEntity = this.activeEntitySignal();
340
344
  const activeAcademicYear = this.activeAcademicYearSignal();
345
+ const studentModel = this.studentModelSignal();
341
346
  this.saveToLocalStorage({
342
347
  user: currentUser,
343
348
  activeModule: activeModule,
344
349
  activeEntity: activeEntity,
345
- activeAcademicYear: activeAcademicYear
350
+ activeAcademicYear: activeAcademicYear,
351
+ studentModel: studentModel
346
352
  });
347
353
  });
348
354
  // Automatically update file manager user ID whenever user changes
@@ -469,6 +475,18 @@ class AppStateService {
469
475
  getActiveAcademicYearValue() {
470
476
  return this.activeAcademicYearSignal();
471
477
  }
478
+ /**
479
+ * Set the student model
480
+ */
481
+ setStudentModel(model) {
482
+ this.studentModelSignal.set(model);
483
+ }
484
+ /**
485
+ * Get student model value (non-reactive)
486
+ */
487
+ getStudentModelValue() {
488
+ return this.studentModelSignal();
489
+ }
472
490
  /**
473
491
  * Register a callback to be called when entity changes
474
492
  * This allows other services to react to entity changes without creating circular dependencies
@@ -548,6 +566,14 @@ class AppStateService {
548
566
  localStorage.removeItem('cide_active_academic_year');
549
567
  }
550
568
  }
569
+ if (data.studentModel !== undefined) {
570
+ if (data.studentModel) {
571
+ localStorage.setItem('cide_student_model', JSON.stringify(data.studentModel));
572
+ }
573
+ else {
574
+ localStorage.removeItem('cide_student_model');
575
+ }
576
+ }
551
577
  }
552
578
  catch (error) {
553
579
  console.error('Error saving to localStorage:', error);
@@ -581,6 +607,11 @@ class AppStateService {
581
607
  const academicYear = JSON.parse(academicYearData);
582
608
  this.activeAcademicYearSignal.set(academicYear);
583
609
  }
610
+ const studentModelData = localStorage.getItem('cide_student_model');
611
+ if (studentModelData) {
612
+ const studentModel = JSON.parse(studentModelData);
613
+ this.studentModelSignal.set(studentModel);
614
+ }
584
615
  }
585
616
  catch (error) {
586
617
  console.error('Error loading from localStorage:', error);
@@ -590,6 +621,7 @@ class AppStateService {
590
621
  localStorage.removeItem('cide_active_module');
591
622
  localStorage.removeItem('cide_active_entity');
592
623
  localStorage.removeItem('cide_active_academic_year');
624
+ localStorage.removeItem('cide_student_model');
593
625
  }
594
626
  }
595
627
  }
@@ -645,6 +677,16 @@ class AppStateService {
645
677
  this.activeAcademicYearSignal.set(null);
646
678
  }
647
679
  }
680
+ // Handle student model changes
681
+ if (event.key === 'cide_student_model') {
682
+ if (event.newValue) {
683
+ const studentModel = JSON.parse(event.newValue);
684
+ this.studentModelSignal.set(studentModel);
685
+ }
686
+ else {
687
+ this.studentModelSignal.set(null);
688
+ }
689
+ }
648
690
  }
649
691
  catch (error) {
650
692
  console.error('Error parsing localStorage update:', error);
@@ -5469,8 +5511,8 @@ class CideLytSidedrawerWrapperComponent {
5469
5511
  }
5470
5512
  ngOnInit() {
5471
5513
  // Initialize the component map (You'd likely populate this from a config or service)
5472
- this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-D4O-fRSQ.mjs').then(m => m.CideLytSidedrawerNotesComponent);
5473
- this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-CXq6X6hn.mjs').then(m => m.CideLytDrawerThemeComponent);
5514
+ this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-CRz1cgo4.mjs').then(m => m.CideLytSidedrawerNotesComponent);
5515
+ this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-B2lokDrC.mjs').then(m => m.CideLytDrawerThemeComponent);
5474
5516
  }
5475
5517
  async loadComponent(configFor) {
5476
5518
  console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
@@ -6908,13 +6950,19 @@ class RightsService {
6908
6950
  currentPageCode = signal('', ...(ngDevMode ? [{ debugName: "currentPageCode" }] : []));
6909
6951
  // Separate signal for rights-only data (when fetched via rights-only endpoint)
6910
6952
  rightsOnlyCache = signal({}, ...(ngDevMode ? [{ debugName: "rightsOnlyCache" }] : []));
6953
+ // Loading state for rights per page code
6954
+ loadingRights = signal({}, ...(ngDevMode ? [{ debugName: "loadingRights" }] : []));
6911
6955
  constructor() {
6912
6956
  // Listen for entity changes and clear rights cache
6913
6957
  this.appStateService.registerEntityChangeHandler(() => {
6914
6958
  console.log('🔄 RightsService: Entity changed, clearing rights cache');
6915
6959
  this.rightsOnlyCache.set({});
6916
- // We also reset current page code to force effect to re-run if needed
6917
- // this.currentPageCode.set('');
6960
+ // Proactively trigger reload for current page if active
6961
+ const pageCode = this.currentPageCode();
6962
+ if (pageCode) {
6963
+ console.log('🔐 RightsService: Proactively reloading rights for active page:', pageCode);
6964
+ this.loadRightsOnly(pageCode);
6965
+ }
6918
6966
  });
6919
6967
  // Auto-fetch rights when page code changes and rights are not loaded
6920
6968
  effect(() => {
@@ -7003,6 +7051,8 @@ class RightsService {
7003
7051
  * @param pageCode - Page code to load rights for
7004
7052
  */
7005
7053
  loadRightsOnly(pageCode) {
7054
+ const loading = this.loadingRights();
7055
+ this.loadingRights.set({ ...loading, [pageCode]: true });
7006
7056
  this.sharedService.getPageRights(pageCode).subscribe({
7007
7057
  next: (response) => {
7008
7058
  if (response.success && response.data) {
@@ -7014,9 +7064,17 @@ class RightsService {
7014
7064
  });
7015
7065
  console.log('🔐 RightsService: Rights fetched via rights-only endpoint for page:', pageCode, response.data.rights);
7016
7066
  }
7067
+ const currentLoading = this.loadingRights();
7068
+ const updatedLoading = { ...currentLoading };
7069
+ delete updatedLoading[pageCode];
7070
+ this.loadingRights.set(updatedLoading);
7017
7071
  },
7018
7072
  error: (error) => {
7019
7073
  console.error('❌ RightsService: Error fetching rights:', error);
7074
+ const currentLoading = this.loadingRights();
7075
+ const updatedLoading = { ...currentLoading };
7076
+ delete updatedLoading[pageCode];
7077
+ this.loadingRights.set(updatedLoading);
7020
7078
  }
7021
7079
  });
7022
7080
  }
@@ -7115,9 +7173,19 @@ class RightsService {
7115
7173
  const pageCode = this.currentPageCode();
7116
7174
  if (!pageCode)
7117
7175
  return false;
7176
+ // Check rights-only cache first
7177
+ if (this.rightsOnlyCache()[pageCode])
7178
+ return true;
7118
7179
  const cache = this.sharedService.pageDataCache();
7119
7180
  const cached = cache[pageCode];
7120
- return !!cached?.response?.data;
7181
+ return !!cached?.response?.data?.rights;
7182
+ }
7183
+ /**
7184
+ * Check if rights are currently loading for the current page
7185
+ */
7186
+ isPageRightsLoading() {
7187
+ const pageCode = this.currentPageCode();
7188
+ return pageCode ? !!this.loadingRights()[pageCode] : false;
7121
7189
  }
7122
7190
  /**
7123
7191
  * Get current page code
@@ -7169,7 +7237,7 @@ const layoutControlPannelChildRoutes = [{
7169
7237
  },
7170
7238
  {
7171
7239
  path: "home",
7172
- loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-DeBWYUJP.mjs').then(c => c.CideLytHomeWrapperComponent),
7240
+ loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-CuyPLv7n.mjs').then(c => c.CideLytHomeWrapperComponent),
7173
7241
  canActivate: [authGuard],
7174
7242
  data: {
7175
7243
  sypg_page_code: "cide_lyt_home" // Used by RequestService to fetch tab properties
@@ -7177,7 +7245,7 @@ const layoutControlPannelChildRoutes = [{
7177
7245
  },
7178
7246
  {
7179
7247
  path: "dashboard-manager",
7180
- loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-vczS3dAl.mjs').then(c => c.DashboardManagerComponent),
7248
+ loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-CVYP8nuM.mjs').then(c => c.DashboardManagerComponent),
7181
7249
  canActivate: [authGuard],
7182
7250
  data: {
7183
7251
  sypg_page_code: "cide_lyt_dashboard_manager"
@@ -8921,7 +8989,7 @@ class CideLytFloatingEntitySelectionComponent {
8921
8989
  </div>
8922
8990
 
8923
8991
  <!-- Org Structure Component -->
8924
- <div class="tw-flex-1 tw-overflow-hidden" [class.tw-opacity-50]="isSwitchingEntity()" [class.tw-pointer-events-none]="isSwitchingEntity()">
8992
+ <div class="tw-flex-1 tw-overflow-auto" [class.tw-opacity-50]="isSwitchingEntity()" [class.tw-pointer-events-none]="isSwitchingEntity()">
8925
8993
  <cide-shared-org-structure
8926
8994
  [allowSwitching]="allowSwitching()"
8927
8995
  [showActions]="showActions()"
@@ -8970,7 +9038,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
8970
9038
  </div>
8971
9039
 
8972
9040
  <!-- Org Structure Component -->
8973
- <div class="tw-flex-1 tw-overflow-hidden" [class.tw-opacity-50]="isSwitchingEntity()" [class.tw-pointer-events-none]="isSwitchingEntity()">
9041
+ <div class="tw-flex-1 tw-overflow-auto" [class.tw-opacity-50]="isSwitchingEntity()" [class.tw-pointer-events-none]="isSwitchingEntity()">
8974
9042
  <cide-shared-org-structure
8975
9043
  [allowSwitching]="allowSwitching()"
8976
9044
  [showActions]="showActions()"
@@ -8994,11 +9062,11 @@ var floatingEntitySelection_component = /*#__PURE__*/Object.freeze({
8994
9062
  */
8995
9063
  // Floating Container (moved to cloud-ide-element)
8996
9064
  // export * from './lib/components/floating-container';
8997
- // Layout Components
9065
+ // Layout Componentsexport * from './lib/services/indexed-db.service';
8998
9066
 
8999
9067
  /**
9000
9068
  * Generated bundle index. Do not edit.
9001
9069
  */
9002
9070
 
9003
9071
  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, CideLytRequestService as j, AppStateService 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, CideLytFloatingEntitySelectionComponent as u, CideLytFloatingEntitySelectionService as v };
9004
- //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-DLUn03lq.mjs.map
9072
+ //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-fLgpr_dY.mjs.map