@flusys/ng-iam 9.1.0-rc.1 → 9.1.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/fesm2022/flusys-ng-iam-action-form-page.component-DJ-A1gc2.mjs +685 -0
- package/fesm2022/flusys-ng-iam-action-form-page.component-DJ-A1gc2.mjs.map +1 -0
- package/fesm2022/{flusys-ng-iam-action-list-page.component-Cf4Dhh5S.mjs → flusys-ng-iam-action-list-page.component-Br0PbgRa.mjs} +369 -166
- package/fesm2022/flusys-ng-iam-action-list-page.component-Br0PbgRa.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-iam-container.component-CIdxVCSW.mjs +141 -0
- package/fesm2022/flusys-ng-iam-iam-container.component-CIdxVCSW.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-permission-api.service-C7-Yxvz8.mjs +76 -0
- package/fesm2022/flusys-ng-iam-permission-api.service-C7-Yxvz8.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-permission-page.component-BlNt83uR.mjs +306 -0
- package/fesm2022/flusys-ng-iam-permission-page.component-BlNt83uR.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-role-api.service-OwPgmSFc.mjs +33 -0
- package/fesm2022/flusys-ng-iam-role-api.service-OwPgmSFc.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-role-form-page.component-DnkWkbTF.mjs +427 -0
- package/fesm2022/flusys-ng-iam-role-form-page.component-DnkWkbTF.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-role-list-page.component-BCO_gQ8k.mjs +685 -0
- package/fesm2022/flusys-ng-iam-role-list-page.component-BCO_gQ8k.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-tree-utils-B1pBG4At.mjs +110 -0
- package/fesm2022/flusys-ng-iam-tree-utils-B1pBG4At.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-user-action-selector.component-CAXEmJWx.mjs +4592 -0
- package/fesm2022/flusys-ng-iam-user-action-selector.component-CAXEmJWx.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam.mjs +2051 -2
- package/fesm2022/flusys-ng-iam.mjs.map +1 -1
- package/package.json +5 -5
- package/types/flusys-ng-iam.d.ts +621 -604
- package/fesm2022/flusys-ng-iam-action-form-page.component-Dn0TD1Zu.mjs +0 -509
- package/fesm2022/flusys-ng-iam-action-form-page.component-Dn0TD1Zu.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-action-list-page.component-Cf4Dhh5S.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-flusys-ng-iam-Y7U2lGZk.mjs +0 -5584
- package/fesm2022/flusys-ng-iam-flusys-ng-iam-Y7U2lGZk.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-iam-container.component-XBoIeQ0t.mjs +0 -105
- package/fesm2022/flusys-ng-iam-iam-container.component-XBoIeQ0t.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-permission-page.component-CCAQuZSJ.mjs +0 -204
- package/fesm2022/flusys-ng-iam-permission-page.component-CCAQuZSJ.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-role-form-page.component-EFjxhBRY.mjs +0 -352
- package/fesm2022/flusys-ng-iam-role-form-page.component-EFjxhBRY.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-role-list-page.component-DBfhjdkM.mjs +0 -486
- package/fesm2022/flusys-ng-iam-role-list-page.component-DBfhjdkM.mjs.map +0 -1
package/types/flusys-ng-iam.d.ts
CHANGED
|
@@ -1,316 +1,303 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
companyId?: string;
|
|
48
|
-
isActive?: boolean;
|
|
1
|
+
import { ActionScope, ApiResourceService, IActionBasicInfo, IActionProvider, IBaseEntity, IBranchBasicInfo, ICompanyBasicInfo, ILogicNode, IProfileActionInfo, IProfilePermissionProvider, IProfileRoleInfo, ISingleResponse, TranslateService } from "@flusys/ng-shared";
|
|
2
|
+
import { BaseApiService, PermissionMode } from "@flusys/ng-core";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { Provider } from "@angular/core";
|
|
5
|
+
import { Observable } from "rxjs";
|
|
6
|
+
import { ConfirmationService } from "@flusys/ng-ui";
|
|
7
|
+
import { Routes } from "@angular/router";
|
|
8
|
+
export interface ICompany {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
slug?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IUser {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
email: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IBranch {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
companyId: string;
|
|
22
|
+
parentId?: string | null;
|
|
23
|
+
serial?: number | null;
|
|
24
|
+
displayParentId?: string | null;
|
|
25
|
+
}
|
|
26
|
+
export interface IRole extends IBaseEntity {
|
|
27
|
+
readOnly: boolean;
|
|
28
|
+
name: string;
|
|
29
|
+
description: string | null;
|
|
30
|
+
companyId: string | null;
|
|
31
|
+
isActive: boolean;
|
|
32
|
+
serial: number | null;
|
|
33
|
+
}
|
|
34
|
+
export interface ICreateRoleDto {
|
|
35
|
+
name: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
companyId?: string;
|
|
38
|
+
isActive?: boolean;
|
|
39
|
+
serial?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface IUpdateRoleDto extends Partial<ICreateRoleDto> {
|
|
42
|
+
id: string;
|
|
43
|
+
}
|
|
44
|
+
export interface IRoleQueryDto {
|
|
45
|
+
companyId?: string;
|
|
46
|
+
isActive?: boolean;
|
|
49
47
|
}
|
|
50
|
-
|
|
51
48
|
/** Must match backend ActionType enum */
|
|
52
|
-
declare enum ActionType {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
interface IAction extends IBaseEntity {
|
|
58
|
-
|
|
49
|
+
export declare enum ActionType {
|
|
50
|
+
BACKEND = "backend",
|
|
51
|
+
FRONTEND = "frontend",
|
|
52
|
+
BOTH = "both"
|
|
53
|
+
}
|
|
54
|
+
export interface IAction extends IBaseEntity {
|
|
55
|
+
readOnly: boolean;
|
|
56
|
+
name: string;
|
|
57
|
+
description: string | null;
|
|
58
|
+
code: string | null;
|
|
59
|
+
actionType: ActionType;
|
|
60
|
+
permissionLogic: ILogicNode | null;
|
|
61
|
+
parentId: string | null;
|
|
62
|
+
serial: number | null;
|
|
63
|
+
isActive: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface IActionTreeDto extends IAction {
|
|
66
|
+
children: IActionTreeDto[];
|
|
67
|
+
}
|
|
68
|
+
export interface ICreateActionDto {
|
|
69
|
+
name: string;
|
|
70
|
+
description?: string;
|
|
71
|
+
code?: string;
|
|
72
|
+
actionType?: ActionType;
|
|
73
|
+
permissionLogic?: ILogicNode;
|
|
74
|
+
parentId?: string;
|
|
75
|
+
serial?: number;
|
|
76
|
+
isActive?: boolean;
|
|
77
|
+
}
|
|
78
|
+
export interface IUpdateActionDto extends Partial<ICreateActionDto> {
|
|
79
|
+
id: string;
|
|
80
|
+
}
|
|
81
|
+
export type PermissionAction = 'add' | 'remove';
|
|
82
|
+
export interface IPermissionItemDto {
|
|
83
|
+
id: string;
|
|
84
|
+
action: PermissionAction;
|
|
85
|
+
}
|
|
86
|
+
export interface IAssignUserActionsDto {
|
|
87
|
+
userId: string;
|
|
88
|
+
companyId?: string;
|
|
89
|
+
branchId?: string;
|
|
90
|
+
items: IPermissionItemDto[];
|
|
91
|
+
}
|
|
92
|
+
export interface IAssignCompanyActionsDto {
|
|
93
|
+
companyId: string;
|
|
94
|
+
items: IPermissionItemDto[];
|
|
95
|
+
}
|
|
96
|
+
export interface IAssignRoleActionsDto {
|
|
97
|
+
roleId: string;
|
|
98
|
+
items: IPermissionItemDto[];
|
|
99
|
+
}
|
|
100
|
+
export interface IAssignUserRolesDto {
|
|
101
|
+
userId: string;
|
|
102
|
+
companyId?: string;
|
|
103
|
+
branchId?: string;
|
|
104
|
+
items: IPermissionItemDto[];
|
|
105
|
+
}
|
|
106
|
+
export interface IUserActionResponseDto {
|
|
107
|
+
id: string;
|
|
108
|
+
userId: string;
|
|
109
|
+
actionId: string;
|
|
110
|
+
actionCode: string;
|
|
111
|
+
actionName: string;
|
|
112
|
+
branchId: string | null;
|
|
113
|
+
createdAt: Date;
|
|
114
|
+
}
|
|
115
|
+
export interface IRoleActionResponseDto {
|
|
116
|
+
id: string;
|
|
117
|
+
roleId: string;
|
|
118
|
+
actionId: string;
|
|
119
|
+
actionCode: string;
|
|
120
|
+
actionName: string;
|
|
121
|
+
createdAt: Date;
|
|
122
|
+
}
|
|
123
|
+
export interface ICompanyActionResponseDto {
|
|
124
|
+
id: string;
|
|
125
|
+
companyId: string;
|
|
126
|
+
actionId: string;
|
|
127
|
+
actionCode: string;
|
|
128
|
+
actionName: string;
|
|
129
|
+
createdAt: Date;
|
|
130
|
+
}
|
|
131
|
+
export interface IUserRoleResponseDto {
|
|
132
|
+
id: string;
|
|
133
|
+
userId: string;
|
|
134
|
+
roleId: string;
|
|
135
|
+
roleName: string;
|
|
136
|
+
branchId: string | null;
|
|
137
|
+
createdAt: Date;
|
|
138
|
+
}
|
|
139
|
+
export interface IRoleUserResponseDto {
|
|
140
|
+
id: string;
|
|
141
|
+
userId: string;
|
|
142
|
+
companyId: string | null;
|
|
143
|
+
branchId: string | null;
|
|
144
|
+
createdAt: Date;
|
|
145
|
+
}
|
|
146
|
+
export interface IActionUserResponseDto {
|
|
147
|
+
id: string;
|
|
148
|
+
userId: string;
|
|
149
|
+
companyId: string | null;
|
|
150
|
+
branchId: string | null;
|
|
151
|
+
createdAt: Date;
|
|
152
|
+
}
|
|
153
|
+
export interface IMyPermissionsResponseDto {
|
|
154
|
+
frontendActions: Array<{
|
|
155
|
+
code: string;
|
|
59
156
|
name: string;
|
|
60
157
|
description: string | null;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
interface
|
|
91
|
-
|
|
92
|
-
companyId?: string;
|
|
93
|
-
branchId?: string;
|
|
94
|
-
items: IPermissionItemDto[];
|
|
95
|
-
}
|
|
96
|
-
interface IAssignCompanyActionsDto {
|
|
97
|
-
companyId: string;
|
|
98
|
-
items: IPermissionItemDto[];
|
|
99
|
-
}
|
|
100
|
-
interface IAssignRoleActionsDto {
|
|
101
|
-
roleId: string;
|
|
102
|
-
items: IPermissionItemDto[];
|
|
103
|
-
}
|
|
104
|
-
interface IAssignUserRolesDto {
|
|
105
|
-
userId: string;
|
|
106
|
-
companyId?: string;
|
|
107
|
-
branchId?: string;
|
|
108
|
-
items: IPermissionItemDto[];
|
|
109
|
-
}
|
|
110
|
-
interface IUserActionResponseDto {
|
|
111
|
-
id: string;
|
|
112
|
-
userId: string;
|
|
113
|
-
actionId: string;
|
|
114
|
-
actionCode: string;
|
|
115
|
-
actionName: string;
|
|
116
|
-
branchId: string | null;
|
|
117
|
-
createdAt: Date;
|
|
118
|
-
}
|
|
119
|
-
interface IRoleActionResponseDto {
|
|
120
|
-
id: string;
|
|
121
|
-
roleId: string;
|
|
122
|
-
actionId: string;
|
|
123
|
-
actionCode: string;
|
|
124
|
-
actionName: string;
|
|
125
|
-
createdAt: Date;
|
|
158
|
+
}>;
|
|
159
|
+
cachedEndpoints: number;
|
|
160
|
+
}
|
|
161
|
+
export interface IPrerequisiteActionDto {
|
|
162
|
+
actionId: string;
|
|
163
|
+
actionCode: string;
|
|
164
|
+
actionName: string;
|
|
165
|
+
}
|
|
166
|
+
export interface IPrerequisiteValidationError {
|
|
167
|
+
actionId: string;
|
|
168
|
+
actionCode: string;
|
|
169
|
+
actionName: string;
|
|
170
|
+
requiredActions: IPrerequisiteActionDto[];
|
|
171
|
+
}
|
|
172
|
+
export interface IPermissionOperationResultDto {
|
|
173
|
+
success: boolean;
|
|
174
|
+
added: number;
|
|
175
|
+
removed: number;
|
|
176
|
+
message: string;
|
|
177
|
+
messageKey?: string;
|
|
178
|
+
prerequisiteErrors?: IPrerequisiteValidationError[];
|
|
179
|
+
}
|
|
180
|
+
export interface IGetUserActionsDto {
|
|
181
|
+
companyId?: string;
|
|
182
|
+
branchId?: string;
|
|
183
|
+
}
|
|
184
|
+
export interface IGetUserRolesDto {
|
|
185
|
+
branchId?: string;
|
|
186
|
+
}
|
|
187
|
+
export interface IGetMyPermissionsDto {
|
|
188
|
+
parentCodes?: string[];
|
|
126
189
|
}
|
|
127
|
-
interface ICompanyActionResponseDto {
|
|
128
|
-
id: string;
|
|
129
|
-
companyId: string;
|
|
130
|
-
actionId: string;
|
|
131
|
-
actionCode: string;
|
|
132
|
-
actionName: string;
|
|
133
|
-
createdAt: Date;
|
|
134
|
-
}
|
|
135
|
-
interface IUserRoleResponseDto {
|
|
136
|
-
id: string;
|
|
137
|
-
userId: string;
|
|
138
|
-
roleId: string;
|
|
139
|
-
roleName: string;
|
|
140
|
-
branchId: string | null;
|
|
141
|
-
createdAt: Date;
|
|
142
|
-
}
|
|
143
|
-
interface IRoleUserResponseDto {
|
|
144
|
-
id: string;
|
|
145
|
-
userId: string;
|
|
146
|
-
companyId: string | null;
|
|
147
|
-
branchId: string | null;
|
|
148
|
-
createdAt: Date;
|
|
149
|
-
}
|
|
150
|
-
interface IActionUserResponseDto {
|
|
151
|
-
id: string;
|
|
152
|
-
userId: string;
|
|
153
|
-
companyId: string | null;
|
|
154
|
-
branchId: string | null;
|
|
155
|
-
createdAt: Date;
|
|
156
|
-
}
|
|
157
|
-
interface IMyPermissionsResponseDto {
|
|
158
|
-
frontendActions: Array<{
|
|
159
|
-
code: string;
|
|
160
|
-
name: string;
|
|
161
|
-
description: string | null;
|
|
162
|
-
}>;
|
|
163
|
-
cachedEndpoints: number;
|
|
164
|
-
}
|
|
165
|
-
interface IPrerequisiteActionDto {
|
|
166
|
-
actionId: string;
|
|
167
|
-
actionCode: string;
|
|
168
|
-
actionName: string;
|
|
169
|
-
}
|
|
170
|
-
interface IPrerequisiteValidationError {
|
|
171
|
-
actionId: string;
|
|
172
|
-
actionCode: string;
|
|
173
|
-
actionName: string;
|
|
174
|
-
requiredActions: IPrerequisiteActionDto[];
|
|
175
|
-
}
|
|
176
|
-
interface IPermissionOperationResultDto {
|
|
177
|
-
success: boolean;
|
|
178
|
-
added: number;
|
|
179
|
-
removed: number;
|
|
180
|
-
message: string;
|
|
181
|
-
messageKey?: string;
|
|
182
|
-
prerequisiteErrors?: IPrerequisiteValidationError[];
|
|
183
|
-
}
|
|
184
|
-
interface IGetUserActionsDto {
|
|
185
|
-
companyId?: string;
|
|
186
|
-
branchId?: string;
|
|
187
|
-
}
|
|
188
|
-
interface IGetUserRolesDto {
|
|
189
|
-
branchId?: string;
|
|
190
|
-
}
|
|
191
|
-
interface IGetMyPermissionsDto {
|
|
192
|
-
parentCodes?: string[];
|
|
193
|
-
}
|
|
194
|
-
|
|
195
190
|
/** Maximum items for dropdown lists (companies, roles, users, branches) */
|
|
196
|
-
declare const MAX_DROPDOWN_ITEMS = 100;
|
|
197
|
-
|
|
198
|
-
declare
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ActionApiService, never>;
|
|
214
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ActionApiService>;
|
|
215
|
-
}
|
|
216
|
-
|
|
191
|
+
export declare const MAX_DROPDOWN_ITEMS = 100;
|
|
192
|
+
export declare const IAM_MESSAGES: Record<string, string>;
|
|
193
|
+
export declare class RoleApiService extends ApiResourceService<IUpdateRoleDto, IRole> {
|
|
194
|
+
constructor();
|
|
195
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RoleApiService, never>;
|
|
196
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
197
|
+
}
|
|
198
|
+
export declare class ActionApiService extends ApiResourceService<IUpdateActionDto, IAction> {
|
|
199
|
+
private readonly appConfig;
|
|
200
|
+
constructor();
|
|
201
|
+
/** Get actions filtered by company whitelist for permission assignment */
|
|
202
|
+
getActionsForPermission(companyId?: string): Observable<ISingleResponse<IActionTreeDto[]>>;
|
|
203
|
+
/** Get actions in hierarchical tree structure */
|
|
204
|
+
getTree(search?: string, isActive?: boolean, withDeleted?: boolean): Observable<ISingleResponse<IActionTreeDto[]>>;
|
|
205
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionApiService, never>;
|
|
206
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
207
|
+
}
|
|
217
208
|
/** Shared service for smart dependency management across action selectors */
|
|
218
|
-
declare class ActionPermissionLogicService {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
|
|
209
|
+
export declare class ActionPermissionLogicService {
|
|
210
|
+
private readonly confirmationService;
|
|
211
|
+
private readonly messageService;
|
|
212
|
+
private readonly translateAdapter;
|
|
213
|
+
private t;
|
|
214
|
+
/** Handle checking an action with prerequisite validation (recursive deep scan) */
|
|
215
|
+
handleCheck(action: IAction, currentSelection: Record<string, boolean>, allActions: IAction[], onUpdate: (newSelection: Record<string, boolean>) => void, onCancel: (previousState: Record<string, boolean>) => void): void;
|
|
216
|
+
/** Handle unchecking an action with dependency detection */
|
|
217
|
+
handleUncheck(action: IAction, currentSelection: Record<string, boolean>, allActions: IAction[], onUpdate: (newSelection: Record<string, boolean>) => void): void;
|
|
218
|
+
/** Check if an action has unmet prerequisites */
|
|
219
|
+
hasUnmetPrerequisites(action: IAction, currentSelection: Record<string, boolean>, allActions: IAction[]): boolean;
|
|
220
|
+
/** Get all selected actions that have unmet prerequisites */
|
|
221
|
+
getActionsWithUnmetPrerequisites(currentSelection: Record<string, boolean>, allActions: IAction[]): IAction[];
|
|
222
|
+
/** Show validation error dialog with auto-fix options */
|
|
223
|
+
showValidationErrorDialog(invalidActions: IAction[], currentSelection: Record<string, boolean>, allActions: IAction[], onUpdate: (newSelection: Record<string, boolean>) => void): void;
|
|
224
|
+
/** Get prerequisite description for tooltip display */
|
|
225
|
+
getPrerequisiteTooltip(action: IAction, currentSelection: Record<string, boolean>, allActions: IAction[]): string;
|
|
226
|
+
/** Build dynamic logic tree message with AND/OR operators and nesting */
|
|
227
|
+
buildLogicMessage(logic: ILogicNode, _missingActions: IAction[], allActions: IAction[], currentSelection?: Record<string, boolean>): string;
|
|
228
|
+
/** Extract selected action IDs from selection map */
|
|
229
|
+
private getSelectedIds;
|
|
230
|
+
private sanitizeHtml;
|
|
231
|
+
/** Recursively collect ALL missing prerequisites at all dependency levels */
|
|
232
|
+
private getAllMissingPrerequisitesRecursive;
|
|
233
|
+
private showPrerequisiteDialog;
|
|
234
|
+
private showDependencyDialog;
|
|
235
|
+
private findActionsDependingOn;
|
|
236
|
+
private doesLogicDependOn;
|
|
237
|
+
private findAlternatives;
|
|
238
|
+
private findAlternativeInLogic;
|
|
239
|
+
private calculateSmartSelection;
|
|
240
|
+
private findRequiredActionIds;
|
|
241
|
+
private buildSimpleMessage;
|
|
242
|
+
private formatLogicNode;
|
|
243
|
+
/** Build clean text-based logic tree for tooltips */
|
|
244
|
+
private buildTooltipLogicTree;
|
|
245
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionPermissionLogicService, never>;
|
|
246
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
247
|
+
}
|
|
248
|
+
export declare class PermissionApiService extends BaseApiService {
|
|
249
|
+
constructor();
|
|
250
|
+
assignUserActions(data: IAssignUserActionsDto): Observable<ISingleResponse<IPermissionOperationResultDto>>;
|
|
251
|
+
getUserActions(userId: string, query?: IGetUserActionsDto): Observable<ISingleResponse<IUserActionResponseDto[]>>;
|
|
252
|
+
assignUserRoles(data: IAssignUserRolesDto): Observable<ISingleResponse<IPermissionOperationResultDto>>;
|
|
253
|
+
getUserRoles(userId: string, query?: IGetUserRolesDto): Observable<ISingleResponse<IUserRoleResponseDto[]>>;
|
|
254
|
+
assignRoleActions(data: IAssignRoleActionsDto): Observable<ISingleResponse<IPermissionOperationResultDto>>;
|
|
255
|
+
getRoleActions(roleId: string): Observable<ISingleResponse<IRoleActionResponseDto[]>>;
|
|
256
|
+
/** Reverse lookup: users assigned to a role */
|
|
257
|
+
getRoleUsers(roleId: string): Observable<ISingleResponse<IRoleUserResponseDto[]>>;
|
|
258
|
+
/** Reverse lookup: users directly assigned an action */
|
|
259
|
+
getActionUsers(actionId: string): Observable<ISingleResponse<IActionUserResponseDto[]>>;
|
|
260
|
+
assignCompanyActions(data: IAssignCompanyActionsDto): Observable<ISingleResponse<IPermissionOperationResultDto>>;
|
|
261
|
+
getCompanyActions(companyId: string): Observable<ISingleResponse<ICompanyActionResponseDto[]>>;
|
|
262
|
+
/** Effective roles for the authenticated user — merges company-wide and login-branch-specific assignments */
|
|
263
|
+
getMyRoles(): Observable<ISingleResponse<IUserRoleResponseDto[]>>;
|
|
264
|
+
/** Effective direct actions for the authenticated user — merges company-wide and login-branch-specific assignments */
|
|
265
|
+
getMyActions(): Observable<ISingleResponse<IUserActionResponseDto[]>>;
|
|
266
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PermissionApiService, never>;
|
|
267
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
268
|
+
}
|
|
280
269
|
/**
|
|
281
270
|
* My Permissions API Service
|
|
282
271
|
* Get current user's complete permissions
|
|
283
272
|
* Endpoint: POST /iam/permissions/my-permissions
|
|
284
273
|
* Always enabled
|
|
285
274
|
*/
|
|
286
|
-
declare class MyPermissionsApiService {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
|
|
275
|
+
export declare class MyPermissionsApiService {
|
|
276
|
+
private readonly http;
|
|
277
|
+
private readonly appConfig;
|
|
278
|
+
private readonly baseUrl;
|
|
279
|
+
/**
|
|
280
|
+
* Get current user's complete permissions
|
|
281
|
+
* POST /iam/permissions/my-permissions
|
|
282
|
+
* Returns menus, frontend actions, and cached endpoint count
|
|
283
|
+
* @param dto Optional filter by parent codes (only affects frontend actions)
|
|
284
|
+
*/
|
|
285
|
+
getMyPermissions(dto?: IGetMyPermissionsDto): Observable<ISingleResponse<IMyPermissionsResponseDto>>;
|
|
286
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MyPermissionsApiService, never>;
|
|
287
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
288
|
+
}
|
|
289
|
+
export declare class PermissionStateService {
|
|
290
|
+
private readonly permissionApi;
|
|
291
|
+
private readonly permissionValidator;
|
|
292
|
+
private readonly _permissions;
|
|
293
|
+
readonly permissions: import("@angular/core").Signal<IMyPermissionsResponseDto | null>;
|
|
294
|
+
private readonly _isLoading;
|
|
295
|
+
readonly isLoading: import("@angular/core").Signal<boolean>;
|
|
296
|
+
loadPermissions(dto?: IGetMyPermissionsDto): Observable<void>;
|
|
297
|
+
isLoaded(): boolean;
|
|
298
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PermissionStateService, never>;
|
|
299
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
300
|
+
}
|
|
314
301
|
/**
|
|
315
302
|
* Shared resolver for the company/branch display info behind an IAM permission
|
|
316
303
|
* grant's scope (`companyId`/`branchId`). Used by the read-only permitted-users
|
|
@@ -323,234 +310,242 @@ declare class PermissionStateService {
|
|
|
323
310
|
* a `Map` (empty when ids are empty, the provider doesn't implement the
|
|
324
311
|
* method, or the request fails) and fall back to displaying the raw ID.
|
|
325
312
|
*/
|
|
326
|
-
declare class PermissionScopeResolverService {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}
|
|
333
|
-
|
|
313
|
+
export declare class PermissionScopeResolverService {
|
|
314
|
+
private readonly companyProvider;
|
|
315
|
+
resolveCompanyInfo(companyIds: string[]): Promise<Map<string, ICompanyBasicInfo>>;
|
|
316
|
+
resolveBranchInfo(branchIds: string[]): Promise<Map<string, IBranchBasicInfo>>;
|
|
317
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PermissionScopeResolverService, never>;
|
|
318
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
319
|
+
}
|
|
334
320
|
interface IBuilderNode {
|
|
321
|
+
id: string;
|
|
322
|
+
type: 'group' | 'action';
|
|
323
|
+
operator?: 'AND' | 'OR';
|
|
324
|
+
actionId?: string;
|
|
325
|
+
children?: IBuilderNode[];
|
|
326
|
+
}
|
|
327
|
+
export declare class LogicBuilderComponent {
|
|
328
|
+
readonly logic: import("@angular/core").InputSignal<ILogicNode | null>;
|
|
329
|
+
readonly actions: import("@angular/core").InputSignal<{
|
|
335
330
|
id: string;
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
private updateTreeAndEmit;
|
|
359
|
-
private updateNodeInTree;
|
|
360
|
-
private removeNodeFromTree;
|
|
361
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LogicBuilderComponent, never>;
|
|
362
|
-
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>;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
declare abstract class BaseActionSelectorComponent {
|
|
366
|
-
protected readonly permissionLogic: ActionPermissionLogicService;
|
|
367
|
-
protected readonly confirmationService: ConfirmationService;
|
|
368
|
-
protected readonly translateAdapter: TranslateService | null;
|
|
369
|
-
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
370
|
-
readonly saving: _angular_core.WritableSignal<boolean>;
|
|
371
|
-
protected readonly _actions: _angular_core.WritableSignal<IAction[]>;
|
|
372
|
-
readonly actions: _angular_core.Signal<IAction[]>;
|
|
373
|
-
protected readonly _actionsTree: _angular_core.WritableSignal<IActionTreeDto[]>;
|
|
374
|
-
protected readonly actionsTree: _angular_core.Signal<IActionTreeDto[]>;
|
|
375
|
-
protected readonly _selectionMap: _angular_core.WritableSignal<Record<string, boolean>>;
|
|
376
|
-
readonly selectionMap: _angular_core.Signal<Record<string, boolean>>;
|
|
377
|
-
protected readonly _initialSelection: _angular_core.WritableSignal<Record<string, boolean>>;
|
|
378
|
-
protected readonly initialSelection: _angular_core.Signal<Record<string, boolean>>;
|
|
379
|
-
readonly treeNodes: _angular_core.Signal<_flusys_ng_ui.TreeNode<IAction>[]>;
|
|
380
|
-
readonly allSelected: _angular_core.Signal<boolean>;
|
|
381
|
-
readonly hasChanges: _angular_core.Signal<boolean>;
|
|
382
|
-
readonly actionsWithUnmetPrerequisites: _angular_core.Signal<Set<string>>;
|
|
383
|
-
readonly invalidActionsCount: _angular_core.Signal<number>;
|
|
384
|
-
readonly pendingAdd: _angular_core.Signal<IAction[]>;
|
|
385
|
-
readonly pendingRemove: _angular_core.Signal<IAction[]>;
|
|
386
|
-
readonly canSave: _angular_core.Signal<boolean>;
|
|
387
|
-
protected translate(key: string, vars?: Record<string, string | number>): string;
|
|
388
|
-
protected confirmSelectionChange(onAccept: () => void, onReject: () => void): void;
|
|
389
|
-
hasUnmetPrerequisites(action: IAction): boolean;
|
|
390
|
-
getTooltip(action: IAction): string;
|
|
391
|
-
protected abstract getDefaultTooltip(isSelected: boolean): string;
|
|
392
|
-
onActionToggle(action: IAction, newValue: boolean): void;
|
|
393
|
-
toggleAll(): void;
|
|
394
|
-
protected setAllSelection(value: boolean): void;
|
|
395
|
-
protected buildSelectionMap(actions: IAction[], predicate: (action: IAction) => boolean): Record<string, boolean>;
|
|
396
|
-
protected buildPayloadItems(): Array<{
|
|
397
|
-
id: string;
|
|
398
|
-
action: PermissionAction;
|
|
399
|
-
}>;
|
|
400
|
-
protected resetState(): void;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
declare class RoleActionSelectorComponent extends BaseActionSelectorComponent {
|
|
404
|
-
readonly ROLE_ACTION_PERMISSIONS: {
|
|
405
|
-
readonly READ: "role-action.read";
|
|
406
|
-
readonly ASSIGN: "role-action.assign";
|
|
331
|
+
name: string;
|
|
332
|
+
}[]>;
|
|
333
|
+
readonly logicChange: import("@angular/core").OutputEmitterRef<ILogicNode | null>;
|
|
334
|
+
private readonly _builderTree;
|
|
335
|
+
readonly builderLogic: import("@angular/core").Signal<IBuilderNode | null>;
|
|
336
|
+
constructor();
|
|
337
|
+
initializeLogic(): void;
|
|
338
|
+
clearLogic(): void;
|
|
339
|
+
toggleOperator(nodeId: string): void;
|
|
340
|
+
addChildNode(parentId: string, type: 'group' | 'action'): void;
|
|
341
|
+
removeNode(nodeId: string): void;
|
|
342
|
+
updateActionId(nodeId: string, actionId: string): void;
|
|
343
|
+
private updateNode;
|
|
344
|
+
private updateTreeAndEmit;
|
|
345
|
+
private updateNodeInTree;
|
|
346
|
+
private removeNodeFromTree;
|
|
347
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LogicBuilderComponent, never>;
|
|
348
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LogicBuilderComponent, "lib-logic-builder", never, {
|
|
349
|
+
"logic": {
|
|
350
|
+
"alias": "logic";
|
|
351
|
+
"required": false;
|
|
352
|
+
"isSignal": true;
|
|
407
353
|
};
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
private readonly messageService;
|
|
413
|
-
readonly selectedRoleId: _angular_core.WritableSignal<string | undefined>;
|
|
414
|
-
readonly roles: _angular_core.WritableSignal<IRole[]>;
|
|
415
|
-
private readonly roleSelectRef;
|
|
416
|
-
private loadDataAbortController;
|
|
417
|
-
constructor();
|
|
418
|
-
onRoleSelect(roleId: string | undefined): void;
|
|
419
|
-
protected getDefaultTooltip(isSelected: boolean): string;
|
|
420
|
-
private loadRoles;
|
|
421
|
-
private onRoleChange;
|
|
422
|
-
saveChanges(): Promise<void>;
|
|
423
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RoleActionSelectorComponent, never>;
|
|
424
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RoleActionSelectorComponent, "flusys-role-action-selector", never, {}, {}, never, never, true, never>;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
declare class CompanyActionSelectorComponent extends BaseActionSelectorComponent {
|
|
428
|
-
readonly COMPANY_ACTION_PERMISSIONS: {
|
|
429
|
-
readonly READ: "company-action.read";
|
|
430
|
-
readonly ASSIGN: "company-action.assign";
|
|
354
|
+
"actions": {
|
|
355
|
+
"alias": "actions";
|
|
356
|
+
"required": false;
|
|
357
|
+
"isSignal": true;
|
|
431
358
|
};
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
359
|
+
}, {
|
|
360
|
+
"logicChange": "logicChange";
|
|
361
|
+
}, never, never, true, never>;
|
|
362
|
+
}
|
|
363
|
+
declare abstract class BaseActionSelectorComponent {
|
|
364
|
+
protected readonly permissionLogic: ActionPermissionLogicService;
|
|
365
|
+
protected readonly confirmationService: ConfirmationService;
|
|
366
|
+
protected readonly translateAdapter: TranslateService | null;
|
|
367
|
+
readonly loading: import("@angular/core").WritableSignal<boolean>;
|
|
368
|
+
readonly saving: import("@angular/core").WritableSignal<boolean>;
|
|
369
|
+
protected readonly _actions: import("@angular/core").WritableSignal<IAction[]>;
|
|
370
|
+
readonly actions: import("@angular/core").Signal<IAction[]>;
|
|
371
|
+
protected readonly _actionsTree: import("@angular/core").WritableSignal<IActionTreeDto[]>;
|
|
372
|
+
protected readonly actionsTree: import("@angular/core").Signal<IActionTreeDto[]>;
|
|
373
|
+
protected readonly _selectionMap: import("@angular/core").WritableSignal<Record<string, boolean>>;
|
|
374
|
+
readonly selectionMap: import("@angular/core").Signal<Record<string, boolean>>;
|
|
375
|
+
protected readonly _initialSelection: import("@angular/core").WritableSignal<Record<string, boolean>>;
|
|
376
|
+
protected readonly initialSelection: import("@angular/core").Signal<Record<string, boolean>>;
|
|
377
|
+
readonly treeNodes: import("@angular/core").Signal<import("@flusys/ng-ui").TreeNode<IAction>[]>;
|
|
378
|
+
readonly allSelected: import("@angular/core").Signal<boolean>;
|
|
379
|
+
readonly hasChanges: import("@angular/core").Signal<boolean>;
|
|
380
|
+
readonly actionsWithUnmetPrerequisites: import("@angular/core").Signal<Set<string>>;
|
|
381
|
+
readonly invalidActionsCount: import("@angular/core").Signal<number>;
|
|
382
|
+
readonly pendingAdd: import("@angular/core").Signal<IAction[]>;
|
|
383
|
+
readonly pendingRemove: import("@angular/core").Signal<IAction[]>;
|
|
384
|
+
readonly canSave: import("@angular/core").Signal<boolean>;
|
|
385
|
+
protected translate(key: string, vars?: Record<string, string | number>): string;
|
|
386
|
+
protected confirmSelectionChange(onAccept: () => void, onReject: () => void): void;
|
|
387
|
+
hasUnmetPrerequisites(action: IAction): boolean;
|
|
388
|
+
getTooltip(action: IAction): string;
|
|
389
|
+
protected abstract getDefaultTooltip(isSelected: boolean): string;
|
|
390
|
+
onActionToggle(action: IAction, newValue: boolean): void;
|
|
391
|
+
toggleAll(): void;
|
|
392
|
+
protected setAllSelection(value: boolean): void;
|
|
393
|
+
protected buildSelectionMap(actions: IAction[], predicate: (action: IAction) => boolean): Record<string, boolean>;
|
|
394
|
+
protected buildPayloadItems(): Array<{
|
|
395
|
+
id: string;
|
|
396
|
+
action: PermissionAction;
|
|
397
|
+
}>;
|
|
398
|
+
protected resetState(): void;
|
|
399
|
+
}
|
|
400
|
+
export declare class RoleActionSelectorComponent extends BaseActionSelectorComponent {
|
|
401
|
+
readonly ROLE_ACTION_PERMISSIONS: {
|
|
402
|
+
readonly READ: "role-action.read";
|
|
403
|
+
readonly ASSIGN: "role-action.assign";
|
|
404
|
+
};
|
|
405
|
+
private readonly destroyRef;
|
|
406
|
+
private readonly roleApi;
|
|
407
|
+
private readonly actionApi;
|
|
408
|
+
private readonly permissionApi;
|
|
409
|
+
private readonly messageService;
|
|
410
|
+
readonly selectedRoleId: import("@angular/core").WritableSignal<string | undefined>;
|
|
411
|
+
readonly roles: import("@angular/core").WritableSignal<IRole[]>;
|
|
412
|
+
private readonly roleSelectRef;
|
|
413
|
+
private loadDataAbortController;
|
|
414
|
+
constructor();
|
|
415
|
+
onRoleSelect(roleId: string | undefined): void;
|
|
416
|
+
protected getDefaultTooltip(isSelected: boolean): string;
|
|
417
|
+
private loadRoles;
|
|
418
|
+
private onRoleChange;
|
|
419
|
+
saveChanges(): Promise<void>;
|
|
420
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RoleActionSelectorComponent, never>;
|
|
421
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RoleActionSelectorComponent, "flusys-role-action-selector", never, {}, {}, never, never, true, never>;
|
|
422
|
+
}
|
|
423
|
+
export declare class CompanyActionSelectorComponent extends BaseActionSelectorComponent {
|
|
424
|
+
readonly COMPANY_ACTION_PERMISSIONS: {
|
|
425
|
+
readonly READ: "company-action.read";
|
|
426
|
+
readonly ASSIGN: "company-action.assign";
|
|
427
|
+
};
|
|
428
|
+
private readonly companyApiProvider;
|
|
429
|
+
private readonly actionApi;
|
|
430
|
+
private readonly permissionApi;
|
|
431
|
+
private readonly messageService;
|
|
432
|
+
private readonly destroyRef;
|
|
433
|
+
readonly selectedCompanyId: import("@angular/core").WritableSignal<string | undefined>;
|
|
434
|
+
readonly companies: import("@angular/core").WritableSignal<ICompany[]>;
|
|
435
|
+
private readonly companySelectRef;
|
|
436
|
+
private loadDataAbortController;
|
|
437
|
+
constructor();
|
|
438
|
+
onCompanyChange(companyId: string | undefined): void;
|
|
439
|
+
protected getDefaultTooltip(isSelected: boolean): string;
|
|
440
|
+
private loadCompanies;
|
|
441
|
+
private loadData;
|
|
442
|
+
saveChanges(): Promise<void>;
|
|
443
|
+
private handleBackendPrerequisiteErrors;
|
|
444
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CompanyActionSelectorComponent, never>;
|
|
445
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CompanyActionSelectorComponent, "flusys-company-action-selector", never, {}, {}, never, never, true, never>;
|
|
446
|
+
}
|
|
452
447
|
/**
|
|
453
448
|
* Manages user role assignments with branch-level granularity:
|
|
454
449
|
* `branchId === undefined` means a company-wide assignment, a set value
|
|
455
450
|
* scopes the assignment to that specific branch.
|
|
456
451
|
*/
|
|
457
|
-
declare class UserRoleSelectorComponent {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
declare class UserActionSelectorComponent extends BaseActionSelectorComponent {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}
|
|
544
|
-
|
|
452
|
+
export declare class UserRoleSelectorComponent {
|
|
453
|
+
readonly USER_ROLE_PERMISSIONS: {
|
|
454
|
+
readonly READ: "user-role.read";
|
|
455
|
+
readonly ASSIGN: "user-role.assign";
|
|
456
|
+
};
|
|
457
|
+
private readonly appConfig;
|
|
458
|
+
private readonly companyContext;
|
|
459
|
+
private readonly userPermissionProvider;
|
|
460
|
+
private readonly roleApi;
|
|
461
|
+
private readonly permissionApi;
|
|
462
|
+
private readonly messageService;
|
|
463
|
+
private readonly confirmationService;
|
|
464
|
+
private readonly translateAdapter;
|
|
465
|
+
private readonly userSelectRef;
|
|
466
|
+
private translate;
|
|
467
|
+
onUserChange(userId: string | null): void;
|
|
468
|
+
readonly selectedUserId: import("@angular/core").WritableSignal<string | null>;
|
|
469
|
+
readonly selectedBranchId: import("@angular/core").WritableSignal<string | undefined>;
|
|
470
|
+
private readonly _branches;
|
|
471
|
+
readonly branches: import("@angular/core").Signal<IBranch[]>;
|
|
472
|
+
readonly loading: import("@angular/core").WritableSignal<boolean>;
|
|
473
|
+
readonly saving: import("@angular/core").WritableSignal<boolean>;
|
|
474
|
+
private readonly _roles;
|
|
475
|
+
readonly roles: import("@angular/core").Signal<IRole[]>;
|
|
476
|
+
private readonly _selectionMap;
|
|
477
|
+
readonly selectionMap: import("@angular/core").Signal<Record<string, boolean>>;
|
|
478
|
+
private readonly _initialSelection;
|
|
479
|
+
private readonly initialSelection;
|
|
480
|
+
readonly showBranchSelector: import("@angular/core").Signal<boolean>;
|
|
481
|
+
readonly branchTreeNodes: import("@angular/core").Signal<import("@flusys/ng-ui").TreeNode<IBranch>[]>;
|
|
482
|
+
readonly allSelected: import("@angular/core").Signal<boolean>;
|
|
483
|
+
readonly hasChanges: import("@angular/core").Signal<boolean>;
|
|
484
|
+
readonly pendingAdd: import("@angular/core").Signal<IRole[]>;
|
|
485
|
+
readonly pendingRemove: import("@angular/core").Signal<IRole[]>;
|
|
486
|
+
readonly canSave: import("@angular/core").Signal<boolean>;
|
|
487
|
+
constructor();
|
|
488
|
+
private loadUserBranches;
|
|
489
|
+
private loadData;
|
|
490
|
+
getTooltip(role: IRole): string;
|
|
491
|
+
onRoleToggle(role: IRole, newValue: boolean): void;
|
|
492
|
+
toggleAll(): void;
|
|
493
|
+
protected setAllSelections(value: boolean): void;
|
|
494
|
+
saveChanges(): Promise<void>;
|
|
495
|
+
private resetState;
|
|
496
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserRoleSelectorComponent, never>;
|
|
497
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserRoleSelectorComponent, "flusys-user-role-selector", never, {}, {}, never, never, true, never>;
|
|
498
|
+
}
|
|
499
|
+
export declare class UserActionSelectorComponent extends BaseActionSelectorComponent {
|
|
500
|
+
readonly USER_ACTION_PERMISSIONS: {
|
|
501
|
+
readonly READ: "user-action.read";
|
|
502
|
+
readonly ASSIGN: "user-action.assign";
|
|
503
|
+
};
|
|
504
|
+
private readonly appConfig;
|
|
505
|
+
private readonly companyContext;
|
|
506
|
+
private readonly userPermissionProvider;
|
|
507
|
+
private readonly actionApi;
|
|
508
|
+
private readonly permissionApi;
|
|
509
|
+
private readonly messageService;
|
|
510
|
+
private readonly userSelectRef;
|
|
511
|
+
private readonly _selectedUserId;
|
|
512
|
+
readonly selectedUserId: import("@angular/core").Signal<string | null>;
|
|
513
|
+
private readonly _selectedBranchId;
|
|
514
|
+
readonly selectedBranchId: import("@angular/core").Signal<string | undefined>;
|
|
515
|
+
private readonly _selectedCompanyId;
|
|
516
|
+
readonly selectedCompanyId: import("@angular/core").Signal<string | undefined>;
|
|
517
|
+
private readonly _branches;
|
|
518
|
+
readonly branches: import("@angular/core").Signal<IBranch[]>;
|
|
519
|
+
private readonly _companies;
|
|
520
|
+
readonly companies: import("@angular/core").Signal<ICompany[]>;
|
|
521
|
+
private readonly isCompanyFeatureActive;
|
|
522
|
+
readonly showCompanySelector: import("@angular/core").Signal<boolean>;
|
|
523
|
+
readonly showBranchSelector: import("@angular/core").Signal<boolean>;
|
|
524
|
+
readonly branchTreeNodes: import("@angular/core").Signal<import("@flusys/ng-ui").TreeNode<IBranch>[]>;
|
|
525
|
+
constructor();
|
|
526
|
+
onUserSelect(userId: string | null): void;
|
|
527
|
+
onBranchChange(branchId: string | undefined): void;
|
|
528
|
+
onCompanyChange(companyId: string | undefined): void;
|
|
529
|
+
private selectUser;
|
|
530
|
+
private applyCompanySelection;
|
|
531
|
+
private loadUserCompanies;
|
|
532
|
+
protected getDefaultTooltip(isSelected: boolean): string;
|
|
533
|
+
private loadUserBranches;
|
|
534
|
+
private isCurrentSelection;
|
|
535
|
+
private loadData;
|
|
536
|
+
saveChanges(): Promise<void>;
|
|
537
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserActionSelectorComponent, never>;
|
|
538
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserActionSelectorComponent, "flusys-user-action-selector", never, {}, {}, never, never, true, never>;
|
|
539
|
+
}
|
|
545
540
|
interface RolePermittedUserRow {
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
541
|
+
id: string;
|
|
542
|
+
userId: string;
|
|
543
|
+
userName: string;
|
|
544
|
+
userEmail: string;
|
|
545
|
+
companyId: string | null;
|
|
546
|
+
companyName: string | null;
|
|
547
|
+
branchId: string | null;
|
|
548
|
+
branchName: string | null;
|
|
554
549
|
}
|
|
555
550
|
/**
|
|
556
551
|
* Read-only viewer for users assigned to a role, with a remove-only action
|
|
@@ -571,43 +566,55 @@ interface RolePermittedUserRow {
|
|
|
571
566
|
* `companyId`/`branchId`, not just the user+role pair, since a user can
|
|
572
567
|
* have multiple grants for the same role at different scopes.
|
|
573
568
|
*/
|
|
574
|
-
declare class RolePermittedUsersDialogComponent {
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
569
|
+
export declare class RolePermittedUsersDialogComponent {
|
|
570
|
+
readonly USER_ROLE_PERMISSIONS: {
|
|
571
|
+
readonly READ: "user-role.read";
|
|
572
|
+
readonly ASSIGN: "user-role.assign";
|
|
573
|
+
};
|
|
574
|
+
private readonly permissionApi;
|
|
575
|
+
private readonly userProvider;
|
|
576
|
+
private readonly scopeResolver;
|
|
577
|
+
private readonly confirmationService;
|
|
578
|
+
private readonly messageService;
|
|
579
|
+
private readonly translateAdapter;
|
|
580
|
+
private t;
|
|
581
|
+
readonly visible: import("@angular/core").InputSignal<boolean>;
|
|
582
|
+
readonly role: import("@angular/core").InputSignal<IRole | null>;
|
|
583
|
+
readonly closed: import("@angular/core").OutputEmitterRef<void>;
|
|
584
|
+
readonly isLoading: import("@angular/core").WritableSignal<boolean>;
|
|
585
|
+
readonly isRemoving: import("@angular/core").WritableSignal<boolean>;
|
|
586
|
+
readonly users: import("@angular/core").WritableSignal<RolePermittedUserRow[]>;
|
|
587
|
+
readonly showCompanyColumn: import("@angular/core").WritableSignal<boolean>;
|
|
588
|
+
constructor();
|
|
589
|
+
private loadUsers;
|
|
590
|
+
private resolveUserInfo;
|
|
591
|
+
onRemove(user: RolePermittedUserRow): void;
|
|
592
|
+
onClose(): void;
|
|
593
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RolePermittedUsersDialogComponent, never>;
|
|
594
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RolePermittedUsersDialogComponent, "flusys-role-permitted-users-dialog", never, {
|
|
595
|
+
"visible": {
|
|
596
|
+
"alias": "visible";
|
|
597
|
+
"required": true;
|
|
598
|
+
"isSignal": true;
|
|
578
599
|
};
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
589
|
-
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
590
|
-
readonly isRemoving: _angular_core.WritableSignal<boolean>;
|
|
591
|
-
readonly users: _angular_core.WritableSignal<RolePermittedUserRow[]>;
|
|
592
|
-
readonly showCompanyColumn: _angular_core.WritableSignal<boolean>;
|
|
593
|
-
constructor();
|
|
594
|
-
private loadUsers;
|
|
595
|
-
private resolveUserInfo;
|
|
596
|
-
onRemove(user: RolePermittedUserRow): void;
|
|
597
|
-
onClose(): void;
|
|
598
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RolePermittedUsersDialogComponent, never>;
|
|
599
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RolePermittedUsersDialogComponent, "flusys-role-permitted-users-dialog", never, { "visible": { "alias": "visible"; "required": true; "isSignal": true; }; "role": { "alias": "role"; "required": true; "isSignal": true; }; }, { "closed": "closed"; }, never, never, true, never>;
|
|
600
|
-
}
|
|
601
|
-
|
|
600
|
+
"role": {
|
|
601
|
+
"alias": "role";
|
|
602
|
+
"required": true;
|
|
603
|
+
"isSignal": true;
|
|
604
|
+
};
|
|
605
|
+
}, {
|
|
606
|
+
"closed": "closed";
|
|
607
|
+
}, never, never, true, never>;
|
|
608
|
+
}
|
|
602
609
|
interface ActionPermittedUserRow {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
610
|
+
id: string;
|
|
611
|
+
userId: string;
|
|
612
|
+
userName: string;
|
|
613
|
+
userEmail: string;
|
|
614
|
+
companyId: string | null;
|
|
615
|
+
companyName: string | null;
|
|
616
|
+
branchId: string | null;
|
|
617
|
+
branchName: string | null;
|
|
611
618
|
}
|
|
612
619
|
/**
|
|
613
620
|
* Read-only viewer for users directly assigned an action, with a remove-only
|
|
@@ -628,44 +635,58 @@ interface ActionPermittedUserRow {
|
|
|
628
635
|
* `companyId`/`branchId`, not just the user+action pair, since a user can
|
|
629
636
|
* have multiple grants for the same action at different scopes.
|
|
630
637
|
*/
|
|
631
|
-
declare class ActionPermittedUsersDialogComponent {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
638
|
+
export declare class ActionPermittedUsersDialogComponent {
|
|
639
|
+
readonly USER_ACTION_PERMISSIONS: {
|
|
640
|
+
readonly READ: "user-action.read";
|
|
641
|
+
readonly ASSIGN: "user-action.assign";
|
|
642
|
+
};
|
|
643
|
+
private readonly permissionApi;
|
|
644
|
+
private readonly userProvider;
|
|
645
|
+
private readonly scopeResolver;
|
|
646
|
+
private readonly confirmationService;
|
|
647
|
+
private readonly messageService;
|
|
648
|
+
private readonly translateAdapter;
|
|
649
|
+
private t;
|
|
650
|
+
readonly visible: import("@angular/core").InputSignal<boolean>;
|
|
651
|
+
readonly action: import("@angular/core").InputSignal<IAction | null>;
|
|
652
|
+
readonly closed: import("@angular/core").OutputEmitterRef<void>;
|
|
653
|
+
readonly isLoading: import("@angular/core").WritableSignal<boolean>;
|
|
654
|
+
readonly isRemoving: import("@angular/core").WritableSignal<boolean>;
|
|
655
|
+
readonly users: import("@angular/core").WritableSignal<ActionPermittedUserRow[]>;
|
|
656
|
+
readonly showCompanyColumn: import("@angular/core").WritableSignal<boolean>;
|
|
657
|
+
constructor();
|
|
658
|
+
private loadUsers;
|
|
659
|
+
private resolveUserInfo;
|
|
660
|
+
onRemove(user: ActionPermittedUserRow): void;
|
|
661
|
+
onClose(): void;
|
|
662
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionPermittedUsersDialogComponent, never>;
|
|
663
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ActionPermittedUsersDialogComponent, "flusys-action-permitted-users-dialog", never, {
|
|
664
|
+
"visible": {
|
|
665
|
+
"alias": "visible";
|
|
666
|
+
"required": true;
|
|
667
|
+
"isSignal": true;
|
|
668
|
+
};
|
|
669
|
+
"action": {
|
|
670
|
+
"alias": "action";
|
|
671
|
+
"required": true;
|
|
672
|
+
"isSignal": true;
|
|
635
673
|
};
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
private resolveUserInfo;
|
|
653
|
-
onRemove(user: ActionPermittedUserRow): void;
|
|
654
|
-
onClose(): void;
|
|
655
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ActionPermittedUsersDialogComponent, never>;
|
|
656
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ActionPermittedUsersDialogComponent, "flusys-action-permitted-users-dialog", never, { "visible": { "alias": "visible"; "required": true; "isSignal": true; }; "action": { "alias": "action"; "required": true; "isSignal": true; }; }, { "closed": "closed"; }, never, never, true, never>;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
/** Implements ACTION_PROVIDER with the company-whitelisted active actions (groups included, for the tree) from ng-iam. */
|
|
660
|
-
declare class ActionProviderAdapter implements IActionProvider {
|
|
661
|
-
private readonly actionApi;
|
|
662
|
-
private readonly appConfig;
|
|
663
|
-
isAvailable(): boolean;
|
|
664
|
-
getActions(): Observable<ISingleResponse<IActionBasicInfo[]>>;
|
|
665
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ActionProviderAdapter, never>;
|
|
666
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ActionProviderAdapter>;
|
|
667
|
-
}
|
|
668
|
-
|
|
674
|
+
}, {
|
|
675
|
+
"closed": "closed";
|
|
676
|
+
}, never, never, true, never>;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* Implements ACTION_PROVIDER with active actions (groups included, for the tree) from ng-iam:
|
|
680
|
+
* the company whitelist for the `company` scope, the whole action tree for `all`.
|
|
681
|
+
*/
|
|
682
|
+
export declare class ActionProviderAdapter implements IActionProvider {
|
|
683
|
+
private readonly actionApi;
|
|
684
|
+
private readonly appConfig;
|
|
685
|
+
isAvailable(): boolean;
|
|
686
|
+
getActions(scope?: ActionScope): Observable<ISingleResponse<IActionBasicInfo[]>>;
|
|
687
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ActionProviderAdapter, never>;
|
|
688
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
689
|
+
}
|
|
669
690
|
/**
|
|
670
691
|
* Profile Permission Provider Adapter
|
|
671
692
|
*
|
|
@@ -691,17 +712,15 @@ declare class ActionProviderAdapter implements IActionProvider {
|
|
|
691
712
|
* // In profile component
|
|
692
713
|
* private readonly permissionProvider = inject(PROFILE_PERMISSION_PROVIDER, { optional: true });
|
|
693
714
|
*/
|
|
694
|
-
declare class ProfilePermissionProviderAdapter implements IProfilePermissionProvider {
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
}
|
|
701
|
-
|
|
715
|
+
export declare class ProfilePermissionProviderAdapter implements IProfilePermissionProvider {
|
|
716
|
+
private readonly permissionApi;
|
|
717
|
+
getUserRoles(): Observable<ISingleResponse<IProfileRoleInfo[]>>;
|
|
718
|
+
getUserActions(): Observable<ISingleResponse<IProfileActionInfo[]>>;
|
|
719
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProfilePermissionProviderAdapter, never>;
|
|
720
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
721
|
+
}
|
|
702
722
|
/** Registers IAM provider adapters for ng-shared interfaces */
|
|
703
|
-
declare function provideIamProviders(): Provider[];
|
|
704
|
-
|
|
723
|
+
export declare function provideIamProviders(): Provider[];
|
|
705
724
|
/**
|
|
706
725
|
* IAM Routes Configuration
|
|
707
726
|
*
|
|
@@ -710,7 +729,5 @@ declare function provideIamProviders(): Provider[];
|
|
|
710
729
|
* - Roles: Role management (conditional on RBAC/FULL mode)
|
|
711
730
|
* - Permissions: User permission assignments
|
|
712
731
|
*/
|
|
713
|
-
declare const IAM_ROUTES: Routes;
|
|
714
|
-
|
|
715
|
-
export { ActionApiService, ActionPermissionLogicService, ActionPermittedUsersDialogComponent, ActionProviderAdapter, ActionType, CompanyActionSelectorComponent, IAM_MESSAGES, IAM_ROUTES, LogicBuilderComponent, MAX_DROPDOWN_ITEMS, MyPermissionsApiService, PermissionApiService, PermissionScopeResolverService, PermissionStateService, ProfilePermissionProviderAdapter, RoleActionSelectorComponent, RoleApiService, RolePermittedUsersDialogComponent, UserActionSelectorComponent, UserRoleSelectorComponent, provideIamProviders };
|
|
716
|
-
export type { IAction, IActionTreeDto, IActionUserResponseDto, IAssignCompanyActionsDto, IAssignRoleActionsDto, IAssignUserActionsDto, IAssignUserRolesDto, IBranch, ICompany, ICompanyActionResponseDto, ICreateActionDto, ICreateRoleDto, IGetMyPermissionsDto, IGetUserActionsDto, IGetUserRolesDto, IMyPermissionsResponseDto, IPermissionItemDto, IPermissionOperationResultDto, IPrerequisiteActionDto, IPrerequisiteValidationError, IRole, IRoleActionResponseDto, IRoleQueryDto, IRoleUserResponseDto, IUpdateActionDto, IUpdateRoleDto, IUser, IUserActionResponseDto, IUserRoleResponseDto, PermissionAction };
|
|
732
|
+
export declare const IAM_ROUTES: Routes;
|
|
733
|
+
export type { PermissionMode };
|