cloud-ide-layout 1.0.17 → 1.0.18

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.
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Injectable, inject, signal, computed, effect, Component, ElementRef, HostListener, ViewContainerRef, ViewChild, ViewChildren, InjectionToken, PLATFORM_ID } from '@angular/core';
3
3
  import { HttpClient } from '@angular/common/http';
4
4
  import { cidePath, hostManagerRoutesUrl, coreRoutesUrl, designConfigRoutesUrl } from 'cloud-ide-lms-model';
5
- import { throwError, of, BehaviorSubject, interval, take as take$1 } from 'rxjs';
5
+ import { Observable, throwError, of, BehaviorSubject, interval, take as take$1 } from 'rxjs';
6
6
  import { map, filter, tap, catchError, shareReplay, take, distinctUntilChanged } from 'rxjs/operators';
7
7
  import * as i2 from '@angular/router';
8
8
  import { Router, NavigationEnd, RouteReuseStrategy, RouterModule } from '@angular/router';
@@ -54,7 +54,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
54
54
  class CideLytFileManagerService {
55
55
  http = inject(HttpClient);
56
56
  getFileDetails(body) {
57
- return this.http.post(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, coreRoutesUrl?.module, coreRoutesUrl?.getFileDetails]), body);
57
+ return this.http.post(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, coreRoutesUrl?.module, coreRoutesUrl?.fileManager]), body);
58
+ }
59
+ uploadFile(file, additionalData) {
60
+ // Convert file to base64
61
+ return new Observable(observer => {
62
+ const reader = new FileReader();
63
+ reader.onload = () => {
64
+ const base64String = reader.result;
65
+ const base64Data = base64String.split(',')[1]; // Remove data:image/jpeg;base64, prefix
66
+ const payload = {
67
+ cyfm_name: file.name,
68
+ cyfm_alt_text: additionalData?.altText || file.name,
69
+ cyfm_path: '', // Will be set by backend
70
+ cyfm_size_in_byte: file.size,
71
+ cyfm_type: file.type,
72
+ cyfm_creation_dt: new Date().toISOString(),
73
+ cyfm_id_user: additionalData?.userId || '',
74
+ cyfm_permissions: additionalData?.permissions || [],
75
+ cyfm_tags: additionalData?.tags || [],
76
+ cyfm_version: 1,
77
+ cyfm_file_status_sygmt: additionalData?.fileStatus || 'active',
78
+ cyfm_isactive: true,
79
+ fileData: base64Data, // Base64 file data
80
+ ...additionalData
81
+ };
82
+ this.http.post(cidePath.join([hostManagerRoutesUrl.cideSuiteHost, coreRoutesUrl?.module, 'upload']), payload)
83
+ .subscribe({
84
+ next: (response) => observer.next(response),
85
+ error: (error) => observer.error(error)
86
+ });
87
+ };
88
+ reader.onerror = () => observer.error('Failed to read file');
89
+ reader.readAsDataURL(file);
90
+ });
58
91
  }
59
92
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFileManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
60
93
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFileManagerService, providedIn: 'root' });
@@ -2494,8 +2527,8 @@ class CideLytSidedrawerWrapperComponent {
2494
2527
  }
2495
2528
  ngOnInit() {
2496
2529
  // Initialize the component map (You'd likely populate this from a config or service)
2497
- this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-CaepM61i.mjs').then(m => m.CideLytSidedrawerNotesComponent);
2498
- this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-C_brpWUe.mjs').then(m => m.CideLytDrawerThemeComponent);
2530
+ this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-CbAOqthZ.mjs').then(m => m.CideLytSidedrawerNotesComponent);
2531
+ this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-DMSGo6TQ.mjs').then(m => m.CideLytDrawerThemeComponent);
2499
2532
  }
2500
2533
  async loadComponent(configFor) {
2501
2534
  console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
@@ -2867,7 +2900,7 @@ const layoutControlPannelChildRoutes = [{
2867
2900
  },
2868
2901
  {
2869
2902
  path: "home",
2870
- loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-BnuVOFci.mjs').then(c => c.CideLytHomeWrapperComponent),
2903
+ loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-CBwmG9lX.mjs').then(c => c.CideLytHomeWrapperComponent),
2871
2904
  canActivate: [authGuard],
2872
2905
  data: {
2873
2906
  reuseTab: true, // For CustomRouteReuseStrategy
@@ -3132,5 +3165,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
3132
3165
  * Generated bundle index. Do not edit.
3133
3166
  */
3134
3167
 
3135
- export { AppStateHelperService as A, CideLytSharedWrapperComponent as C, ENVIRONMENT_CONFIG as E, CideLytSidebarService as a, CideLytRequestService as b, CideLytSidedrawerService as c, CideLytThemeService as d, CloudIdeLayoutService as e, CloudIdeLayoutComponent as f, CideLytSharedService as g, layoutControlPannelChildRoutes as h, CustomRouteReuseStrategy as i, AppStateService as j, CideLytUserStatusService as k, layoutRoutes as l, CacheManagerService as m, processThemeVariable as p, setCSSVariable as s, themeFactory as t };
3136
- //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-B_8a5pSc.mjs.map
3168
+ export { AppStateHelperService as A, CideLytSharedWrapperComponent as C, ENVIRONMENT_CONFIG as E, CideLytSidebarService as a, CideLytRequestService as b, CideLytSidedrawerService as c, CideLytThemeService as d, CloudIdeLayoutService as e, CloudIdeLayoutComponent as f, CideLytSharedService as g, layoutControlPannelChildRoutes as h, CustomRouteReuseStrategy as i, AppStateService as j, CideLytUserStatusService as k, layoutRoutes as l, CacheManagerService as m, CideLytFileManagerService as n, processThemeVariable as p, setCSSVariable as s, themeFactory as t };
3169
+ //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-DMcYKxZa.mjs.map