cloud-ide-layout 1.0.213 → 1.0.217
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-DLUn03lq.mjs → cloud-ide-layout-cloud-ide-layout-CiHfhtlY.mjs} +86 -12
- package/fesm2022/cloud-ide-layout-cloud-ide-layout-CiHfhtlY.mjs.map +1 -0
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-vczS3dAl.mjs → cloud-ide-layout-dashboard-manager.component-FIj6BGFA.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-dashboard-manager.component-vczS3dAl.mjs.map → cloud-ide-layout-dashboard-manager.component-FIj6BGFA.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-CXq6X6hn.mjs → cloud-ide-layout-drawer-theme.component-ctgJ_ijQ.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-CXq6X6hn.mjs.map → cloud-ide-layout-drawer-theme.component-ctgJ_ijQ.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-DeBWYUJP.mjs → cloud-ide-layout-home-wrapper.component-B0c2PATc.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-DeBWYUJP.mjs.map → cloud-ide-layout-home-wrapper.component-B0c2PATc.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-D4O-fRSQ.mjs → cloud-ide-layout-sidedrawer-notes.component-DHXNvtpU.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-D4O-fRSQ.mjs.map → cloud-ide-layout-sidedrawer-notes.component-DHXNvtpU.mjs.map} +1 -1
- package/fesm2022/cloud-ide-layout.mjs +1 -1
- package/index.d.ts +20 -0
- package/package.json +1 -1
- 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);
|
|
@@ -886,6 +928,12 @@ class AppStateHelperService {
|
|
|
886
928
|
const academicYear = this.getActiveAcademicYear();
|
|
887
929
|
return academicYear?._id || null;
|
|
888
930
|
}
|
|
931
|
+
/**
|
|
932
|
+
* Set the student model
|
|
933
|
+
*/
|
|
934
|
+
setStudentModel(model) {
|
|
935
|
+
this.appStateService.setStudentModel(model);
|
|
936
|
+
}
|
|
889
937
|
/**
|
|
890
938
|
* Manually refresh state from localStorage
|
|
891
939
|
*/
|
|
@@ -5469,8 +5517,8 @@ class CideLytSidedrawerWrapperComponent {
|
|
|
5469
5517
|
}
|
|
5470
5518
|
ngOnInit() {
|
|
5471
5519
|
// 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-
|
|
5473
|
-
this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-
|
|
5520
|
+
this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-DHXNvtpU.mjs').then(m => m.CideLytSidedrawerNotesComponent);
|
|
5521
|
+
this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-ctgJ_ijQ.mjs').then(m => m.CideLytDrawerThemeComponent);
|
|
5474
5522
|
}
|
|
5475
5523
|
async loadComponent(configFor) {
|
|
5476
5524
|
console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
|
|
@@ -6908,13 +6956,19 @@ class RightsService {
|
|
|
6908
6956
|
currentPageCode = signal('', ...(ngDevMode ? [{ debugName: "currentPageCode" }] : []));
|
|
6909
6957
|
// Separate signal for rights-only data (when fetched via rights-only endpoint)
|
|
6910
6958
|
rightsOnlyCache = signal({}, ...(ngDevMode ? [{ debugName: "rightsOnlyCache" }] : []));
|
|
6959
|
+
// Loading state for rights per page code
|
|
6960
|
+
loadingRights = signal({}, ...(ngDevMode ? [{ debugName: "loadingRights" }] : []));
|
|
6911
6961
|
constructor() {
|
|
6912
6962
|
// Listen for entity changes and clear rights cache
|
|
6913
6963
|
this.appStateService.registerEntityChangeHandler(() => {
|
|
6914
6964
|
console.log('🔄 RightsService: Entity changed, clearing rights cache');
|
|
6915
6965
|
this.rightsOnlyCache.set({});
|
|
6916
|
-
//
|
|
6917
|
-
|
|
6966
|
+
// Proactively trigger reload for current page if active
|
|
6967
|
+
const pageCode = this.currentPageCode();
|
|
6968
|
+
if (pageCode) {
|
|
6969
|
+
console.log('🔐 RightsService: Proactively reloading rights for active page:', pageCode);
|
|
6970
|
+
this.loadRightsOnly(pageCode);
|
|
6971
|
+
}
|
|
6918
6972
|
});
|
|
6919
6973
|
// Auto-fetch rights when page code changes and rights are not loaded
|
|
6920
6974
|
effect(() => {
|
|
@@ -7003,6 +7057,8 @@ class RightsService {
|
|
|
7003
7057
|
* @param pageCode - Page code to load rights for
|
|
7004
7058
|
*/
|
|
7005
7059
|
loadRightsOnly(pageCode) {
|
|
7060
|
+
const loading = this.loadingRights();
|
|
7061
|
+
this.loadingRights.set({ ...loading, [pageCode]: true });
|
|
7006
7062
|
this.sharedService.getPageRights(pageCode).subscribe({
|
|
7007
7063
|
next: (response) => {
|
|
7008
7064
|
if (response.success && response.data) {
|
|
@@ -7014,9 +7070,17 @@ class RightsService {
|
|
|
7014
7070
|
});
|
|
7015
7071
|
console.log('🔐 RightsService: Rights fetched via rights-only endpoint for page:', pageCode, response.data.rights);
|
|
7016
7072
|
}
|
|
7073
|
+
const currentLoading = this.loadingRights();
|
|
7074
|
+
const updatedLoading = { ...currentLoading };
|
|
7075
|
+
delete updatedLoading[pageCode];
|
|
7076
|
+
this.loadingRights.set(updatedLoading);
|
|
7017
7077
|
},
|
|
7018
7078
|
error: (error) => {
|
|
7019
7079
|
console.error('❌ RightsService: Error fetching rights:', error);
|
|
7080
|
+
const currentLoading = this.loadingRights();
|
|
7081
|
+
const updatedLoading = { ...currentLoading };
|
|
7082
|
+
delete updatedLoading[pageCode];
|
|
7083
|
+
this.loadingRights.set(updatedLoading);
|
|
7020
7084
|
}
|
|
7021
7085
|
});
|
|
7022
7086
|
}
|
|
@@ -7115,9 +7179,19 @@ class RightsService {
|
|
|
7115
7179
|
const pageCode = this.currentPageCode();
|
|
7116
7180
|
if (!pageCode)
|
|
7117
7181
|
return false;
|
|
7182
|
+
// Check rights-only cache first
|
|
7183
|
+
if (this.rightsOnlyCache()[pageCode])
|
|
7184
|
+
return true;
|
|
7118
7185
|
const cache = this.sharedService.pageDataCache();
|
|
7119
7186
|
const cached = cache[pageCode];
|
|
7120
|
-
return !!cached?.response?.data;
|
|
7187
|
+
return !!cached?.response?.data?.rights;
|
|
7188
|
+
}
|
|
7189
|
+
/**
|
|
7190
|
+
* Check if rights are currently loading for the current page
|
|
7191
|
+
*/
|
|
7192
|
+
isPageRightsLoading() {
|
|
7193
|
+
const pageCode = this.currentPageCode();
|
|
7194
|
+
return pageCode ? !!this.loadingRights()[pageCode] : false;
|
|
7121
7195
|
}
|
|
7122
7196
|
/**
|
|
7123
7197
|
* Get current page code
|
|
@@ -7169,7 +7243,7 @@ const layoutControlPannelChildRoutes = [{
|
|
|
7169
7243
|
},
|
|
7170
7244
|
{
|
|
7171
7245
|
path: "home",
|
|
7172
|
-
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-
|
|
7246
|
+
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-B0c2PATc.mjs').then(c => c.CideLytHomeWrapperComponent),
|
|
7173
7247
|
canActivate: [authGuard],
|
|
7174
7248
|
data: {
|
|
7175
7249
|
sypg_page_code: "cide_lyt_home" // Used by RequestService to fetch tab properties
|
|
@@ -7177,7 +7251,7 @@ const layoutControlPannelChildRoutes = [{
|
|
|
7177
7251
|
},
|
|
7178
7252
|
{
|
|
7179
7253
|
path: "dashboard-manager",
|
|
7180
|
-
loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-
|
|
7254
|
+
loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-FIj6BGFA.mjs').then(c => c.DashboardManagerComponent),
|
|
7181
7255
|
canActivate: [authGuard],
|
|
7182
7256
|
data: {
|
|
7183
7257
|
sypg_page_code: "cide_lyt_dashboard_manager"
|
|
@@ -8921,7 +8995,7 @@ class CideLytFloatingEntitySelectionComponent {
|
|
|
8921
8995
|
</div>
|
|
8922
8996
|
|
|
8923
8997
|
<!-- Org Structure Component -->
|
|
8924
|
-
<div class="tw-flex-1 tw-overflow-
|
|
8998
|
+
<div class="tw-flex-1 tw-overflow-auto" [class.tw-opacity-50]="isSwitchingEntity()" [class.tw-pointer-events-none]="isSwitchingEntity()">
|
|
8925
8999
|
<cide-shared-org-structure
|
|
8926
9000
|
[allowSwitching]="allowSwitching()"
|
|
8927
9001
|
[showActions]="showActions()"
|
|
@@ -8970,7 +9044,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
8970
9044
|
</div>
|
|
8971
9045
|
|
|
8972
9046
|
<!-- Org Structure Component -->
|
|
8973
|
-
<div class="tw-flex-1 tw-overflow-
|
|
9047
|
+
<div class="tw-flex-1 tw-overflow-auto" [class.tw-opacity-50]="isSwitchingEntity()" [class.tw-pointer-events-none]="isSwitchingEntity()">
|
|
8974
9048
|
<cide-shared-org-structure
|
|
8975
9049
|
[allowSwitching]="allowSwitching()"
|
|
8976
9050
|
[showActions]="showActions()"
|
|
@@ -8994,11 +9068,11 @@ var floatingEntitySelection_component = /*#__PURE__*/Object.freeze({
|
|
|
8994
9068
|
*/
|
|
8995
9069
|
// Floating Container (moved to cloud-ide-element)
|
|
8996
9070
|
// export * from './lib/components/floating-container';
|
|
8997
|
-
// Layout
|
|
9071
|
+
// Layout Componentsexport * from './lib/services/indexed-db.service';
|
|
8998
9072
|
|
|
8999
9073
|
/**
|
|
9000
9074
|
* Generated bundle index. Do not edit.
|
|
9001
9075
|
*/
|
|
9002
9076
|
|
|
9003
9077
|
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-
|
|
9078
|
+
//# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-CiHfhtlY.mjs.map
|