cloud-ide-layout 1.0.23 → 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.
- package/fesm2022/{cloud-ide-layout-cloud-ide-layout-urOTUFvE.mjs → cloud-ide-layout-cloud-ide-layout-B7zJJ9zM.mjs} +526 -13
- package/fesm2022/cloud-ide-layout-cloud-ide-layout-B7zJJ9zM.mjs.map +1 -0
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-B-VlqH0O.mjs → cloud-ide-layout-drawer-theme.component-gmPE1a4W.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-B-VlqH0O.mjs.map → cloud-ide-layout-drawer-theme.component-gmPE1a4W.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-DtB5EqE3.mjs → cloud-ide-layout-home-wrapper.component-iPkvBOgE.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-DtB5EqE3.mjs.map → cloud-ide-layout-home-wrapper.component-iPkvBOgE.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-B4p_uGox.mjs → cloud-ide-layout-sidedrawer-notes.component-OKwCnhEf.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-B4p_uGox.mjs.map → cloud-ide-layout-sidedrawer-notes.component-OKwCnhEf.mjs.map} +1 -1
- package/fesm2022/cloud-ide-layout.mjs +1 -1
- package/index.d.ts +49 -3
- package/package.json +1 -1
- package/fesm2022/cloud-ide-layout-cloud-ide-layout-urOTUFvE.mjs.map +0 -1
|
@@ -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 } 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,12 +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 * as i2$1 from '@angular/forms';
|
|
17
|
+
import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
|
|
16
18
|
|
|
17
19
|
class CloudIdeLayoutService {
|
|
18
20
|
constructor() { }
|
|
@@ -2651,8 +2653,8 @@ class CideLytSidedrawerWrapperComponent {
|
|
|
2651
2653
|
}
|
|
2652
2654
|
ngOnInit() {
|
|
2653
2655
|
// Initialize the component map (You'd likely populate this from a config or service)
|
|
2654
|
-
this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-
|
|
2655
|
-
this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-
|
|
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);
|
|
2656
2658
|
}
|
|
2657
2659
|
async loadComponent(configFor) {
|
|
2658
2660
|
console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
|
|
@@ -2996,15 +2998,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
2996
2998
|
|
|
2997
2999
|
class CloudIdeLayoutComponent {
|
|
2998
3000
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CloudIdeLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2999
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CloudIdeLayoutComponent, isStandalone: true, selector: "cide-lyt-wrapper", ngImport: i0, template: `
|
|
3000
|
-
<cide-lyt-layout-wrapper></cide-lyt-layout-wrapper>
|
|
3001
|
-
|
|
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" }] });
|
|
3002
3010
|
}
|
|
3003
3011
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CloudIdeLayoutComponent, decorators: [{
|
|
3004
3012
|
type: Component,
|
|
3005
|
-
args: [{ selector: 'cide-lyt-wrapper', standalone: true, template: `
|
|
3006
|
-
<cide-lyt-layout-wrapper></cide-lyt-layout-wrapper>
|
|
3007
|
-
|
|
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
|
+
] }]
|
|
3008
3026
|
}] });
|
|
3009
3027
|
|
|
3010
3028
|
var cloudIdeLayout_component = /*#__PURE__*/Object.freeze({
|
|
@@ -3024,7 +3042,7 @@ const layoutControlPannelChildRoutes = [{
|
|
|
3024
3042
|
},
|
|
3025
3043
|
{
|
|
3026
3044
|
path: "home",
|
|
3027
|
-
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-
|
|
3045
|
+
loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-iPkvBOgE.mjs').then(c => c.CideLytHomeWrapperComponent),
|
|
3028
3046
|
canActivate: [authGuard],
|
|
3029
3047
|
data: {
|
|
3030
3048
|
reuseTab: true, // For CustomRouteReuseStrategy
|
|
@@ -3281,13 +3299,508 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
3281
3299
|
}]
|
|
3282
3300
|
}] });
|
|
3283
3301
|
|
|
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]
|
|
3325
|
+
});
|
|
3326
|
+
}
|
|
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);
|
|
3352
|
+
}
|
|
3353
|
+
catch (error) {
|
|
3354
|
+
console.error('Error loading entities:', error);
|
|
3355
|
+
}
|
|
3356
|
+
finally {
|
|
3357
|
+
this.entitiesLoading.set(false);
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3360
|
+
selectEntity(entityId) {
|
|
3361
|
+
this.selectedEntityId.set(entityId);
|
|
3362
|
+
this.loadAccessPassData();
|
|
3363
|
+
}
|
|
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
|
+
});
|
|
3378
|
+
}
|
|
3379
|
+
catch (error) {
|
|
3380
|
+
console.error('Error loading access pass data:', error);
|
|
3381
|
+
}
|
|
3382
|
+
finally {
|
|
3383
|
+
this.accessPassLoading.set(false);
|
|
3384
|
+
}
|
|
3385
|
+
}
|
|
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);
|
|
3397
|
+
}
|
|
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);
|
|
3720
|
+
/**
|
|
3721
|
+
* Show entity rights sharing in floating container
|
|
3722
|
+
*/
|
|
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;
|
|
3756
|
+
}
|
|
3757
|
+
/**
|
|
3758
|
+
* Hide entity rights sharing
|
|
3759
|
+
*/
|
|
3760
|
+
hide() {
|
|
3761
|
+
this.containerService.hide('entity-rights-sharing-main');
|
|
3762
|
+
}
|
|
3763
|
+
/**
|
|
3764
|
+
* Register the entity rights sharing component
|
|
3765
|
+
*/
|
|
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');
|
|
3774
|
+
}
|
|
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);
|
|
3782
|
+
}
|
|
3783
|
+
}
|
|
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' });
|
|
3786
|
+
}
|
|
3787
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingEntityRightsSharingService, decorators: [{
|
|
3788
|
+
type: Injectable,
|
|
3789
|
+
args: [{
|
|
3790
|
+
providedIn: 'root'
|
|
3791
|
+
}]
|
|
3792
|
+
}] });
|
|
3793
|
+
|
|
3284
3794
|
/*
|
|
3285
3795
|
* Public API Surface of cloud-ide-layout
|
|
3286
3796
|
*/
|
|
3797
|
+
// Floating Container (moved to cloud-ide-element)
|
|
3798
|
+
// export * from './lib/components/floating-container';
|
|
3799
|
+
// Layout Components
|
|
3287
3800
|
|
|
3288
3801
|
/**
|
|
3289
3802
|
* Generated bundle index. Do not edit.
|
|
3290
3803
|
*/
|
|
3291
3804
|
|
|
3292
|
-
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 };
|
|
3293
|
-
//# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-
|
|
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
|