@flusys/ng-iam 1.1.0 → 1.2.0-rc.1
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/README.md +44 -1179
- package/fesm2022/flusys-ng-iam-action-form-page.component-Vc5Toouu.mjs +502 -0
- package/fesm2022/flusys-ng-iam-action-form-page.component-Vc5Toouu.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-action-list-page.component-UGKclpFx.mjs +348 -0
- package/fesm2022/flusys-ng-iam-action-list-page.component-UGKclpFx.mjs.map +1 -0
- package/fesm2022/{flusys-ng-iam-flusys-ng-iam-CJAQT60K.mjs → flusys-ng-iam-flusys-ng-iam-CrycDULz.mjs} +1814 -1622
- package/fesm2022/flusys-ng-iam-flusys-ng-iam-CrycDULz.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-iam-container.component-D0m8u6nu.mjs +105 -0
- package/fesm2022/flusys-ng-iam-iam-container.component-D0m8u6nu.mjs.map +1 -0
- package/fesm2022/{flusys-ng-iam-permission-page.component-DcgT7L3_.mjs → flusys-ng-iam-permission-page.component-x88X4AgJ.mjs} +38 -32
- package/fesm2022/flusys-ng-iam-permission-page.component-x88X4AgJ.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-role-form-page.component-InsxdriD.mjs +335 -0
- package/fesm2022/flusys-ng-iam-role-form-page.component-InsxdriD.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-role-list-page.component-8NGXCeSZ.mjs +389 -0
- package/fesm2022/flusys-ng-iam-role-list-page.component-8NGXCeSZ.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam.mjs +1 -1
- package/package.json +11 -10
- package/types/flusys-ng-iam.d.ts +53 -252
- package/fesm2022/flusys-ng-iam-action-form-page.component-eXpZNJ_H.mjs +0 -389
- package/fesm2022/flusys-ng-iam-action-form-page.component-eXpZNJ_H.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-action-list-page.component-BtJlGcTj.mjs +0 -262
- package/fesm2022/flusys-ng-iam-action-list-page.component-BtJlGcTj.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-flusys-ng-iam-CJAQT60K.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-iam-container.component-UYJjqYV9.mjs +0 -92
- package/fesm2022/flusys-ng-iam-iam-container.component-UYJjqYV9.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-permission-page.component-DcgT7L3_.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-role-form-page.component-D_AAEay2.mjs +0 -272
- package/fesm2022/flusys-ng-iam-role-form-page.component-D_AAEay2.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-role-list-page.component-D4J1by6Q.mjs +0 -299
- package/fesm2022/flusys-ng-iam-role-list-page.component-D4J1by6Q.mjs.map +0 -1
package/types/flusys-ng-iam.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IBaseEntity, ILogicNode, ApiResourceService, ISingleResponse, IProfilePermissionProvider, IProfileRoleInfo, IProfileActionInfo } from '@flusys/ng-shared';
|
|
1
|
+
import { IBaseEntity, ILogicNode, ApiResourceService, ISingleResponse, TranslateService, IProfilePermissionProvider, IProfileRoleInfo, IProfileActionInfo } from '@flusys/ng-shared';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { Provider } from '@angular/core';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { BaseApiService } from '@flusys/ng-core';
|
|
6
6
|
export { PermissionMode } from '@flusys/ng-core';
|
|
7
|
-
import * as
|
|
7
|
+
import * as __________flusys_ng_ui_types_flusys_ng_ui from '../../@flusys/ng-ui/types/flusys-ng-ui';
|
|
8
8
|
import { Routes } from '@angular/router';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -43,7 +43,6 @@ interface IRole extends IBaseEntity {
|
|
|
43
43
|
companyId: string | null;
|
|
44
44
|
isActive: boolean;
|
|
45
45
|
serial: number | null;
|
|
46
|
-
metadata: Record<string, unknown> | null;
|
|
47
46
|
}
|
|
48
47
|
interface ICreateRoleDto {
|
|
49
48
|
name: string;
|
|
@@ -51,7 +50,6 @@ interface ICreateRoleDto {
|
|
|
51
50
|
companyId?: string;
|
|
52
51
|
isActive?: boolean;
|
|
53
52
|
serial?: number;
|
|
54
|
-
metadata?: Record<string, unknown>;
|
|
55
53
|
}
|
|
56
54
|
interface IUpdateRoleDto extends Partial<ICreateRoleDto> {
|
|
57
55
|
id: string;
|
|
@@ -77,7 +75,6 @@ interface IAction extends IBaseEntity {
|
|
|
77
75
|
parentId: string | null;
|
|
78
76
|
serial: number | null;
|
|
79
77
|
isActive: boolean;
|
|
80
|
-
metadata: Record<string, unknown> | null;
|
|
81
78
|
}
|
|
82
79
|
interface IActionTreeDto extends IAction {
|
|
83
80
|
children: IActionTreeDto[];
|
|
@@ -91,7 +88,6 @@ interface ICreateActionDto {
|
|
|
91
88
|
parentId?: string;
|
|
92
89
|
serial?: number;
|
|
93
90
|
isActive?: boolean;
|
|
94
|
-
metadata?: Record<string, unknown>;
|
|
95
91
|
}
|
|
96
92
|
interface IUpdateActionDto extends Partial<ICreateActionDto> {
|
|
97
93
|
id: string;
|
|
@@ -151,7 +147,6 @@ interface IUserRoleResponseDto {
|
|
|
151
147
|
id: string;
|
|
152
148
|
userId: string;
|
|
153
149
|
roleId: string;
|
|
154
|
-
roleCode: string;
|
|
155
150
|
roleName: string;
|
|
156
151
|
branchId: string | null;
|
|
157
152
|
createdAt: Date;
|
|
@@ -181,6 +176,7 @@ interface IPermissionOperationResultDto {
|
|
|
181
176
|
added: number;
|
|
182
177
|
removed: number;
|
|
183
178
|
message: string;
|
|
179
|
+
messageKey?: string;
|
|
184
180
|
prerequisiteErrors?: IPrerequisiteValidationError[];
|
|
185
181
|
}
|
|
186
182
|
interface IGetUserActionsDto {
|
|
@@ -198,6 +194,8 @@ interface IGetMyPermissionsDto {
|
|
|
198
194
|
/** Maximum items for dropdown lists (companies, roles, users, branches) */
|
|
199
195
|
declare const MAX_DROPDOWN_ITEMS = 100;
|
|
200
196
|
|
|
197
|
+
declare const IAM_MESSAGES: Record<string, string>;
|
|
198
|
+
|
|
201
199
|
declare class RoleApiService extends ApiResourceService<IUpdateRoleDto, IRole> {
|
|
202
200
|
constructor();
|
|
203
201
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RoleApiService, never>;
|
|
@@ -219,6 +217,8 @@ declare class ActionApiService extends ApiResourceService<IUpdateActionDto, IAct
|
|
|
219
217
|
declare class ActionPermissionLogicService {
|
|
220
218
|
private readonly confirmationService;
|
|
221
219
|
private readonly messageService;
|
|
220
|
+
private readonly translateAdapter;
|
|
221
|
+
private t;
|
|
222
222
|
/** Handle checking an action with prerequisite validation (recursive deep scan) */
|
|
223
223
|
handleCheck(action: IAction, currentSelection: Record<string, boolean>, allActions: IAction[], onUpdate: (newSelection: Record<string, boolean>) => void, onCancel: (previousState: Record<string, boolean>) => void): void;
|
|
224
224
|
/** Handle unchecking an action with dependency detection */
|
|
@@ -338,64 +338,20 @@ declare class LogicBuilderComponent {
|
|
|
338
338
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LogicBuilderComponent, "lib-logic-builder", never, { "logic": { "alias": "logic"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; }, { "logicChange": "logicChange"; }, never, never, true, never>;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
* Manages role action permissions with hierarchical tree view and intelligent dependency management.
|
|
345
|
-
*
|
|
346
|
-
* **Architecture:**
|
|
347
|
-
* - Presentation: TreeTable for hierarchical display
|
|
348
|
-
* - Business Logic: Flat action list for selection/validation
|
|
349
|
-
* - State: Signals with computed dependencies
|
|
350
|
-
*
|
|
351
|
-
* **Core Features:**
|
|
352
|
-
* - Role dropdown with async loading
|
|
353
|
-
* - Hierarchical TreeTable with expand/collapse
|
|
354
|
-
* - Action permission assignment (add/remove)
|
|
355
|
-
* - Real-time change tracking
|
|
356
|
-
*
|
|
357
|
-
* **Dependency Management:**
|
|
358
|
-
* - Auto-selection with AND/OR logic
|
|
359
|
-
* - Dependency detection on uncheck
|
|
360
|
-
* - Cascade remove for AND dependencies
|
|
361
|
-
* - Visual warnings for unmet prerequisites
|
|
362
|
-
* - Pre-save validation with auto-fix
|
|
363
|
-
*
|
|
364
|
-
* **Performance:**
|
|
365
|
-
* - OnPush change detection
|
|
366
|
-
* - Computed signals for reactive updates
|
|
367
|
-
* - Memoized prerequisite validation
|
|
368
|
-
* - AbortController for request cancellation
|
|
369
|
-
*
|
|
370
|
-
* @example
|
|
371
|
-
* ```html
|
|
372
|
-
* <flusys-role-action-selector />
|
|
373
|
-
* ```
|
|
374
|
-
*/
|
|
375
|
-
declare class RoleActionSelectorComponent {
|
|
376
|
-
readonly ROLE_ACTION_PERMISSIONS: {
|
|
377
|
-
readonly READ: "role-action.read";
|
|
378
|
-
readonly ASSIGN: "role-action.assign";
|
|
379
|
-
};
|
|
380
|
-
private readonly destroyRef;
|
|
381
|
-
private readonly roleApi;
|
|
382
|
-
private readonly actionApi;
|
|
383
|
-
private readonly permissionApi;
|
|
384
|
-
private readonly messageService;
|
|
385
|
-
private readonly permissionLogic;
|
|
386
|
-
readonly selectedRoleId: _angular_core.WritableSignal<string | undefined>;
|
|
387
|
-
readonly roles: _angular_core.WritableSignal<IRole[]>;
|
|
341
|
+
declare abstract class BaseActionSelectorComponent {
|
|
342
|
+
protected readonly permissionLogic: ActionPermissionLogicService;
|
|
343
|
+
protected readonly translateAdapter: TranslateService | null;
|
|
388
344
|
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
389
345
|
readonly saving: _angular_core.WritableSignal<boolean>;
|
|
390
|
-
|
|
346
|
+
protected readonly _actions: _angular_core.WritableSignal<IAction[]>;
|
|
391
347
|
readonly actions: _angular_core.Signal<IAction[]>;
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
348
|
+
protected readonly _actionsTree: _angular_core.WritableSignal<IActionTreeDto[]>;
|
|
349
|
+
protected readonly actionsTree: _angular_core.Signal<IActionTreeDto[]>;
|
|
350
|
+
protected readonly _selectionMap: _angular_core.WritableSignal<Record<string, boolean>>;
|
|
395
351
|
readonly selectionMap: _angular_core.Signal<Record<string, boolean>>;
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
readonly treeNodes: _angular_core.Signal<
|
|
352
|
+
protected readonly _initialSelection: _angular_core.WritableSignal<Record<string, boolean>>;
|
|
353
|
+
protected readonly initialSelection: _angular_core.Signal<Record<string, boolean>>;
|
|
354
|
+
readonly treeNodes: _angular_core.Signal<__________flusys_ng_ui_types_flusys_ng_ui.TreeNode<IAction>[]>;
|
|
399
355
|
readonly allSelected: _angular_core.Signal<boolean>;
|
|
400
356
|
readonly hasChanges: _angular_core.Signal<boolean>;
|
|
401
357
|
readonly actionsWithUnmetPrerequisites: _angular_core.Signal<Set<string>>;
|
|
@@ -403,78 +359,46 @@ declare class RoleActionSelectorComponent {
|
|
|
403
359
|
readonly pendingAdd: _angular_core.Signal<IAction[]>;
|
|
404
360
|
readonly pendingRemove: _angular_core.Signal<IAction[]>;
|
|
405
361
|
readonly canSave: _angular_core.Signal<boolean>;
|
|
406
|
-
|
|
407
|
-
constructor();
|
|
408
|
-
/**
|
|
409
|
-
* Load roles from API
|
|
410
|
-
*/
|
|
411
|
-
private loadRoles;
|
|
412
|
-
/**
|
|
413
|
-
* Load actions and assignments for selected role
|
|
414
|
-
*/
|
|
415
|
-
private onRoleChange;
|
|
416
|
-
/**
|
|
417
|
-
* Get tooltip for action checkbox
|
|
418
|
-
*/
|
|
419
|
-
getTooltip(action: IAction): string;
|
|
420
|
-
/**
|
|
421
|
-
* Check if action has unmet prerequisites
|
|
422
|
-
*/
|
|
362
|
+
protected translate(key: string, vars?: Record<string, string | number>): string;
|
|
423
363
|
hasUnmetPrerequisites(action: IAction): boolean;
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
*/
|
|
364
|
+
getTooltip(action: IAction): string;
|
|
365
|
+
protected abstract getDefaultTooltip(isSelected: boolean): string;
|
|
427
366
|
onActionToggle(action: IAction, newValue: boolean): void;
|
|
428
367
|
toggleAll(): void;
|
|
429
368
|
selectAll(): void;
|
|
430
369
|
deselectAll(): void;
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
370
|
+
protected setAllSelection(value: boolean): void;
|
|
371
|
+
protected buildSelectionMap(actions: IAction[], predicate: (action: IAction) => boolean): Record<string, boolean>;
|
|
372
|
+
protected buildPayloadItems(): Array<{
|
|
373
|
+
id: string;
|
|
374
|
+
action: PermissionAction;
|
|
375
|
+
}>;
|
|
376
|
+
protected resetState(): void;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
declare class RoleActionSelectorComponent extends BaseActionSelectorComponent {
|
|
380
|
+
readonly ROLE_ACTION_PERMISSIONS: {
|
|
381
|
+
readonly READ: "role-action.read";
|
|
382
|
+
readonly ASSIGN: "role-action.assign";
|
|
383
|
+
};
|
|
384
|
+
private readonly destroyRef;
|
|
385
|
+
private readonly roleApi;
|
|
386
|
+
private readonly actionApi;
|
|
387
|
+
private readonly permissionApi;
|
|
388
|
+
private readonly messageService;
|
|
389
|
+
readonly selectedRoleId: _angular_core.WritableSignal<string | undefined>;
|
|
390
|
+
readonly roles: _angular_core.WritableSignal<IRole[]>;
|
|
391
|
+
private loadDataAbortController;
|
|
392
|
+
constructor();
|
|
393
|
+
protected getDefaultTooltip(isSelected: boolean): string;
|
|
394
|
+
private loadRoles;
|
|
395
|
+
private onRoleChange;
|
|
435
396
|
saveChanges(): Promise<void>;
|
|
436
|
-
private applySelection;
|
|
437
|
-
private buildPayloadItems;
|
|
438
|
-
private resetState;
|
|
439
397
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RoleActionSelectorComponent, never>;
|
|
440
398
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RoleActionSelectorComponent, "flusys-role-action-selector", never, {}, {}, never, never, true, never>;
|
|
441
399
|
}
|
|
442
400
|
|
|
443
|
-
|
|
444
|
-
* Company-Action Selector Component
|
|
445
|
-
*
|
|
446
|
-
* Manages company action whitelisting with hierarchical tree view and intelligent dependency management.
|
|
447
|
-
*
|
|
448
|
-
* **Architecture:**
|
|
449
|
-
* - Presentation: TreeTable for hierarchical display
|
|
450
|
-
* - Business Logic: Flat action list for selection/validation
|
|
451
|
-
* - State: Signals with computed dependencies
|
|
452
|
-
*
|
|
453
|
-
* **Core Features:**
|
|
454
|
-
* - Company dropdown with async loading
|
|
455
|
-
* - Hierarchical TreeTable with expand/collapse
|
|
456
|
-
* - Action whitelist management (add/remove)
|
|
457
|
-
* - Real-time change tracking
|
|
458
|
-
*
|
|
459
|
-
* **Dependency Management:**
|
|
460
|
-
* - Auto-selection with AND/OR logic
|
|
461
|
-
* - Dependency detection on uncheck
|
|
462
|
-
* - Cascade remove for AND dependencies
|
|
463
|
-
* - Visual warnings for unmet prerequisites
|
|
464
|
-
* - Pre-save validation with auto-fix
|
|
465
|
-
*
|
|
466
|
-
* **Performance:**
|
|
467
|
-
* - OnPush change detection
|
|
468
|
-
* - Computed signals for reactive updates
|
|
469
|
-
* - Memoized prerequisite validation
|
|
470
|
-
* - AbortController for request cancellation
|
|
471
|
-
*
|
|
472
|
-
* @example
|
|
473
|
-
* ```html
|
|
474
|
-
* <flusys-company-action-selector />
|
|
475
|
-
* ```
|
|
476
|
-
*/
|
|
477
|
-
declare class CompanyActionSelectorComponent {
|
|
401
|
+
declare class CompanyActionSelectorComponent extends BaseActionSelectorComponent {
|
|
478
402
|
readonly COMPANY_ACTION_PERMISSIONS: {
|
|
479
403
|
readonly READ: "company-action.read";
|
|
480
404
|
readonly ASSIGN: "company-action.assign";
|
|
@@ -484,66 +408,16 @@ declare class CompanyActionSelectorComponent {
|
|
|
484
408
|
private readonly permissionApi;
|
|
485
409
|
private readonly messageService;
|
|
486
410
|
private readonly confirmationService;
|
|
487
|
-
private readonly permissionLogic;
|
|
488
411
|
private readonly destroyRef;
|
|
489
412
|
readonly selectedCompanyId: _angular_core.WritableSignal<string | undefined>;
|
|
490
413
|
readonly companies: _angular_core.WritableSignal<ICompany[]>;
|
|
491
|
-
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
492
|
-
readonly saving: _angular_core.WritableSignal<boolean>;
|
|
493
|
-
private readonly _actions;
|
|
494
|
-
readonly actions: _angular_core.Signal<IAction[]>;
|
|
495
|
-
private readonly _actionsTree;
|
|
496
|
-
private readonly actionsTree;
|
|
497
|
-
private readonly _selectionMap;
|
|
498
|
-
readonly selectionMap: _angular_core.Signal<Record<string, boolean>>;
|
|
499
|
-
private readonly _initialSelection;
|
|
500
|
-
private readonly initialSelection;
|
|
501
|
-
readonly treeNodes: _angular_core.Signal<primeng_api.TreeNode<IAction>[]>;
|
|
502
|
-
readonly allSelected: _angular_core.Signal<boolean>;
|
|
503
|
-
readonly hasChanges: _angular_core.Signal<boolean>;
|
|
504
|
-
readonly actionsWithUnmetPrerequisites: _angular_core.Signal<Set<string>>;
|
|
505
|
-
readonly invalidActionsCount: _angular_core.Signal<number>;
|
|
506
|
-
readonly pendingAdd: _angular_core.Signal<IAction[]>;
|
|
507
|
-
readonly pendingRemove: _angular_core.Signal<IAction[]>;
|
|
508
|
-
readonly canSave: _angular_core.Signal<boolean>;
|
|
509
414
|
private loadDataAbortController;
|
|
510
415
|
constructor();
|
|
511
|
-
|
|
512
|
-
* Load companies from API
|
|
513
|
-
*/
|
|
416
|
+
protected getDefaultTooltip(isSelected: boolean): string;
|
|
514
417
|
private loadCompanies;
|
|
515
|
-
/**
|
|
516
|
-
* Load actions and assignments for selected company
|
|
517
|
-
*/
|
|
518
418
|
private loadData;
|
|
519
|
-
/**
|
|
520
|
-
* Check if action has unmet prerequisites
|
|
521
|
-
*/
|
|
522
|
-
hasUnmetPrerequisites(action: IAction): boolean;
|
|
523
|
-
/**
|
|
524
|
-
* Get tooltip for action checkbox
|
|
525
|
-
*/
|
|
526
|
-
getTooltip(action: IAction): string;
|
|
527
|
-
/**
|
|
528
|
-
* Handle action checkbox toggle
|
|
529
|
-
*/
|
|
530
|
-
onActionToggle(action: IAction, newValue: boolean): void;
|
|
531
|
-
toggleAll(): void;
|
|
532
|
-
selectAll(): void;
|
|
533
|
-
deselectAll(): void;
|
|
534
|
-
private setAllSelection;
|
|
535
|
-
/**
|
|
536
|
-
* Save changes to backend
|
|
537
|
-
*/
|
|
538
419
|
saveChanges(): Promise<void>;
|
|
539
|
-
/**
|
|
540
|
-
* Handle backend prerequisite validation errors
|
|
541
|
-
* Shows confirmation dialog with auto-fix option
|
|
542
|
-
*/
|
|
543
420
|
private handleBackendPrerequisiteErrors;
|
|
544
|
-
private resetState;
|
|
545
|
-
private buildSelectionMap;
|
|
546
|
-
private buildPayloadItems;
|
|
547
421
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CompanyActionSelectorComponent, never>;
|
|
548
422
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CompanyActionSelectorComponent, "flusys-company-action-selector", never, {}, {}, never, never, true, never>;
|
|
549
423
|
}
|
|
@@ -569,7 +443,6 @@ declare class CompanyActionSelectorComponent {
|
|
|
569
443
|
* - Branch-specific: branchId = selected value
|
|
570
444
|
*
|
|
571
445
|
* **Performance:**
|
|
572
|
-
* - OnPush change detection
|
|
573
446
|
* - Computed signals for reactive updates
|
|
574
447
|
* - Branch filtering on company context change
|
|
575
448
|
*
|
|
@@ -589,6 +462,8 @@ declare class UserRoleSelectorComponent {
|
|
|
589
462
|
private readonly roleApi;
|
|
590
463
|
private readonly permissionApi;
|
|
591
464
|
private readonly messageService;
|
|
465
|
+
private readonly translateAdapter;
|
|
466
|
+
private translate;
|
|
592
467
|
readonly selectedUserId: _angular_core.WritableSignal<string | null>;
|
|
593
468
|
readonly selectedBranchId: _angular_core.WritableSignal<string | undefined>;
|
|
594
469
|
readonly branches: _angular_core.WritableSignal<IBranch[]>;
|
|
@@ -652,38 +527,7 @@ declare class UserRoleSelectorComponent {
|
|
|
652
527
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserRoleSelectorComponent, "flusys-user-role-selector", never, {}, {}, never, never, true, never>;
|
|
653
528
|
}
|
|
654
529
|
|
|
655
|
-
|
|
656
|
-
* User-Action Selector Component
|
|
657
|
-
*
|
|
658
|
-
* Manages direct user action permissions with hierarchical tree view.
|
|
659
|
-
*
|
|
660
|
-
* **Architecture:**
|
|
661
|
-
* - Presentation: TreeTable for hierarchical display
|
|
662
|
-
* - Business Logic: Flat action list for selection/validation
|
|
663
|
-
* - State: Signals with computed dependencies
|
|
664
|
-
*
|
|
665
|
-
* **Core Features:**
|
|
666
|
-
* - User dropdown with async loading
|
|
667
|
-
* - Branch selector (if company feature enabled)
|
|
668
|
-
* - Hierarchical TreeTable with expand/collapse
|
|
669
|
-
* - Direct user-action permission assignment (bypassing roles)
|
|
670
|
-
* - Real-time change tracking
|
|
671
|
-
*
|
|
672
|
-
* **Granularity:**
|
|
673
|
-
* - Company-wide: branchId = undefined
|
|
674
|
-
* - Branch-specific: branchId = selected value
|
|
675
|
-
*
|
|
676
|
-
* **Performance:**
|
|
677
|
-
* - OnPush change detection
|
|
678
|
-
* - Computed signals for reactive updates
|
|
679
|
-
* - Branch filtering on company context change
|
|
680
|
-
*
|
|
681
|
-
* @example
|
|
682
|
-
* ```html
|
|
683
|
-
* <flusys-user-action-selector />
|
|
684
|
-
* ```
|
|
685
|
-
*/
|
|
686
|
-
declare class UserActionSelectorComponent {
|
|
530
|
+
declare class UserActionSelectorComponent extends BaseActionSelectorComponent {
|
|
687
531
|
readonly USER_ACTION_PERMISSIONS: {
|
|
688
532
|
readonly READ: "user-action.read";
|
|
689
533
|
readonly ASSIGN: "user-action.assign";
|
|
@@ -693,61 +537,18 @@ declare class UserActionSelectorComponent {
|
|
|
693
537
|
private readonly userPermissionProvider;
|
|
694
538
|
private readonly actionApi;
|
|
695
539
|
private readonly permissionApi;
|
|
696
|
-
private readonly permissionLogic;
|
|
697
540
|
private readonly messageService;
|
|
698
541
|
readonly selectedUserId: _angular_core.WritableSignal<string | null>;
|
|
699
542
|
readonly selectedBranchId: _angular_core.WritableSignal<string | undefined>;
|
|
700
543
|
readonly branches: _angular_core.WritableSignal<IBranch[]>;
|
|
701
|
-
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
702
|
-
readonly saving: _angular_core.WritableSignal<boolean>;
|
|
703
|
-
private readonly _actions;
|
|
704
|
-
readonly actions: _angular_core.Signal<IAction[]>;
|
|
705
|
-
private readonly _actionsTree;
|
|
706
|
-
private readonly actionsTree;
|
|
707
|
-
private readonly _selectionMap;
|
|
708
|
-
readonly selectionMap: _angular_core.Signal<Record<string, boolean>>;
|
|
709
|
-
private readonly _initialSelection;
|
|
710
|
-
private readonly initialSelection;
|
|
711
544
|
private readonly isCompanyFeatureActive;
|
|
712
545
|
readonly showBranchSelector: _angular_core.Signal<boolean>;
|
|
713
546
|
readonly filteredBranches: _angular_core.Signal<IBranch[]>;
|
|
714
|
-
readonly treeNodes: _angular_core.Signal<primeng_api.TreeNode<IAction>[]>;
|
|
715
|
-
readonly allSelected: _angular_core.Signal<boolean>;
|
|
716
|
-
readonly hasChanges: _angular_core.Signal<boolean>;
|
|
717
|
-
readonly actionsWithUnmetPrerequisites: _angular_core.Signal<Set<string>>;
|
|
718
|
-
readonly invalidActionsCount: _angular_core.Signal<number>;
|
|
719
|
-
readonly pendingAdd: _angular_core.Signal<IAction[]>;
|
|
720
|
-
readonly pendingRemove: _angular_core.Signal<IAction[]>;
|
|
721
|
-
readonly canSave: _angular_core.Signal<boolean>;
|
|
722
547
|
constructor();
|
|
723
|
-
|
|
724
|
-
* Load user's permitted branches
|
|
725
|
-
*/
|
|
548
|
+
protected getDefaultTooltip(isSelected: boolean): string;
|
|
726
549
|
private loadUserBranches;
|
|
727
|
-
/**
|
|
728
|
-
* Load actions and assignments for selected user
|
|
729
|
-
*/
|
|
730
550
|
private loadData;
|
|
731
|
-
/**
|
|
732
|
-
* Get tooltip for action checkbox
|
|
733
|
-
*/
|
|
734
|
-
getTooltip(action: IAction): string;
|
|
735
|
-
/**
|
|
736
|
-
* Check if action has unmet prerequisites
|
|
737
|
-
*/
|
|
738
|
-
hasUnmetPrerequisites(action: IAction): boolean;
|
|
739
|
-
/**
|
|
740
|
-
* Handle action toggle with dependency management
|
|
741
|
-
*/
|
|
742
|
-
onActionToggle(action: IAction, newValue: boolean): void;
|
|
743
|
-
toggleAll(): void;
|
|
744
|
-
selectAll(): void;
|
|
745
|
-
deselectAll(): void;
|
|
746
|
-
private setAllActions;
|
|
747
551
|
saveChanges(): Promise<void>;
|
|
748
|
-
private resetState;
|
|
749
|
-
private buildSelectionMap;
|
|
750
|
-
private buildPermissionItems;
|
|
751
552
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserActionSelectorComponent, never>;
|
|
752
553
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserActionSelectorComponent, "flusys-user-action-selector", never, {}, {}, never, never, true, never>;
|
|
753
554
|
}
|
|
@@ -789,5 +590,5 @@ declare function provideIamProviders(): Provider[];
|
|
|
789
590
|
*/
|
|
790
591
|
declare const IAM_ROUTES: Routes;
|
|
791
592
|
|
|
792
|
-
export { ActionApiService, ActionPermissionLogicService, ActionType, CompanyActionSelectorComponent, IAM_ROUTES, LogicBuilderComponent, MAX_DROPDOWN_ITEMS, MyPermissionsApiService, PermissionApiService, PermissionStateService, ProfilePermissionProviderAdapter, RoleActionSelectorComponent, RoleApiService, UserActionSelectorComponent, UserRoleSelectorComponent, provideIamProviders };
|
|
593
|
+
export { ActionApiService, ActionPermissionLogicService, ActionType, CompanyActionSelectorComponent, IAM_MESSAGES, IAM_ROUTES, LogicBuilderComponent, MAX_DROPDOWN_ITEMS, MyPermissionsApiService, PermissionApiService, PermissionStateService, ProfilePermissionProviderAdapter, RoleActionSelectorComponent, RoleApiService, UserActionSelectorComponent, UserRoleSelectorComponent, provideIamProviders };
|
|
793
594
|
export type { IAction, IActionTreeDto, IAssignCompanyActionsDto, IAssignRoleActionsDto, IAssignUserActionsDto, IAssignUserRolesDto, IBranch, ICompany, ICompanyActionResponseDto, ICreateActionDto, ICreateRoleDto, IGetMyPermissionsDto, IGetRoleActionsDto, IGetUserActionsDto, IGetUserRolesDto, IMyPermissionsResponseDto, IPermissionItemDto, IPermissionOperationResultDto, IPrerequisiteActionDto, IPrerequisiteValidationError, IRole, IRoleActionResponseDto, IRoleQueryDto, IUpdateActionDto, IUpdateRoleDto, IUser, IUserActionResponseDto, IUserRoleResponseDto, PermissionAction };
|