cloud-ide-layout 1.0.24 → 1.0.25

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, signal, computed, effect, Component, ElementRef, HostListener, ViewContainerRef, ViewChild, ViewChildren, InjectionToken, PLATFORM_ID, DestroyRef, Input, Directive } from '@angular/core';
2
+ import { Injectable, inject, signal, computed, effect, Component, ElementRef, HostListener, ViewContainerRef, ViewChild, ViewChildren, InjectionToken, PLATFORM_ID, EventEmitter, Output, Input } from '@angular/core';
3
3
  import { HttpClient } from '@angular/common/http';
4
4
  import { cidePath, hostManagerRoutesUrl, coreRoutesUrl, commonRoutesUrl, designConfigRoutesUrl } from 'cloud-ide-lms-model';
5
5
  import { Observable, throwError, of, BehaviorSubject, interval, take as take$1 } from 'rxjs';
@@ -7,13 +7,14 @@ import { map, filter, tap, catchError, shareReplay, take, distinctUntilChanged }
7
7
  import * as i2 from '@angular/router';
8
8
  import { Router, NavigationEnd, RouteReuseStrategy, RouterModule } from '@angular/router';
9
9
  import { Title } from '@angular/platform-browser';
10
- import { CideEleFileManagerService, CideElementsService, CideInputComponent, CideIconComponent, CideEleDropdownComponent, CideEleResizerDirective, TooltipDirective, CideSpinnerComponent, CideEleSkeletonLoaderComponent } from 'cloud-ide-element';
10
+ import { CideEleFileManagerService, CideElementsService, CideInputComponent, CideIconComponent, CideEleDropdownComponent, CideEleResizerDirective, TooltipDirective, CideSpinnerComponent, CideEleSkeletonLoaderComponent, CideEleFloatingContainerManagerComponent, CideEleGlobalNotificationsComponent, CideEleButtonComponent, CideEleFloatingContainerService } from 'cloud-ide-element';
11
11
  import * as i1 from '@angular/common';
12
12
  import { CommonModule, NgClass, NgFor, NgIf, isPlatformBrowser } from '@angular/common';
13
13
  import { CloudIdeAuthService, authGuard } from 'cloud-ide-auth';
14
14
  import { trigger, state, transition, style, animate } from '@angular/animations';
15
15
  import { merge } from 'lodash';
16
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
16
+ import * as i2$1 from '@angular/forms';
17
+ import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
17
18
 
18
19
  class CloudIdeLayoutService {
19
20
  constructor() { }
@@ -2652,8 +2653,8 @@ class CideLytSidedrawerWrapperComponent {
2652
2653
  }
2653
2654
  ngOnInit() {
2654
2655
  // Initialize the component map (You'd likely populate this from a config or service)
2655
- this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-GT7A-85i.mjs').then(m => m.CideLytSidedrawerNotesComponent);
2656
- this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-B4u9LnTe.mjs').then(m => m.CideLytDrawerThemeComponent);
2656
+ this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-OKwCnhEf.mjs').then(m => m.CideLytSidedrawerNotesComponent);
2657
+ this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-gmPE1a4W.mjs').then(m => m.CideLytDrawerThemeComponent);
2657
2658
  }
2658
2659
  async loadComponent(configFor) {
2659
2660
  console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
@@ -2997,15 +2998,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
2997
2998
 
2998
2999
  class CloudIdeLayoutComponent {
2999
3000
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CloudIdeLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3000
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CloudIdeLayoutComponent, isStandalone: true, selector: "cide-lyt-wrapper", ngImport: i0, template: `
3001
- <cide-lyt-layout-wrapper></cide-lyt-layout-wrapper>
3002
- `, isInline: true, styles: [""], dependencies: [{ kind: "component", type: CideLytLayoutWrapperComponent, selector: "cide-lyt-layout-wrapper" }] });
3001
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CloudIdeLayoutComponent, isStandalone: true, selector: "cide-lyt-wrapper", ngImport: i0, template: `
3002
+ <cide-lyt-layout-wrapper></cide-lyt-layout-wrapper>
3003
+
3004
+ <!-- Floating Container Manager -->
3005
+ <cide-ele-floating-container-manager></cide-ele-floating-container-manager>
3006
+
3007
+ <!-- Global Notifications and Confirmation Dialogs -->
3008
+ <cide-ele-global-notifications></cide-ele-global-notifications>
3009
+ `, isInline: true, styles: [""], dependencies: [{ kind: "component", type: CideLytLayoutWrapperComponent, selector: "cide-lyt-layout-wrapper" }, { kind: "component", type: CideEleFloatingContainerManagerComponent, selector: "cide-ele-floating-container-manager" }, { kind: "component", type: CideEleGlobalNotificationsComponent, selector: "cide-ele-global-notifications" }] });
3003
3010
  }
3004
3011
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CloudIdeLayoutComponent, decorators: [{
3005
3012
  type: Component,
3006
- args: [{ selector: 'cide-lyt-wrapper', standalone: true, template: `
3007
- <cide-lyt-layout-wrapper></cide-lyt-layout-wrapper>
3008
- `, imports: [CideLytLayoutWrapperComponent] }]
3013
+ args: [{ selector: 'cide-lyt-wrapper', standalone: true, template: `
3014
+ <cide-lyt-layout-wrapper></cide-lyt-layout-wrapper>
3015
+
3016
+ <!-- Floating Container Manager -->
3017
+ <cide-ele-floating-container-manager></cide-ele-floating-container-manager>
3018
+
3019
+ <!-- Global Notifications and Confirmation Dialogs -->
3020
+ <cide-ele-global-notifications></cide-ele-global-notifications>
3021
+ `, imports: [
3022
+ CideLytLayoutWrapperComponent,
3023
+ CideEleFloatingContainerManagerComponent,
3024
+ CideEleGlobalNotificationsComponent
3025
+ ] }]
3009
3026
  }] });
3010
3027
 
3011
3028
  var cloudIdeLayout_component = /*#__PURE__*/Object.freeze({
@@ -3025,7 +3042,7 @@ const layoutControlPannelChildRoutes = [{
3025
3042
  },
3026
3043
  {
3027
3044
  path: "home",
3028
- loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-DEec7PZk.mjs').then(c => c.CideLytHomeWrapperComponent),
3045
+ loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-iPkvBOgE.mjs').then(c => c.CideLytHomeWrapperComponent),
3029
3046
  canActivate: [authGuard],
3030
3047
  data: {
3031
3048
  reuseTab: true, // For CustomRouteReuseStrategy
@@ -3282,557 +3299,508 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
3282
3299
  }]
3283
3300
  }] });
3284
3301
 
3285
- class CideLytFloatingUploadService {
3286
- destroyRef = inject(DestroyRef);
3287
- // Private signals for state management
3288
- _uploadQueue = signal([], ...(ngDevMode ? [{ debugName: "_uploadQueue" }] : []));
3289
- _isUploading = signal(false, ...(ngDevMode ? [{ debugName: "_isUploading" }] : []));
3290
- _uploadProgress = signal(0, ...(ngDevMode ? [{ debugName: "_uploadProgress" }] : []));
3291
- _isVisible = signal(false, ...(ngDevMode ? [{ debugName: "_isVisible" }] : []));
3292
- _currentUserId = signal('', ...(ngDevMode ? [{ debugName: "_currentUserId" }] : []));
3293
- // Public readonly signals
3294
- uploadQueue = this._uploadQueue.asReadonly();
3295
- isUploading = this._isUploading.asReadonly();
3296
- uploadProgress = this._uploadProgress.asReadonly();
3297
- isVisible = this._isVisible.asReadonly();
3298
- currentUserId = this._currentUserId.asReadonly();
3299
- // Computed values
3300
- hasUploads = computed(() => this._uploadQueue().length > 0, ...(ngDevMode ? [{ debugName: "hasUploads" }] : []));
3301
- pendingUploads = computed(() => this._uploadQueue().filter(upload => upload.status === 'pending'), ...(ngDevMode ? [{ debugName: "pendingUploads" }] : []));
3302
- activeUploads = computed(() => this._uploadQueue().filter(upload => upload.status === 'uploading'), ...(ngDevMode ? [{ debugName: "activeUploads" }] : []));
3303
- completedUploads = computed(() => this._uploadQueue().filter(upload => upload.status === 'completed'), ...(ngDevMode ? [{ debugName: "completedUploads" }] : []));
3304
- failedUploads = computed(() => this._uploadQueue().filter(upload => upload.status === 'error'), ...(ngDevMode ? [{ debugName: "failedUploads" }] : []));
3305
- // BehaviorSubjects for external subscriptions
3306
- uploadQueueSubject = new BehaviorSubject([]);
3307
- isUploadingSubject = new BehaviorSubject(false);
3308
- uploadProgressSubject = new BehaviorSubject(0);
3309
- isVisibleSubject = new BehaviorSubject(false);
3310
- currentUserIdSubject = new BehaviorSubject('');
3311
- // Public observables
3312
- uploadQueue$ = this.uploadQueueSubject.asObservable();
3313
- isUploading$ = this.isUploadingSubject.asObservable();
3314
- uploadProgress$ = this.uploadProgressSubject.asObservable();
3315
- isVisible$ = this.isVisibleSubject.asObservable();
3316
- currentUserId$ = this.currentUserIdSubject.asObservable();
3317
- constructor() {
3318
- console.log('🚀 [FloatingUploadService] Service initialized');
3319
- }
3320
- /**
3321
- * Set the current user ID
3322
- */
3323
- setCurrentUserId(userId) {
3324
- console.log('👤 [FloatingUploadService] Setting user ID:', userId);
3325
- this._currentUserId.set(userId);
3326
- this.currentUserIdSubject.next(userId);
3327
- }
3328
- /**
3329
- * Add files to upload queue
3330
- */
3331
- addFilesToQueue(files) {
3332
- console.log('📁 [FloatingUploadService] Adding files to queue:', files.length);
3333
- const newUploads = files.map(file => ({
3334
- fileId: this.generateFileId(),
3335
- fileName: file.name,
3336
- progress: 0,
3337
- status: 'pending'
3338
- }));
3339
- const currentQueue = this._uploadQueue();
3340
- const updatedQueue = [...currentQueue, ...newUploads];
3341
- this._uploadQueue.set(updatedQueue);
3342
- this.uploadQueueSubject.next(updatedQueue);
3343
- this.updateVisibility();
3344
- }
3345
- /**
3346
- * Update upload status
3347
- */
3348
- updateUploadStatus(fileId, status, progress, error, uploadedFile) {
3349
- console.log('🔄 [FloatingUploadService] Updating upload status:', fileId, status, progress);
3350
- const currentQueue = this._uploadQueue();
3351
- const updatedQueue = currentQueue.map(upload => upload.fileId === fileId
3352
- ? { ...upload, status, progress, error, uploadedFile }
3353
- : upload);
3354
- this._uploadQueue.set(updatedQueue);
3355
- this.uploadQueueSubject.next(updatedQueue);
3356
- this.updateUploadingState();
3357
- this.updateVisibility();
3358
- }
3359
- /**
3360
- * Cancel upload
3361
- */
3362
- cancelUpload(fileId) {
3363
- console.log('🚫 [FloatingUploadService] Cancelling upload:', fileId);
3364
- this.updateUploadStatus(fileId, 'cancelled', 0);
3365
- }
3366
- /**
3367
- * Remove upload from queue
3368
- */
3369
- removeUpload(fileId) {
3370
- console.log('🗑️ [FloatingUploadService] Removing upload:', fileId);
3371
- const currentQueue = this._uploadQueue();
3372
- const updatedQueue = currentQueue.filter(upload => upload.fileId !== fileId);
3373
- this._uploadQueue.set(updatedQueue);
3374
- this.uploadQueueSubject.next(updatedQueue);
3375
- this.updateUploadingState();
3376
- this.updateVisibility();
3377
- }
3378
- /**
3379
- * Clear all uploads
3380
- */
3381
- clearAllUploads() {
3382
- console.log('🧹 [FloatingUploadService] Clearing all uploads');
3383
- this._uploadQueue.set([]);
3384
- this.uploadQueueSubject.next([]);
3385
- this._isUploading.set(false);
3386
- this.isUploadingSubject.next(false);
3387
- this._uploadProgress.set(0);
3388
- this.uploadProgressSubject.next(0);
3389
- this._isVisible.set(false);
3390
- this.isVisibleSubject.next(false);
3391
- }
3392
- /**
3393
- * Clear completed uploads
3394
- */
3395
- clearCompletedUploads() {
3396
- console.log('✅ [FloatingUploadService] Clearing completed uploads');
3397
- const currentQueue = this._uploadQueue();
3398
- const updatedQueue = currentQueue.filter(upload => upload.status !== 'completed');
3399
- this._uploadQueue.set(updatedQueue);
3400
- this.uploadQueueSubject.next(updatedQueue);
3401
- this.updateUploadingState();
3402
- this.updateVisibility();
3403
- }
3404
- /**
3405
- * Handle all uploads complete
3406
- */
3407
- handleAllUploadsComplete(event) {
3408
- console.log('🎉 [FloatingUploadService] All uploads complete:', event);
3409
- // Update all pending/uploading files to completed
3410
- const currentQueue = this._uploadQueue();
3411
- const updatedQueue = currentQueue.map(upload => {
3412
- if (upload.status === 'pending' || upload.status === 'uploading') {
3413
- return { ...upload, status: 'completed', progress: 100 };
3414
- }
3415
- return upload;
3302
+ class CideLytFloatingEntityRightsSharingComponent {
3303
+ data;
3304
+ close = new EventEmitter();
3305
+ save = new EventEmitter();
3306
+ fb = inject(FormBuilder);
3307
+ // State signals
3308
+ entities = signal([], ...(ngDevMode ? [{ debugName: "entities" }] : []));
3309
+ selectedEntityId = signal('', ...(ngDevMode ? [{ debugName: "selectedEntityId" }] : []));
3310
+ entitiesLoading = signal(false, ...(ngDevMode ? [{ debugName: "entitiesLoading" }] : []));
3311
+ accessPassLoading = signal(false, ...(ngDevMode ? [{ debugName: "accessPassLoading" }] : []));
3312
+ saving = signal(false, ...(ngDevMode ? [{ debugName: "saving" }] : []));
3313
+ // Form
3314
+ rightsForm;
3315
+ ngOnInit() {
3316
+ this.initializeForm();
3317
+ this.loadEntities();
3318
+ }
3319
+ initializeForm() {
3320
+ this.rightsForm = this.fb.group({
3321
+ can_view: [false],
3322
+ can_edit: [false],
3323
+ is_owner: [false],
3324
+ syepm_isactive: [true]
3416
3325
  });
3417
- this._uploadQueue.set(updatedQueue);
3418
- this.uploadQueueSubject.next(updatedQueue);
3419
- this.updateUploadingState();
3420
3326
  }
3421
- /**
3422
- * Show the floating uploader
3423
- */
3424
- show() {
3425
- console.log('👁️ [FloatingUploadService] Showing floating uploader');
3426
- this._isVisible.set(true);
3427
- this.isVisibleSubject.next(true);
3428
- }
3429
- /**
3430
- * Hide the floating uploader
3431
- */
3432
- hide() {
3433
- console.log('🙈 [FloatingUploadService] Hiding floating uploader');
3434
- this._isVisible.set(false);
3435
- this.isVisibleSubject.next(false);
3436
- }
3437
- /**
3438
- * Update uploading state based on queue
3439
- */
3440
- updateUploadingState() {
3441
- const activeUploads = this.activeUploads();
3442
- const isUploading = activeUploads.length > 0;
3443
- this._isUploading.set(isUploading);
3444
- this.isUploadingSubject.next(isUploading);
3445
- if (isUploading) {
3446
- const totalProgress = activeUploads.reduce((sum, upload) => sum + upload.progress, 0);
3447
- const averageProgress = Math.round(totalProgress / activeUploads.length);
3448
- this._uploadProgress.set(averageProgress);
3449
- this.uploadProgressSubject.next(averageProgress);
3450
- }
3451
- else {
3452
- this._uploadProgress.set(0);
3453
- this.uploadProgressSubject.next(0);
3327
+ async loadEntities() {
3328
+ this.entitiesLoading.set(true);
3329
+ try {
3330
+ // Mock data for now
3331
+ const mockEntities = [
3332
+ {
3333
+ _id: 'owner-entity',
3334
+ syen_name: 'Owner Entity',
3335
+ syen_entity_code: 'E001',
3336
+ syen_isactive: true
3337
+ },
3338
+ {
3339
+ _id: 'entity-1',
3340
+ syen_name: 'Entity 1',
3341
+ syen_entity_code: 'E002',
3342
+ syen_isactive: true
3343
+ },
3344
+ {
3345
+ _id: 'entity-2',
3346
+ syen_name: 'Entity 2',
3347
+ syen_entity_code: 'E003',
3348
+ syen_isactive: true
3349
+ }
3350
+ ];
3351
+ this.entities.set(mockEntities);
3454
3352
  }
3455
- }
3456
- /**
3457
- * Update visibility based on upload state
3458
- */
3459
- updateVisibility() {
3460
- const hasActiveUploads = this.activeUploads().length > 0;
3461
- const hasPendingUploads = this.pendingUploads().length > 0;
3462
- const hasCompletedUploads = this.completedUploads().length > 0;
3463
- const hasFailedUploads = this.failedUploads().length > 0;
3464
- // Show if there are active, pending, or recent completed/failed uploads
3465
- const shouldShow = hasActiveUploads || hasPendingUploads || hasCompletedUploads || hasFailedUploads;
3466
- if (shouldShow && !this._isVisible()) {
3467
- this.show();
3353
+ catch (error) {
3354
+ console.error('Error loading entities:', error);
3468
3355
  }
3469
- else if (!shouldShow && this._isVisible()) {
3470
- this.hide();
3356
+ finally {
3357
+ this.entitiesLoading.set(false);
3471
3358
  }
3472
3359
  }
3473
- /**
3474
- * Generate unique file ID
3475
- */
3476
- generateFileId() {
3477
- return `upload_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
3478
- }
3479
- /**
3480
- * Get upload by ID
3481
- */
3482
- getUploadById(fileId) {
3483
- return this._uploadQueue().find(upload => upload.fileId === fileId);
3484
- }
3485
- /**
3486
- * Get upload statistics
3487
- */
3488
- getUploadStats() {
3489
- const queue = this._uploadQueue();
3490
- return {
3491
- total: queue.length,
3492
- pending: queue.filter(u => u.status === 'pending').length,
3493
- uploading: queue.filter(u => u.status === 'uploading').length,
3494
- completed: queue.filter(u => u.status === 'completed').length,
3495
- failed: queue.filter(u => u.status === 'error').length,
3496
- cancelled: queue.filter(u => u.status === 'cancelled').length
3497
- };
3498
- }
3499
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingUploadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3500
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingUploadService, providedIn: 'root' });
3501
- }
3502
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingUploadService, decorators: [{
3503
- type: Injectable,
3504
- args: [{
3505
- providedIn: 'root'
3506
- }]
3507
- }], ctorParameters: () => [] });
3508
-
3509
- class CideLytFloatingFileUploaderComponent {
3510
- destroyRef = inject(DestroyRef);
3511
- floatingUploadService = inject(CideLytFloatingUploadService);
3512
- // Signals for reactive state
3513
- isVisible = signal(false, ...(ngDevMode ? [{ debugName: "isVisible" }] : []));
3514
- isMinimized = signal(false, ...(ngDevMode ? [{ debugName: "isMinimized" }] : []));
3515
- uploadQueue = signal([], ...(ngDevMode ? [{ debugName: "uploadQueue" }] : []));
3516
- isUploading = signal(false, ...(ngDevMode ? [{ debugName: "isUploading" }] : []));
3517
- uploadProgress = signal(0, ...(ngDevMode ? [{ debugName: "uploadProgress" }] : []));
3518
- currentUserId = signal('', ...(ngDevMode ? [{ debugName: "currentUserId" }] : []));
3519
- // Computed values
3520
- hasUploads = computed(() => this.uploadQueue().length > 0, ...(ngDevMode ? [{ debugName: "hasUploads" }] : []));
3521
- pendingUploads = computed(() => this.uploadQueue().filter(upload => upload.status === 'pending'), ...(ngDevMode ? [{ debugName: "pendingUploads" }] : []));
3522
- activeUploads = computed(() => this.uploadQueue().filter(upload => upload.status === 'uploading'), ...(ngDevMode ? [{ debugName: "activeUploads" }] : []));
3523
- completedUploads = computed(() => this.uploadQueue().filter(upload => upload.status === 'completed'), ...(ngDevMode ? [{ debugName: "completedUploads" }] : []));
3524
- failedUploads = computed(() => this.uploadQueue().filter(upload => upload.status === 'error'), ...(ngDevMode ? [{ debugName: "failedUploads" }] : []));
3525
- // Animation states
3526
- isAnimating = signal(false, ...(ngDevMode ? [{ debugName: "isAnimating" }] : []));
3527
- constructor() {
3528
- console.log('🚀 [FloatingFileUploader] Component initialized');
3529
- }
3530
- ngOnInit() {
3531
- // Subscribe to upload service state changes
3532
- this.floatingUploadService.uploadQueue$
3533
- .pipe(takeUntilDestroyed(this.destroyRef))
3534
- .subscribe(queue => {
3535
- this.uploadQueue.set(queue);
3536
- this.updateVisibility();
3537
- });
3538
- this.floatingUploadService.isUploading$
3539
- .pipe(takeUntilDestroyed(this.destroyRef))
3540
- .subscribe(isUploading => {
3541
- this.isUploading.set(isUploading);
3542
- });
3543
- this.floatingUploadService.uploadProgress$
3544
- .pipe(takeUntilDestroyed(this.destroyRef))
3545
- .subscribe(progress => {
3546
- this.uploadProgress.set(progress);
3547
- });
3548
- this.floatingUploadService.isVisible$
3549
- .pipe(takeUntilDestroyed(this.destroyRef))
3550
- .subscribe(visible => {
3551
- this.isVisible.set(visible);
3552
- });
3553
- this.floatingUploadService.currentUserId$
3554
- .pipe(takeUntilDestroyed(this.destroyRef))
3555
- .subscribe(userId => {
3556
- this.currentUserId.set(userId);
3557
- });
3360
+ selectEntity(entityId) {
3361
+ this.selectedEntityId.set(entityId);
3362
+ this.loadAccessPassData();
3558
3363
  }
3559
- ngOnDestroy() {
3560
- console.log('🧹 [FloatingFileUploader] Component destroyed');
3561
- }
3562
- /**
3563
- * Update visibility based on upload state
3564
- */
3565
- updateVisibility() {
3566
- const hasActiveUploads = this.activeUploads().length > 0;
3567
- const hasPendingUploads = this.pendingUploads().length > 0;
3568
- const hasCompletedUploads = this.completedUploads().length > 0;
3569
- const hasFailedUploads = this.failedUploads().length > 0;
3570
- // Show if there are active, pending, or recent completed/failed uploads
3571
- const shouldShow = hasActiveUploads || hasPendingUploads || hasCompletedUploads || hasFailedUploads;
3572
- if (shouldShow && !this.isVisible()) {
3573
- this.showWithAnimation();
3364
+ async loadAccessPassData() {
3365
+ if (!this.selectedEntityId())
3366
+ return;
3367
+ this.accessPassLoading.set(true);
3368
+ try {
3369
+ // Mock data for now
3370
+ await new Promise(resolve => setTimeout(resolve, 500));
3371
+ // Set form values based on mock data
3372
+ this.rightsForm.patchValue({
3373
+ can_view: true,
3374
+ can_edit: false,
3375
+ is_owner: this.selectedEntityId() === 'owner-entity',
3376
+ syepm_isactive: true
3377
+ });
3574
3378
  }
3575
- else if (!shouldShow && this.isVisible()) {
3576
- this.hideWithAnimation();
3379
+ catch (error) {
3380
+ console.error('Error loading access pass data:', error);
3577
3381
  }
3578
- }
3579
- /**
3580
- * Show with animation
3581
- */
3582
- showWithAnimation() {
3583
- this.isAnimating.set(true);
3584
- this.isVisible.set(true);
3585
- // Remove animation class after animation completes
3586
- setTimeout(() => {
3587
- this.isAnimating.set(false);
3588
- }, 300);
3589
- }
3590
- /**
3591
- * Hide with animation
3592
- */
3593
- hideWithAnimation() {
3594
- this.isAnimating.set(true);
3595
- // Wait for animation to complete before hiding
3596
- setTimeout(() => {
3597
- this.isVisible.set(false);
3598
- this.isAnimating.set(false);
3599
- }, 300);
3600
- }
3601
- /**
3602
- * Toggle minimize state
3603
- */
3604
- toggleMinimize() {
3605
- this.isMinimized.set(!this.isMinimized());
3606
- }
3607
- /**
3608
- * Close the floating uploader
3609
- */
3610
- close() {
3611
- this.floatingUploadService.clearAllUploads();
3612
- this.hideWithAnimation();
3613
- }
3614
- /**
3615
- * Handle file upload completion
3616
- */
3617
- onUploadComplete(event) {
3618
- console.log('✅ [FloatingFileUploader] Upload completed:', event);
3619
- this.floatingUploadService.updateUploadStatus(event.fileId, 'completed', 100, undefined, event.uploadedFile);
3620
- }
3621
- /**
3622
- * Handle upload error
3623
- */
3624
- onUploadError(event) {
3625
- console.error('❌ [FloatingFileUploader] Upload error:', event);
3626
- this.floatingUploadService.updateUploadStatus(event.fileId, 'error', 0, event.error);
3627
- }
3628
- /**
3629
- * Handle upload cancellation
3630
- */
3631
- onUploadCancelled(fileId) {
3632
- console.log('🚫 [FloatingFileUploader] Upload cancelled:', fileId);
3633
- this.floatingUploadService.cancelUpload(fileId);
3634
- }
3635
- /**
3636
- * Handle all uploads complete
3637
- */
3638
- onAllUploadsComplete(event) {
3639
- console.log('🎉 [FloatingFileUploader] All uploads complete:', event);
3640
- this.floatingUploadService.handleAllUploadsComplete(event);
3641
- }
3642
- /**
3643
- * Get status icon
3644
- */
3645
- getStatusIcon(status) {
3646
- switch (status) {
3647
- case 'pending': return 'schedule';
3648
- case 'uploading': return 'cloud_upload';
3649
- case 'completed': return 'check_circle';
3650
- case 'error': return 'error';
3651
- case 'cancelled': return 'cancel';
3652
- default: return 'help';
3382
+ finally {
3383
+ this.accessPassLoading.set(false);
3653
3384
  }
3654
3385
  }
3655
- /**
3656
- * Get status class
3657
- */
3658
- getStatusClass(status) {
3659
- switch (status) {
3660
- case 'pending': return 'status-pending';
3661
- case 'uploading': return 'status-uploading';
3662
- case 'completed': return 'status-completed';
3663
- case 'error': return 'status-error';
3664
- case 'cancelled': return 'status-cancelled';
3665
- default: return 'status-unknown';
3386
+ async saveRights() {
3387
+ if (this.rightsForm.invalid)
3388
+ return;
3389
+ this.saving.set(true);
3390
+ try {
3391
+ const formValue = this.rightsForm.value;
3392
+ console.log('Saving rights:', formValue);
3393
+ // TODO: Replace with actual API call
3394
+ await new Promise(resolve => setTimeout(resolve, 1000));
3395
+ console.log('Rights saved successfully');
3396
+ this.save.emit(formValue);
3666
3397
  }
3667
- }
3398
+ catch (error) {
3399
+ console.error('Error saving rights:', error);
3400
+ }
3401
+ finally {
3402
+ this.saving.set(false);
3403
+ }
3404
+ }
3405
+ onCancel() {
3406
+ this.close.emit();
3407
+ }
3408
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingEntityRightsSharingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3409
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideLytFloatingEntityRightsSharingComponent, isStandalone: true, selector: "cide-lyt-floating-entity-rights-sharing", inputs: { data: "data" }, outputs: { close: "close", save: "save" }, ngImport: i0, template: `
3410
+ <!-- Entity Rights Sharing Content -->
3411
+ <div class="tw-p-4 tw-overflow-y-auto tw-max-h-[calc(80vh-120px)] tw-scrollbar-thin tw-scrollbar-thumb-gray-300 tw-scrollbar-track-transparent tw-select-none">
3412
+ <!-- Entity Selection -->
3413
+ <div class="tw-mb-4">
3414
+
3415
+ @if (entitiesLoading()) {
3416
+ <div class="tw-flex tw-items-center tw-justify-center tw-py-6">
3417
+ <cide-ele-spinner size="sm"></cide-ele-spinner>
3418
+ <span class="tw-ml-3 tw-text-gray-600 tw-text-sm">Loading entities...</span>
3419
+ </div>
3420
+ } @else if (entities().length === 0) {
3421
+ <div class="tw-text-center tw-py-6">
3422
+ <div class="tw-w-10 tw-h-10 tw-bg-gray-100 tw-rounded-xl tw-flex tw-items-center tw-justify-center tw-mx-auto tw-mb-2">
3423
+ <cide-ele-icon class="tw-w-5 tw-h-5 tw-text-gray-400">business</cide-ele-icon>
3424
+ </div>
3425
+ <p class="tw-text-gray-500 tw-text-sm">No entities available</p>
3426
+ </div>
3427
+ } @else {
3428
+ <div class="tw-space-y-2">
3429
+ @defer (when entities().length > 0) {
3430
+ @for (entity of entities(); track entity._id || entity.syen_name) {
3431
+ <div class="tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-border tw-border-gray-200 tw-border-opacity-50 tw-rounded-xl tw-p-3 tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-shadow-md hover:tw-border-blue-300 hover:tw-border-opacity-50 hover:tw-scale-[1.01] tw-group tw-select-none"
3432
+ [class.tw-border-blue-500]="selectedEntityId() === entity._id"
3433
+ [class.tw-bg-blue-50]="selectedEntityId() === entity._id"
3434
+ (click)="selectEntity(entity._id || '')">
3435
+ <div class="tw-flex tw-items-start tw-space-x-3">
3436
+ <div class="tw-w-6 tw-h-6 tw-bg-gray-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center tw-flex-shrink-0">
3437
+ <cide-ele-icon class="tw-text-gray-600">person</cide-ele-icon>
3438
+ </div>
3439
+ <div class="tw-flex-1 tw-min-w-0">
3440
+ <div class="tw-flex tw-items-center tw-space-x-2 tw-mb-1">
3441
+ <h4 class="tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate">{{ entity.syen_name }}</h4>
3442
+ @if (entity._id === 'owner-entity') {
3443
+ <div class="tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-space-x-1">
3444
+ <cide-ele-icon>admin_panel_settings</cide-ele-icon>
3445
+ <span>Owner</span>
3446
+ </div>
3447
+ }
3448
+ </div>
3449
+ <div class="tw-flex tw-items-center tw-space-x-3">
3450
+ <div class="tw-flex tw-items-center tw-space-x-1">
3451
+ <cide-ele-icon class="tw-text-gray-400">visibility</cide-ele-icon>
3452
+ <span class="tw-text-xs tw-text-gray-500">View</span>
3453
+ </div>
3454
+ <div class="tw-flex tw-items-center tw-space-x-1">
3455
+ <cide-ele-icon class="tw-text-gray-400">edit</cide-ele-icon>
3456
+ <span class="tw-text-xs tw-text-gray-500">Edit</span>
3457
+ </div>
3458
+ </div>
3459
+ </div>
3460
+ @if (selectedEntityId() === entity._id) {
3461
+ <div class="tw-w-4 tw-h-4 tw-bg-green-500 tw-rounded-full tw-flex tw-items-center tw-justify-center tw-flex-shrink-0">
3462
+ <cide-ele-icon class="tw-text-white">done</cide-ele-icon>
3463
+ </div>
3464
+ }
3465
+ </div>
3466
+ </div>
3467
+ }
3468
+ } @placeholder {
3469
+ <div class="tw-flex tw-items-center tw-justify-center tw-py-4">
3470
+ <cide-ele-spinner size="sm"></cide-ele-spinner>
3471
+ <span class="tw-ml-2 tw-text-sm tw-text-gray-600">Loading entities...</span>
3472
+ </div>
3473
+ }
3474
+ </div>
3475
+ }
3476
+ </div>
3477
+
3478
+ <!-- Rights Management -->
3479
+ @if (selectedEntityId()) {
3480
+ <div class="tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-border tw-border-gray-200 tw-border-opacity-50 tw-rounded-xl tw-p-3 tw-shadow-sm">
3481
+ <div class="tw-flex tw-items-center tw-space-x-2 tw-mb-3">
3482
+ <cide-ele-icon class="tw-text-green-600">security</cide-ele-icon>
3483
+ <h3 class="tw-text-sm tw-font-semibold tw-text-gray-900">Manage Rights</h3>
3484
+ </div>
3485
+
3486
+ @if (accessPassLoading()) {
3487
+ <div class="tw-flex tw-items-center tw-justify-center tw-min-h-[80px]">
3488
+ <cide-ele-spinner size="sm"></cide-ele-spinner>
3489
+ <span class="tw-ml-3 tw-text-gray-600 tw-text-sm">Loading...</span>
3490
+ </div>
3491
+ } @else {
3492
+ @defer (when !accessPassLoading()) {
3493
+ <form [formGroup]="rightsForm" (ngSubmit)="saveRights()">
3494
+ <div class="tw-flex tw-flex-wrap tw-gap-3 tw-min-h-[80px] tw-items-center">
3495
+ <div class="tw-flex tw-items-center tw-space-x-2">
3496
+ <cide-ele-input
3497
+ type="checkbox"
3498
+ formControlName="can_view"
3499
+ label="View">
3500
+ </cide-ele-input>
3501
+ </div>
3502
+
3503
+ <div class="tw-flex tw-items-center tw-space-x-2">
3504
+ <cide-ele-input
3505
+ type="checkbox"
3506
+ formControlName="can_edit"
3507
+ label="Edit">
3508
+ </cide-ele-input>
3509
+ </div>
3510
+
3511
+ <div class="tw-flex tw-items-center tw-space-x-2">
3512
+ <cide-ele-input
3513
+ type="checkbox"
3514
+ formControlName="is_owner"
3515
+ label="Is Owner">
3516
+ </cide-ele-input>
3517
+ </div>
3518
+
3519
+ <div class="tw-flex tw-items-center tw-space-x-2">
3520
+ <cide-ele-input
3521
+ type="checkbox"
3522
+ formControlName="syepm_isactive"
3523
+ label="Is Active">
3524
+ </cide-ele-input>
3525
+ </div>
3526
+ </div>
3527
+ </form>
3528
+ } @placeholder {
3529
+ <div class="tw-flex tw-items-center tw-justify-center tw-min-h-[80px]">
3530
+ <cide-ele-spinner size="sm"></cide-ele-spinner>
3531
+ <span class="tw-ml-2 tw-text-sm tw-text-gray-600">Loading rights...</span>
3532
+ </div>
3533
+ }
3534
+ }
3535
+ </div>
3536
+ }
3537
+ </div>
3538
+
3539
+ <!-- Footer -->
3540
+ <div class="tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-px-4 tw-py-3 tw-border-t tw-border-gray-200 tw-border-opacity-30 tw-flex tw-justify-end tw-space-x-2">
3541
+ <button cideEleButton variant="secondary" size="xs" type="button" (click)="onCancel()">
3542
+ Cancel
3543
+ </button>
3544
+ @if (selectedEntityId()) {
3545
+ <button cideEleButton variant="primary" size="xs" type="button" (click)="saveRights()"
3546
+ [disabled]="rightsForm.invalid || saving()" [loading]="saving()">
3547
+ {{ saving() ? 'Saving...' : 'Save' }}
3548
+ </button>
3549
+ }
3550
+ </div>
3551
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideSpinnerComponent, selector: "cide-ele-spinner", inputs: ["size", "type"] }], deferBlockDependencies: [() => [CideIconComponent], () => [i2$1.ɵNgNoValidate, i2$1.NgControlStatus, i2$1.NgControlStatusGroup, i2$1.FormGroupDirective, i2$1.FormControlName, CideInputComponent]] });
3552
+ }
3553
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingEntityRightsSharingComponent, decorators: [{
3554
+ type: Component,
3555
+ args: [{ selector: 'cide-lyt-floating-entity-rights-sharing', standalone: true, imports: [
3556
+ CommonModule,
3557
+ ReactiveFormsModule,
3558
+ CideEleButtonComponent,
3559
+ CideInputComponent,
3560
+ CideIconComponent,
3561
+ CideSpinnerComponent
3562
+ ], template: `
3563
+ <!-- Entity Rights Sharing Content -->
3564
+ <div class="tw-p-4 tw-overflow-y-auto tw-max-h-[calc(80vh-120px)] tw-scrollbar-thin tw-scrollbar-thumb-gray-300 tw-scrollbar-track-transparent tw-select-none">
3565
+ <!-- Entity Selection -->
3566
+ <div class="tw-mb-4">
3567
+
3568
+ @if (entitiesLoading()) {
3569
+ <div class="tw-flex tw-items-center tw-justify-center tw-py-6">
3570
+ <cide-ele-spinner size="sm"></cide-ele-spinner>
3571
+ <span class="tw-ml-3 tw-text-gray-600 tw-text-sm">Loading entities...</span>
3572
+ </div>
3573
+ } @else if (entities().length === 0) {
3574
+ <div class="tw-text-center tw-py-6">
3575
+ <div class="tw-w-10 tw-h-10 tw-bg-gray-100 tw-rounded-xl tw-flex tw-items-center tw-justify-center tw-mx-auto tw-mb-2">
3576
+ <cide-ele-icon class="tw-w-5 tw-h-5 tw-text-gray-400">business</cide-ele-icon>
3577
+ </div>
3578
+ <p class="tw-text-gray-500 tw-text-sm">No entities available</p>
3579
+ </div>
3580
+ } @else {
3581
+ <div class="tw-space-y-2">
3582
+ @defer (when entities().length > 0) {
3583
+ @for (entity of entities(); track entity._id || entity.syen_name) {
3584
+ <div class="tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-border tw-border-gray-200 tw-border-opacity-50 tw-rounded-xl tw-p-3 tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-shadow-md hover:tw-border-blue-300 hover:tw-border-opacity-50 hover:tw-scale-[1.01] tw-group tw-select-none"
3585
+ [class.tw-border-blue-500]="selectedEntityId() === entity._id"
3586
+ [class.tw-bg-blue-50]="selectedEntityId() === entity._id"
3587
+ (click)="selectEntity(entity._id || '')">
3588
+ <div class="tw-flex tw-items-start tw-space-x-3">
3589
+ <div class="tw-w-6 tw-h-6 tw-bg-gray-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center tw-flex-shrink-0">
3590
+ <cide-ele-icon class="tw-text-gray-600">person</cide-ele-icon>
3591
+ </div>
3592
+ <div class="tw-flex-1 tw-min-w-0">
3593
+ <div class="tw-flex tw-items-center tw-space-x-2 tw-mb-1">
3594
+ <h4 class="tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate">{{ entity.syen_name }}</h4>
3595
+ @if (entity._id === 'owner-entity') {
3596
+ <div class="tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-space-x-1">
3597
+ <cide-ele-icon>admin_panel_settings</cide-ele-icon>
3598
+ <span>Owner</span>
3599
+ </div>
3600
+ }
3601
+ </div>
3602
+ <div class="tw-flex tw-items-center tw-space-x-3">
3603
+ <div class="tw-flex tw-items-center tw-space-x-1">
3604
+ <cide-ele-icon class="tw-text-gray-400">visibility</cide-ele-icon>
3605
+ <span class="tw-text-xs tw-text-gray-500">View</span>
3606
+ </div>
3607
+ <div class="tw-flex tw-items-center tw-space-x-1">
3608
+ <cide-ele-icon class="tw-text-gray-400">edit</cide-ele-icon>
3609
+ <span class="tw-text-xs tw-text-gray-500">Edit</span>
3610
+ </div>
3611
+ </div>
3612
+ </div>
3613
+ @if (selectedEntityId() === entity._id) {
3614
+ <div class="tw-w-4 tw-h-4 tw-bg-green-500 tw-rounded-full tw-flex tw-items-center tw-justify-center tw-flex-shrink-0">
3615
+ <cide-ele-icon class="tw-text-white">done</cide-ele-icon>
3616
+ </div>
3617
+ }
3618
+ </div>
3619
+ </div>
3620
+ }
3621
+ } @placeholder {
3622
+ <div class="tw-flex tw-items-center tw-justify-center tw-py-4">
3623
+ <cide-ele-spinner size="sm"></cide-ele-spinner>
3624
+ <span class="tw-ml-2 tw-text-sm tw-text-gray-600">Loading entities...</span>
3625
+ </div>
3626
+ }
3627
+ </div>
3628
+ }
3629
+ </div>
3630
+
3631
+ <!-- Rights Management -->
3632
+ @if (selectedEntityId()) {
3633
+ <div class="tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-border tw-border-gray-200 tw-border-opacity-50 tw-rounded-xl tw-p-3 tw-shadow-sm">
3634
+ <div class="tw-flex tw-items-center tw-space-x-2 tw-mb-3">
3635
+ <cide-ele-icon class="tw-text-green-600">security</cide-ele-icon>
3636
+ <h3 class="tw-text-sm tw-font-semibold tw-text-gray-900">Manage Rights</h3>
3637
+ </div>
3638
+
3639
+ @if (accessPassLoading()) {
3640
+ <div class="tw-flex tw-items-center tw-justify-center tw-min-h-[80px]">
3641
+ <cide-ele-spinner size="sm"></cide-ele-spinner>
3642
+ <span class="tw-ml-3 tw-text-gray-600 tw-text-sm">Loading...</span>
3643
+ </div>
3644
+ } @else {
3645
+ @defer (when !accessPassLoading()) {
3646
+ <form [formGroup]="rightsForm" (ngSubmit)="saveRights()">
3647
+ <div class="tw-flex tw-flex-wrap tw-gap-3 tw-min-h-[80px] tw-items-center">
3648
+ <div class="tw-flex tw-items-center tw-space-x-2">
3649
+ <cide-ele-input
3650
+ type="checkbox"
3651
+ formControlName="can_view"
3652
+ label="View">
3653
+ </cide-ele-input>
3654
+ </div>
3655
+
3656
+ <div class="tw-flex tw-items-center tw-space-x-2">
3657
+ <cide-ele-input
3658
+ type="checkbox"
3659
+ formControlName="can_edit"
3660
+ label="Edit">
3661
+ </cide-ele-input>
3662
+ </div>
3663
+
3664
+ <div class="tw-flex tw-items-center tw-space-x-2">
3665
+ <cide-ele-input
3666
+ type="checkbox"
3667
+ formControlName="is_owner"
3668
+ label="Is Owner">
3669
+ </cide-ele-input>
3670
+ </div>
3671
+
3672
+ <div class="tw-flex tw-items-center tw-space-x-2">
3673
+ <cide-ele-input
3674
+ type="checkbox"
3675
+ formControlName="syepm_isactive"
3676
+ label="Is Active">
3677
+ </cide-ele-input>
3678
+ </div>
3679
+ </div>
3680
+ </form>
3681
+ } @placeholder {
3682
+ <div class="tw-flex tw-items-center tw-justify-center tw-min-h-[80px]">
3683
+ <cide-ele-spinner size="sm"></cide-ele-spinner>
3684
+ <span class="tw-ml-2 tw-text-sm tw-text-gray-600">Loading rights...</span>
3685
+ </div>
3686
+ }
3687
+ }
3688
+ </div>
3689
+ }
3690
+ </div>
3691
+
3692
+ <!-- Footer -->
3693
+ <div class="tw-bg-white tw-bg-opacity-80 tw-backdrop-blur-sm tw-px-4 tw-py-3 tw-border-t tw-border-gray-200 tw-border-opacity-30 tw-flex tw-justify-end tw-space-x-2">
3694
+ <button cideEleButton variant="secondary" size="xs" type="button" (click)="onCancel()">
3695
+ Cancel
3696
+ </button>
3697
+ @if (selectedEntityId()) {
3698
+ <button cideEleButton variant="primary" size="xs" type="button" (click)="saveRights()"
3699
+ [disabled]="rightsForm.invalid || saving()" [loading]="saving()">
3700
+ {{ saving() ? 'Saving...' : 'Save' }}
3701
+ </button>
3702
+ }
3703
+ </div>
3704
+ ` }]
3705
+ }], propDecorators: { data: [{
3706
+ type: Input
3707
+ }], close: [{
3708
+ type: Output
3709
+ }], save: [{
3710
+ type: Output
3711
+ }] } });
3712
+
3713
+ var floatingEntityRightsSharing_component = /*#__PURE__*/Object.freeze({
3714
+ __proto__: null,
3715
+ CideLytFloatingEntityRightsSharingComponent: CideLytFloatingEntityRightsSharingComponent
3716
+ });
3717
+
3718
+ class CideLytFloatingEntityRightsSharingService {
3719
+ containerService = inject(CideEleFloatingContainerService);
3668
3720
  /**
3669
- * Get file size display
3721
+ * Show entity rights sharing in floating container
3670
3722
  */
3671
- getFileSizeDisplay(size) {
3672
- if (size === 0)
3673
- return '0 Bytes';
3674
- const k = 1024;
3675
- const sizes = ['Bytes', 'KB', 'MB', 'GB'];
3676
- const i = Math.floor(Math.log(size) / Math.log(k));
3677
- return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
3723
+ async show(data) {
3724
+ console.log('🚀 Showing entity rights sharing...');
3725
+ console.log('📋 Current registered components:', this.containerService.getRegisteredComponentIds());
3726
+ // Lazy registration - only register if not already registered
3727
+ if (!this.containerService.isComponentRegistered('entity-rights-sharing')) {
3728
+ console.log('📝 Registering entity rights sharing component...');
3729
+ await this.registerEntityRightsSharingComponent();
3730
+ console.log('📋 Components after registration:', this.containerService.getRegisteredComponentIds());
3731
+ }
3732
+ else {
3733
+ console.log('✅ Entity rights sharing component already registered');
3734
+ }
3735
+ const config = {
3736
+ id: 'entity-rights-sharing-main',
3737
+ title: 'Entity Rights Sharing',
3738
+ icon: 'share',
3739
+ width: '450px',
3740
+ height: '500px',
3741
+ minWidth: '400px',
3742
+ minHeight: '400px',
3743
+ resizable: true,
3744
+ draggable: true,
3745
+ closable: true,
3746
+ minimizable: true,
3747
+ maximizable: true,
3748
+ componentId: 'entity-rights-sharing',
3749
+ componentConfig: {
3750
+ inputs: data ? { data } : undefined
3751
+ }
3752
+ };
3753
+ const containerId = this.containerService.show(config);
3754
+ console.log('✅ Container created with ID:', containerId);
3755
+ return containerId;
3678
3756
  }
3679
3757
  /**
3680
- * Get overall progress percentage
3758
+ * Hide entity rights sharing
3681
3759
  */
3682
- getOverallProgress() {
3683
- const uploads = this.uploadQueue();
3684
- if (uploads.length === 0)
3685
- return 0;
3686
- const totalProgress = uploads.reduce((sum, upload) => sum + upload.progress, 0);
3687
- return Math.round(totalProgress / uploads.length);
3760
+ hide() {
3761
+ this.containerService.hide('entity-rights-sharing-main');
3688
3762
  }
3689
3763
  /**
3690
- * Get upload summary text
3764
+ * Register the entity rights sharing component
3691
3765
  */
3692
- getUploadSummary() {
3693
- const active = this.activeUploads().length;
3694
- const completed = this.completedUploads().length;
3695
- const failed = this.failedUploads().length;
3696
- const pending = this.pendingUploads().length;
3697
- if (active > 0) {
3698
- return `${active} uploading`;
3699
- }
3700
- else if (completed > 0 && failed === 0) {
3701
- return `${completed} completed`;
3702
- }
3703
- else if (failed > 0) {
3704
- return `${completed} completed, ${failed} failed`;
3705
- }
3706
- else if (pending > 0) {
3707
- return `${pending} pending`;
3708
- }
3709
- return 'No uploads';
3710
- }
3711
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingFileUploaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3712
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideLytFloatingFileUploaderComponent, isStandalone: true, selector: "cide-layout-floating-file-uploader", ngImport: i0, template: "<!-- Floating File Uploader Container -->\n@if (isVisible()) {\n<div class=\"floating-uploader\" \n [class.minimized]=\"isMinimized()\" \n [class.animating]=\"isAnimating()\"\n [class.uploading]=\"isUploading()\">\n\n <!-- Header -->\n <div class=\"uploader-header\">\n <div class=\"header-left\">\n <div class=\"upload-icon\">\n <cide-ele-icon size=\"sm\">cloud_upload</cide-ele-icon>\n </div>\n <div class=\"upload-info\">\n <div class=\"upload-title\">File Upload</div>\n <div class=\"upload-summary\">{{ getUploadSummary() }}</div>\n </div>\n </div>\n \n <div class=\"header-actions\">\n <button class=\"action-btn minimize-btn\" (click)=\"toggleMinimize()\" [title]=\"isMinimized() ? 'Expand' : 'Minimize'\">\n <cide-ele-icon size=\"xs\">{{ isMinimized() ? 'expand_more' : 'expand_less' }}</cide-ele-icon>\n </button>\n <button class=\"action-btn close-btn\" (click)=\"close()\" title=\"Close\">\n <cide-ele-icon size=\"xs\">close</cide-ele-icon>\n </button>\n </div>\n </div>\n\n <!-- Content (hidden when minimized) -->\n @if (!isMinimized()) {\n <div class=\"uploader-content\">\n \n <!-- Overall Progress Bar -->\n @if (isUploading()) {\n <div class=\"overall-progress\">\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"getOverallProgress()\"></div>\n </div>\n <div class=\"progress-text\">{{ getOverallProgress() }}%</div>\n </div>\n }\n\n <!-- Upload Queue -->\n @if (hasUploads()) {\n <div class=\"upload-queue\">\n @for (upload of uploadQueue(); track upload.fileId) {\n <div class=\"upload-item\" [class]=\"getStatusClass(upload.status)\">\n \n <!-- File Info -->\n <div class=\"file-info\">\n <cide-ele-icon class=\"status-icon\" size=\"xs\">{{ getStatusIcon(upload.status) }}</cide-ele-icon>\n <div class=\"file-details\">\n <div class=\"file-name\">{{ upload.fileName }}</div>\n <div class=\"file-status\">\n @switch (upload.status) {\n @case ('pending') {\n <span class=\"text-yellow-600\">Waiting...</span>\n }\n @case ('uploading') {\n <span class=\"text-blue-600\">Uploading...</span>\n }\n @case ('completed') {\n <span class=\"text-green-600\">Completed</span>\n }\n @case ('error') {\n <span class=\"text-red-600\">{{ upload.error || 'Failed' }}</span>\n }\n @case ('cancelled') {\n <span class=\"text-gray-600\">Cancelled</span>\n }\n }\n </div>\n </div>\n </div>\n\n <!-- Progress Bar (for uploading files) -->\n @if (upload.status === 'uploading') {\n <div class=\"file-progress\">\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"upload.progress\"></div>\n </div>\n <span class=\"progress-text\">{{ upload.progress }}%</span>\n </div>\n }\n\n <!-- Actions -->\n <div class=\"upload-actions\">\n @switch (upload.status) {\n @case ('pending') {\n <button class=\"action-btn cancel-btn\" (click)=\"onUploadCancelled(upload.fileId)\" title=\"Cancel\">\n <cide-ele-icon size=\"xs\">cancel</cide-ele-icon>\n </button>\n }\n @case ('uploading') {\n <button class=\"action-btn cancel-btn\" (click)=\"onUploadCancelled(upload.fileId)\" title=\"Cancel\">\n <cide-ele-icon size=\"xs\">cancel</cide-ele-icon>\n </button>\n }\n @case ('completed') {\n <button class=\"action-btn success-btn\" title=\"Completed\">\n <cide-ele-icon size=\"xs\">check_circle</cide-ele-icon>\n </button>\n }\n @case ('error') {\n <button class=\"action-btn retry-btn\" title=\"Retry\">\n <cide-ele-icon size=\"xs\">refresh</cide-ele-icon>\n </button>\n }\n }\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Hidden file input for drag & drop -->\n <div class=\"hidden-uploader\">\n <input type=\"file\" multiple style=\"display: none;\" id=\"floating-file-input\">\n </div>\n </div>\n }\n\n <!-- Footer (always visible) -->\n <div class=\"uploader-footer\">\n <div class=\"footer-stats\">\n @if (activeUploads().length > 0) {\n <span class=\"stat uploading\">\n <cide-ele-icon size=\"xs\">cloud_upload</cide-ele-icon>\n {{ activeUploads().length }} uploading\n </span>\n }\n @if (completedUploads().length > 0) {\n <span class=\"stat completed\">\n <cide-ele-icon size=\"xs\">check_circle</cide-ele-icon>\n {{ completedUploads().length }} completed\n </span>\n }\n @if (failedUploads().length > 0) {\n <span class=\"stat failed\">\n <cide-ele-icon size=\"xs\">error</cide-ele-icon>\n {{ failedUploads().length }} failed\n </span>\n }\n </div>\n </div>\n</div>\n}\n", styles: [".floating-uploader{position:fixed;bottom:20px;right:20px;width:320px;max-height:500px;background:#fff;border-radius:12px;box-shadow:0 8px 32px #0000001f;border:1px solid rgba(0,0,0,.08);z-index:1000;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1);transform:translateY(0);opacity:1}.floating-uploader.animating{transition:all .3s cubic-bezier(.4,0,.2,1)}.floating-uploader.minimized .uploader-content{display:none}.floating-uploader.minimized .uploader-footer{border-top:none}.floating-uploader.uploading{border-color:#3b82f6;box-shadow:0 8px 32px #3b82f626}.floating-uploader .uploader-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.floating-uploader .uploader-header .header-left{display:flex;align-items:center;gap:8px}.floating-uploader .uploader-header .header-left .upload-icon{display:flex;align-items:center;justify-content:center;width:24px;height:24px;background:#3b82f6;border-radius:6px;color:#fff}.floating-uploader .uploader-header .header-left .upload-info .upload-title{font-size:14px;font-weight:600;color:#1e293b;margin:0}.floating-uploader .uploader-header .header-left .upload-info .upload-summary{font-size:12px;color:#64748b;margin:0}.floating-uploader .uploader-header .header-actions{display:flex;gap:4px}.floating-uploader .uploader-header .header-actions .action-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;background:transparent;border-radius:4px;cursor:pointer;transition:background-color .2s;color:#64748b}.floating-uploader .uploader-header .header-actions .action-btn:hover{background:#e2e8f0;color:#1e293b}.floating-uploader .uploader-header .header-actions .action-btn.close-btn:hover{background:#fef2f2;color:#dc2626}.floating-uploader .uploader-content{max-height:400px;overflow-y:auto}.floating-uploader .uploader-content .overall-progress{padding:12px 16px;border-bottom:1px solid #e2e8f0}.floating-uploader .uploader-content .overall-progress .progress-bar{width:100%;height:4px;background:#e2e8f0;border-radius:2px;overflow:hidden;margin-bottom:4px}.floating-uploader .uploader-content .overall-progress .progress-bar .progress-fill{height:100%;background:#3b82f6;transition:width .3s ease}.floating-uploader .uploader-content .overall-progress .progress-text{font-size:12px;color:#64748b;text-align:center;display:block}.floating-uploader .uploader-content .upload-queue .upload-item{display:flex;align-items:center;padding:8px 16px;border-bottom:1px solid #f1f5f9;transition:background-color .2s}.floating-uploader .uploader-content .upload-queue .upload-item:last-child{border-bottom:none}.floating-uploader .uploader-content .upload-queue .upload-item.status-uploading{background:#f0f9ff}.floating-uploader .uploader-content .upload-queue .upload-item.status-completed{background:#f0fdf4}.floating-uploader .uploader-content .upload-queue .upload-item.status-error{background:#fef2f2}.floating-uploader .uploader-content .upload-queue .upload-item .file-info{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .status-icon{flex-shrink:0}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .file-details{min-width:0;flex:1}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .file-details .file-name{font-size:13px;font-weight:500;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .file-details .file-status{font-size:11px;margin:0}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .file-details .file-status span{font-weight:500}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress{display:flex;align-items:center;gap:8px;margin:0 8px;min-width:80px}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-bar{flex:1;height:3px;background:#e2e8f0;border-radius:2px;overflow:hidden}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-bar .progress-fill{height:100%;background:#3b82f6;transition:width .3s ease}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-text{font-size:10px;color:#64748b;min-width:24px;text-align:right}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions{display:flex;gap:4px}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;border-radius:4px;cursor:pointer;transition:all .2s;color:#64748b}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn:hover{background:#e2e8f0}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.cancel-btn:hover{background:#fef2f2;color:#dc2626}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.retry-btn:hover{background:#f0f9ff;color:#3b82f6}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.success-btn{color:#16a34a}.floating-uploader .uploader-content .hidden-uploader{display:none}.floating-uploader .uploader-footer{padding:8px 16px;background:#f8fafc;border-top:1px solid #e2e8f0}.floating-uploader .uploader-footer .footer-stats{display:flex;gap:12px;font-size:11px}.floating-uploader .uploader-footer .footer-stats .stat{display:flex;align-items:center;gap:4px;color:#64748b}.floating-uploader .uploader-footer .footer-stats .stat.uploading{color:#3b82f6}.floating-uploader .uploader-footer .footer-stats .stat.completed{color:#16a34a}.floating-uploader .uploader-footer .footer-stats .stat.failed{color:#dc2626}@media (max-width: 640px){.floating-uploader{bottom:10px;right:10px;left:10px;width:auto;max-width:none}}@media (prefers-color-scheme: dark){.floating-uploader{background:#1e293b;border-color:#334155;box-shadow:0 8px 32px #0000004d}.floating-uploader.uploading{border-color:#3b82f6;box-shadow:0 8px 32px #3b82f633}.floating-uploader .uploader-header{background:#334155;border-bottom-color:#475569}.floating-uploader .uploader-header .header-left .upload-icon{background:#3b82f6}.floating-uploader .uploader-header .header-left .upload-info .upload-title{color:#f1f5f9}.floating-uploader .uploader-header .header-left .upload-info .upload-summary,.floating-uploader .uploader-header .header-actions .action-btn{color:#94a3b8}.floating-uploader .uploader-header .header-actions .action-btn:hover{background:#475569;color:#f1f5f9}.floating-uploader .uploader-header .header-actions .action-btn.close-btn:hover{background:#7f1d1d;color:#fca5a5}.floating-uploader .uploader-content .overall-progress{border-bottom-color:#475569}.floating-uploader .uploader-content .overall-progress .progress-bar{background:#475569}.floating-uploader .uploader-content .overall-progress .progress-bar .progress-fill{background:#3b82f6}.floating-uploader .uploader-content .overall-progress .progress-text{color:#94a3b8}.floating-uploader .uploader-content .upload-queue .upload-item{border-bottom-color:#334155}.floating-uploader .uploader-content .upload-queue .upload-item.status-uploading{background:#1e3a8a}.floating-uploader .uploader-content .upload-queue .upload-item.status-completed{background:#14532d}.floating-uploader .uploader-content .upload-queue .upload-item.status-error{background:#7f1d1d}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .file-details .file-name{color:#f1f5f9}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-bar{background:#475569}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-bar .progress-fill{background:#3b82f6}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-text,.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn{color:#94a3b8}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn:hover{background:#475569}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.cancel-btn:hover{background:#7f1d1d;color:#fca5a5}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.retry-btn:hover{background:#1e3a8a;color:#60a5fa}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.success-btn{color:#4ade80}.floating-uploader .uploader-footer{background:#334155;border-top-color:#475569}.floating-uploader .uploader-footer .footer-stats .stat{color:#94a3b8}.floating-uploader .uploader-footer .footer-stats .stat.uploading{color:#60a5fa}.floating-uploader .uploader-footer .footer-stats .stat.completed{color:#4ade80}.floating-uploader .uploader-footer .footer-stats .stat.failed{color:#fca5a5}}@keyframes slideInUp{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slideOutDown{0%{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:0}}.floating-uploader.animating{animation:slideInUp .3s cubic-bezier(.4,0,.2,1)}.floating-uploader.animating.hiding{animation:slideOutDown .3s cubic-bezier(.4,0,.2,1)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }] });
3713
- }
3714
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingFileUploaderComponent, decorators: [{
3715
- type: Component,
3716
- args: [{ selector: 'cide-layout-floating-file-uploader', standalone: true, imports: [
3717
- CommonModule,
3718
- CideIconComponent
3719
- ], template: "<!-- Floating File Uploader Container -->\n@if (isVisible()) {\n<div class=\"floating-uploader\" \n [class.minimized]=\"isMinimized()\" \n [class.animating]=\"isAnimating()\"\n [class.uploading]=\"isUploading()\">\n\n <!-- Header -->\n <div class=\"uploader-header\">\n <div class=\"header-left\">\n <div class=\"upload-icon\">\n <cide-ele-icon size=\"sm\">cloud_upload</cide-ele-icon>\n </div>\n <div class=\"upload-info\">\n <div class=\"upload-title\">File Upload</div>\n <div class=\"upload-summary\">{{ getUploadSummary() }}</div>\n </div>\n </div>\n \n <div class=\"header-actions\">\n <button class=\"action-btn minimize-btn\" (click)=\"toggleMinimize()\" [title]=\"isMinimized() ? 'Expand' : 'Minimize'\">\n <cide-ele-icon size=\"xs\">{{ isMinimized() ? 'expand_more' : 'expand_less' }}</cide-ele-icon>\n </button>\n <button class=\"action-btn close-btn\" (click)=\"close()\" title=\"Close\">\n <cide-ele-icon size=\"xs\">close</cide-ele-icon>\n </button>\n </div>\n </div>\n\n <!-- Content (hidden when minimized) -->\n @if (!isMinimized()) {\n <div class=\"uploader-content\">\n \n <!-- Overall Progress Bar -->\n @if (isUploading()) {\n <div class=\"overall-progress\">\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"getOverallProgress()\"></div>\n </div>\n <div class=\"progress-text\">{{ getOverallProgress() }}%</div>\n </div>\n }\n\n <!-- Upload Queue -->\n @if (hasUploads()) {\n <div class=\"upload-queue\">\n @for (upload of uploadQueue(); track upload.fileId) {\n <div class=\"upload-item\" [class]=\"getStatusClass(upload.status)\">\n \n <!-- File Info -->\n <div class=\"file-info\">\n <cide-ele-icon class=\"status-icon\" size=\"xs\">{{ getStatusIcon(upload.status) }}</cide-ele-icon>\n <div class=\"file-details\">\n <div class=\"file-name\">{{ upload.fileName }}</div>\n <div class=\"file-status\">\n @switch (upload.status) {\n @case ('pending') {\n <span class=\"text-yellow-600\">Waiting...</span>\n }\n @case ('uploading') {\n <span class=\"text-blue-600\">Uploading...</span>\n }\n @case ('completed') {\n <span class=\"text-green-600\">Completed</span>\n }\n @case ('error') {\n <span class=\"text-red-600\">{{ upload.error || 'Failed' }}</span>\n }\n @case ('cancelled') {\n <span class=\"text-gray-600\">Cancelled</span>\n }\n }\n </div>\n </div>\n </div>\n\n <!-- Progress Bar (for uploading files) -->\n @if (upload.status === 'uploading') {\n <div class=\"file-progress\">\n <div class=\"progress-bar\">\n <div class=\"progress-fill\" [style.width.%]=\"upload.progress\"></div>\n </div>\n <span class=\"progress-text\">{{ upload.progress }}%</span>\n </div>\n }\n\n <!-- Actions -->\n <div class=\"upload-actions\">\n @switch (upload.status) {\n @case ('pending') {\n <button class=\"action-btn cancel-btn\" (click)=\"onUploadCancelled(upload.fileId)\" title=\"Cancel\">\n <cide-ele-icon size=\"xs\">cancel</cide-ele-icon>\n </button>\n }\n @case ('uploading') {\n <button class=\"action-btn cancel-btn\" (click)=\"onUploadCancelled(upload.fileId)\" title=\"Cancel\">\n <cide-ele-icon size=\"xs\">cancel</cide-ele-icon>\n </button>\n }\n @case ('completed') {\n <button class=\"action-btn success-btn\" title=\"Completed\">\n <cide-ele-icon size=\"xs\">check_circle</cide-ele-icon>\n </button>\n }\n @case ('error') {\n <button class=\"action-btn retry-btn\" title=\"Retry\">\n <cide-ele-icon size=\"xs\">refresh</cide-ele-icon>\n </button>\n }\n }\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Hidden file input for drag & drop -->\n <div class=\"hidden-uploader\">\n <input type=\"file\" multiple style=\"display: none;\" id=\"floating-file-input\">\n </div>\n </div>\n }\n\n <!-- Footer (always visible) -->\n <div class=\"uploader-footer\">\n <div class=\"footer-stats\">\n @if (activeUploads().length > 0) {\n <span class=\"stat uploading\">\n <cide-ele-icon size=\"xs\">cloud_upload</cide-ele-icon>\n {{ activeUploads().length }} uploading\n </span>\n }\n @if (completedUploads().length > 0) {\n <span class=\"stat completed\">\n <cide-ele-icon size=\"xs\">check_circle</cide-ele-icon>\n {{ completedUploads().length }} completed\n </span>\n }\n @if (failedUploads().length > 0) {\n <span class=\"stat failed\">\n <cide-ele-icon size=\"xs\">error</cide-ele-icon>\n {{ failedUploads().length }} failed\n </span>\n }\n </div>\n </div>\n</div>\n}\n", styles: [".floating-uploader{position:fixed;bottom:20px;right:20px;width:320px;max-height:500px;background:#fff;border-radius:12px;box-shadow:0 8px 32px #0000001f;border:1px solid rgba(0,0,0,.08);z-index:1000;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1);transform:translateY(0);opacity:1}.floating-uploader.animating{transition:all .3s cubic-bezier(.4,0,.2,1)}.floating-uploader.minimized .uploader-content{display:none}.floating-uploader.minimized .uploader-footer{border-top:none}.floating-uploader.uploading{border-color:#3b82f6;box-shadow:0 8px 32px #3b82f626}.floating-uploader .uploader-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.floating-uploader .uploader-header .header-left{display:flex;align-items:center;gap:8px}.floating-uploader .uploader-header .header-left .upload-icon{display:flex;align-items:center;justify-content:center;width:24px;height:24px;background:#3b82f6;border-radius:6px;color:#fff}.floating-uploader .uploader-header .header-left .upload-info .upload-title{font-size:14px;font-weight:600;color:#1e293b;margin:0}.floating-uploader .uploader-header .header-left .upload-info .upload-summary{font-size:12px;color:#64748b;margin:0}.floating-uploader .uploader-header .header-actions{display:flex;gap:4px}.floating-uploader .uploader-header .header-actions .action-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;background:transparent;border-radius:4px;cursor:pointer;transition:background-color .2s;color:#64748b}.floating-uploader .uploader-header .header-actions .action-btn:hover{background:#e2e8f0;color:#1e293b}.floating-uploader .uploader-header .header-actions .action-btn.close-btn:hover{background:#fef2f2;color:#dc2626}.floating-uploader .uploader-content{max-height:400px;overflow-y:auto}.floating-uploader .uploader-content .overall-progress{padding:12px 16px;border-bottom:1px solid #e2e8f0}.floating-uploader .uploader-content .overall-progress .progress-bar{width:100%;height:4px;background:#e2e8f0;border-radius:2px;overflow:hidden;margin-bottom:4px}.floating-uploader .uploader-content .overall-progress .progress-bar .progress-fill{height:100%;background:#3b82f6;transition:width .3s ease}.floating-uploader .uploader-content .overall-progress .progress-text{font-size:12px;color:#64748b;text-align:center;display:block}.floating-uploader .uploader-content .upload-queue .upload-item{display:flex;align-items:center;padding:8px 16px;border-bottom:1px solid #f1f5f9;transition:background-color .2s}.floating-uploader .uploader-content .upload-queue .upload-item:last-child{border-bottom:none}.floating-uploader .uploader-content .upload-queue .upload-item.status-uploading{background:#f0f9ff}.floating-uploader .uploader-content .upload-queue .upload-item.status-completed{background:#f0fdf4}.floating-uploader .uploader-content .upload-queue .upload-item.status-error{background:#fef2f2}.floating-uploader .uploader-content .upload-queue .upload-item .file-info{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .status-icon{flex-shrink:0}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .file-details{min-width:0;flex:1}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .file-details .file-name{font-size:13px;font-weight:500;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .file-details .file-status{font-size:11px;margin:0}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .file-details .file-status span{font-weight:500}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress{display:flex;align-items:center;gap:8px;margin:0 8px;min-width:80px}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-bar{flex:1;height:3px;background:#e2e8f0;border-radius:2px;overflow:hidden}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-bar .progress-fill{height:100%;background:#3b82f6;transition:width .3s ease}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-text{font-size:10px;color:#64748b;min-width:24px;text-align:right}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions{display:flex;gap:4px}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;border-radius:4px;cursor:pointer;transition:all .2s;color:#64748b}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn:hover{background:#e2e8f0}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.cancel-btn:hover{background:#fef2f2;color:#dc2626}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.retry-btn:hover{background:#f0f9ff;color:#3b82f6}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.success-btn{color:#16a34a}.floating-uploader .uploader-content .hidden-uploader{display:none}.floating-uploader .uploader-footer{padding:8px 16px;background:#f8fafc;border-top:1px solid #e2e8f0}.floating-uploader .uploader-footer .footer-stats{display:flex;gap:12px;font-size:11px}.floating-uploader .uploader-footer .footer-stats .stat{display:flex;align-items:center;gap:4px;color:#64748b}.floating-uploader .uploader-footer .footer-stats .stat.uploading{color:#3b82f6}.floating-uploader .uploader-footer .footer-stats .stat.completed{color:#16a34a}.floating-uploader .uploader-footer .footer-stats .stat.failed{color:#dc2626}@media (max-width: 640px){.floating-uploader{bottom:10px;right:10px;left:10px;width:auto;max-width:none}}@media (prefers-color-scheme: dark){.floating-uploader{background:#1e293b;border-color:#334155;box-shadow:0 8px 32px #0000004d}.floating-uploader.uploading{border-color:#3b82f6;box-shadow:0 8px 32px #3b82f633}.floating-uploader .uploader-header{background:#334155;border-bottom-color:#475569}.floating-uploader .uploader-header .header-left .upload-icon{background:#3b82f6}.floating-uploader .uploader-header .header-left .upload-info .upload-title{color:#f1f5f9}.floating-uploader .uploader-header .header-left .upload-info .upload-summary,.floating-uploader .uploader-header .header-actions .action-btn{color:#94a3b8}.floating-uploader .uploader-header .header-actions .action-btn:hover{background:#475569;color:#f1f5f9}.floating-uploader .uploader-header .header-actions .action-btn.close-btn:hover{background:#7f1d1d;color:#fca5a5}.floating-uploader .uploader-content .overall-progress{border-bottom-color:#475569}.floating-uploader .uploader-content .overall-progress .progress-bar{background:#475569}.floating-uploader .uploader-content .overall-progress .progress-bar .progress-fill{background:#3b82f6}.floating-uploader .uploader-content .overall-progress .progress-text{color:#94a3b8}.floating-uploader .uploader-content .upload-queue .upload-item{border-bottom-color:#334155}.floating-uploader .uploader-content .upload-queue .upload-item.status-uploading{background:#1e3a8a}.floating-uploader .uploader-content .upload-queue .upload-item.status-completed{background:#14532d}.floating-uploader .uploader-content .upload-queue .upload-item.status-error{background:#7f1d1d}.floating-uploader .uploader-content .upload-queue .upload-item .file-info .file-details .file-name{color:#f1f5f9}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-bar{background:#475569}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-bar .progress-fill{background:#3b82f6}.floating-uploader .uploader-content .upload-queue .upload-item .file-progress .progress-text,.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn{color:#94a3b8}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn:hover{background:#475569}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.cancel-btn:hover{background:#7f1d1d;color:#fca5a5}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.retry-btn:hover{background:#1e3a8a;color:#60a5fa}.floating-uploader .uploader-content .upload-queue .upload-item .upload-actions .action-btn.success-btn{color:#4ade80}.floating-uploader .uploader-footer{background:#334155;border-top-color:#475569}.floating-uploader .uploader-footer .footer-stats .stat{color:#94a3b8}.floating-uploader .uploader-footer .footer-stats .stat.uploading{color:#60a5fa}.floating-uploader .uploader-footer .footer-stats .stat.completed{color:#4ade80}.floating-uploader .uploader-footer .footer-stats .stat.failed{color:#fca5a5}}@keyframes slideInUp{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slideOutDown{0%{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:0}}.floating-uploader.animating{animation:slideInUp .3s cubic-bezier(.4,0,.2,1)}.floating-uploader.animating.hiding{animation:slideOutDown .3s cubic-bezier(.4,0,.2,1)}\n"] }]
3720
- }], ctorParameters: () => [] });
3721
-
3722
- class CideLytLayoutWithFloatingUploaderComponent {
3723
- destroyRef = inject(DestroyRef);
3724
- floatingUploadService = inject(CideLytFloatingUploadService);
3725
- // Signals for reactive state
3726
- isVisible = signal(false, ...(ngDevMode ? [{ debugName: "isVisible" }] : []));
3727
- uploadCount = signal(0, ...(ngDevMode ? [{ debugName: "uploadCount" }] : []));
3728
- // Computed values
3729
- hasUploads = computed(() => this.uploadCount() > 0, ...(ngDevMode ? [{ debugName: "hasUploads" }] : []));
3730
- constructor() {
3731
- console.log('🚀 [LayoutWithFloatingUploader] Component initialized');
3732
- }
3733
- ngOnInit() {
3734
- // Subscribe to floating upload service state
3735
- this.floatingUploadService.isVisible$
3736
- .pipe(takeUntilDestroyed(this.destroyRef))
3737
- .subscribe(visible => {
3738
- this.isVisible.set(visible);
3739
- });
3740
- this.floatingUploadService.uploadQueue$
3741
- .pipe(takeUntilDestroyed(this.destroyRef))
3742
- .subscribe(queue => {
3743
- this.uploadCount.set(queue.length);
3744
- });
3745
- }
3746
- ngOnDestroy() {
3747
- console.log('🧹 [LayoutWithFloatingUploader] Component destroyed');
3748
- }
3749
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytLayoutWithFloatingUploaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3750
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CideLytLayoutWithFloatingUploaderComponent, isStandalone: true, selector: "cide-layout-with-floating-uploader", ngImport: i0, template: "<!-- Layout with Floating Uploader -->\r\n<div class=\"layout-container\">\r\n <!-- Main Content Slot -->\r\n <ng-content></ng-content>\r\n \r\n <!-- Floating File Uploader -->\r\n <cide-layout-floating-file-uploader></cide-layout-floating-file-uploader>\r\n</div>\r\n\r\n", styles: [".layout-container{position:relative;width:100%;height:100%;min-height:100vh}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CideLytFloatingFileUploaderComponent, selector: "cide-layout-floating-file-uploader" }] });
3751
- }
3752
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytLayoutWithFloatingUploaderComponent, decorators: [{
3753
- type: Component,
3754
- args: [{ selector: 'cide-layout-with-floating-uploader', standalone: true, imports: [
3755
- CommonModule,
3756
- CideLytFloatingFileUploaderComponent
3757
- ], template: "<!-- Layout with Floating Uploader -->\r\n<div class=\"layout-container\">\r\n <!-- Main Content Slot -->\r\n <ng-content></ng-content>\r\n \r\n <!-- Floating File Uploader -->\r\n <cide-layout-floating-file-uploader></cide-layout-floating-file-uploader>\r\n</div>\r\n\r\n", styles: [".layout-container{position:relative;width:100%;height:100%;min-height:100vh}\n"] }]
3758
- }], ctorParameters: () => [] });
3759
-
3760
- class CideLytFloatingUploadTriggerDirective {
3761
- elementRef = inject(ElementRef);
3762
- floatingUploadService = inject(CideLytFloatingUploadService);
3763
- userId = '';
3764
- constructor() {
3765
- console.log('🎯 [FloatingUploadTrigger] Directive initialized');
3766
- }
3767
- onFileChange(event) {
3768
- const input = event.target;
3769
- const files = input.files;
3770
- if (files && files.length > 0) {
3771
- console.log('📁 [FloatingUploadTrigger] Files selected:', files.length);
3772
- // Set user ID if provided
3773
- if (this.userId) {
3774
- this.floatingUploadService.setCurrentUserId(this.userId);
3775
- }
3776
- // Add files to floating uploader queue
3777
- this.floatingUploadService.addFilesToQueue(Array.from(files));
3778
- // Reset the input to allow selecting the same files again
3779
- input.value = '';
3780
- }
3781
- }
3782
- onDragOver(event) {
3783
- event.preventDefault();
3784
- event.stopPropagation();
3785
- }
3786
- onDragEnter(event) {
3787
- event.preventDefault();
3788
- event.stopPropagation();
3789
- }
3790
- onDrop(event) {
3791
- event.preventDefault();
3792
- event.stopPropagation();
3793
- const files = event.dataTransfer?.files;
3794
- if (files && files.length > 0) {
3795
- console.log('📁 [FloatingUploadTrigger] Files dropped:', files.length);
3796
- // Set user ID if provided
3797
- if (this.userId) {
3798
- this.floatingUploadService.setCurrentUserId(this.userId);
3766
+ async registerEntityRightsSharingComponent() {
3767
+ try {
3768
+ console.log('📦 Importing entity rights sharing component...');
3769
+ const module = await Promise.resolve().then(function () { return floatingEntityRightsSharing_component; });
3770
+ console.log('📦 Module imported:', module);
3771
+ console.log('📦 Component class:', module.CideLytFloatingEntityRightsSharingComponent);
3772
+ if (!module.CideLytFloatingEntityRightsSharingComponent) {
3773
+ throw new Error('Component class not found in module');
3799
3774
  }
3800
- // Add files to floating uploader queue
3801
- this.floatingUploadService.addFilesToQueue(Array.from(files));
3775
+ this.containerService.registerComponent('entity-rights-sharing', module.CideLytFloatingEntityRightsSharingComponent);
3776
+ console.log('✅ Entity rights sharing component registered successfully');
3777
+ console.log('📋 Available components after registration:', this.containerService.getRegisteredComponentIds());
3778
+ }
3779
+ catch (error) {
3780
+ console.error('❌ Failed to register entity rights sharing component:', error);
3781
+ console.error('❌ Error details:', error);
3802
3782
  }
3803
3783
  }
3804
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingUploadTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3805
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: CideLytFloatingUploadTriggerDirective, isStandalone: true, selector: "[cideFloatingUploadTrigger]", inputs: { userId: "userId" }, host: { listeners: { "change": "onFileChange($event)", "dragover": "onDragOver($event)", "dragenter": "onDragEnter($event)", "drop": "onDrop($event)" } }, ngImport: i0 });
3784
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingEntityRightsSharingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3785
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingEntityRightsSharingService, providedIn: 'root' });
3806
3786
  }
3807
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingUploadTriggerDirective, decorators: [{
3808
- type: Directive,
3787
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingEntityRightsSharingService, decorators: [{
3788
+ type: Injectable,
3809
3789
  args: [{
3810
- selector: '[cideFloatingUploadTrigger]',
3811
- standalone: true
3790
+ providedIn: 'root'
3812
3791
  }]
3813
- }], ctorParameters: () => [], propDecorators: { userId: [{
3814
- type: Input
3815
- }], onFileChange: [{
3816
- type: HostListener,
3817
- args: ['change', ['$event']]
3818
- }], onDragOver: [{
3819
- type: HostListener,
3820
- args: ['dragover', ['$event']]
3821
- }], onDragEnter: [{
3822
- type: HostListener,
3823
- args: ['dragenter', ['$event']]
3824
- }], onDrop: [{
3825
- type: HostListener,
3826
- args: ['drop', ['$event']]
3827
- }] } });
3792
+ }] });
3828
3793
 
3829
3794
  /*
3830
3795
  * Public API Surface of cloud-ide-layout
3831
3796
  */
3797
+ // Floating Container (moved to cloud-ide-element)
3798
+ // export * from './lib/components/floating-container';
3799
+ // Layout Components
3832
3800
 
3833
3801
  /**
3834
3802
  * Generated bundle index. Do not edit.
3835
3803
  */
3836
3804
 
3837
- 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, CideLytFloatingFileUploaderComponent as o, processThemeVariable as p, CideLytLayoutWithFloatingUploaderComponent as q, CideLytFloatingUploadService as r, setCSSVariable as s, themeFactory as t, CideLytFloatingUploadTriggerDirective as u };
3838
- //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-RD9NYgsO.mjs.map
3805
+ 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, CideLytFloatingEntityRightsSharingComponent as o, processThemeVariable as p, CideLytFloatingEntityRightsSharingService as q, setCSSVariable as s, themeFactory as t };
3806
+ //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-B7zJJ9zM.mjs.map