@flusys/ng-iam 5.0.3 → 5.1.0

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.
Files changed (23) hide show
  1. package/fesm2022/{flusys-ng-iam-action-form-page.component-D_vwcCjG.mjs → flusys-ng-iam-action-form-page.component-DMrFt5MP.mjs} +156 -54
  2. package/fesm2022/flusys-ng-iam-action-form-page.component-DMrFt5MP.mjs.map +1 -0
  3. package/fesm2022/{flusys-ng-iam-action-list-page.component-DRK79zUR.mjs → flusys-ng-iam-action-list-page.component-BIA9UpeH.mjs} +110 -40
  4. package/fesm2022/flusys-ng-iam-action-list-page.component-BIA9UpeH.mjs.map +1 -0
  5. package/fesm2022/{flusys-ng-iam-flusys-ng-iam-C6I4k78L.mjs → flusys-ng-iam-flusys-ng-iam-Cfo9kP14.mjs} +50 -27
  6. package/fesm2022/flusys-ng-iam-flusys-ng-iam-Cfo9kP14.mjs.map +1 -0
  7. package/fesm2022/{flusys-ng-iam-iam-container.component-CQA2B6cU.mjs → flusys-ng-iam-iam-container.component-DAiS1Mtk.mjs} +34 -9
  8. package/fesm2022/flusys-ng-iam-iam-container.component-DAiS1Mtk.mjs.map +1 -0
  9. package/fesm2022/{flusys-ng-iam-permission-page.component-CZebeUhC.mjs → flusys-ng-iam-permission-page.component-BFZCb8Md.mjs} +2 -2
  10. package/fesm2022/{flusys-ng-iam-permission-page.component-CZebeUhC.mjs.map → flusys-ng-iam-permission-page.component-BFZCb8Md.mjs.map} +1 -1
  11. package/fesm2022/{flusys-ng-iam-role-form-page.component-49dKMKOj.mjs → flusys-ng-iam-role-form-page.component-TfZDInlN.mjs} +85 -31
  12. package/fesm2022/flusys-ng-iam-role-form-page.component-TfZDInlN.mjs.map +1 -0
  13. package/fesm2022/{flusys-ng-iam-role-list-page.component-CT7CvvHj.mjs → flusys-ng-iam-role-list-page.component-CuHewjjr.mjs} +5 -5
  14. package/fesm2022/flusys-ng-iam-role-list-page.component-CuHewjjr.mjs.map +1 -0
  15. package/fesm2022/flusys-ng-iam.mjs +1 -1
  16. package/package.json +4 -4
  17. package/types/flusys-ng-iam.d.ts +2 -3
  18. package/fesm2022/flusys-ng-iam-action-form-page.component-D_vwcCjG.mjs.map +0 -1
  19. package/fesm2022/flusys-ng-iam-action-list-page.component-DRK79zUR.mjs.map +0 -1
  20. package/fesm2022/flusys-ng-iam-flusys-ng-iam-C6I4k78L.mjs.map +0 -1
  21. package/fesm2022/flusys-ng-iam-iam-container.component-CQA2B6cU.mjs.map +0 -1
  22. package/fesm2022/flusys-ng-iam-role-form-page.component-49dKMKOj.mjs.map +0 -1
  23. package/fesm2022/flusys-ng-iam-role-list-page.component-CT7CvvHj.mjs.map +0 -1
@@ -1,14 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, signal, effect, untracked, Component } from '@angular/core';
3
3
  import { Router } from '@angular/router';
4
- import { TRANSLATE_ADAPTER } from '@flusys/ng-core';
5
4
  import { LAYOUT_AUTH_STATE } from '@flusys/ng-layout';
6
- import { ACTION_PERMISSIONS, AngularModule, PrimeModule, HasPermissionDirective, TranslatePipe } from '@flusys/ng-shared';
5
+ import { ACTION_PERMISSIONS, TranslateService, AngularModule, PrimeModule, HasPermissionDirective, TranslatePipe } from '@flusys/ng-shared';
7
6
  import { MessageService, ConfirmationService } from 'primeng/api';
8
7
  import * as i5 from 'primeng/tag';
9
8
  import { TagModule } from 'primeng/tag';
10
9
  import { firstValueFrom } from 'rxjs';
11
- import { A as ActionApiService, a as ActionType, c as convertActionToTreeNode } from './flusys-ng-iam-flusys-ng-iam-C6I4k78L.mjs';
10
+ import { A as ActionApiService, a as ActionType, c as convertActionToTreeNode } from './flusys-ng-iam-flusys-ng-iam-Cfo9kP14.mjs';
12
11
  import * as i2 from 'primeng/button';
13
12
  import * as i6 from 'primeng/tooltip';
14
13
  import * as i7 from 'primeng/treetable';
@@ -20,7 +19,9 @@ class ActionListPageComponent {
20
19
  actionApi = inject(ActionApiService);
21
20
  messageService = inject(MessageService);
22
21
  confirmationService = inject(ConfirmationService);
23
- translateAdapter = inject(TRANSLATE_ADAPTER, { optional: true });
22
+ translateAdapter = inject(TranslateService, {
23
+ optional: true,
24
+ });
24
25
  isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
25
26
  treeNodes = signal([], ...(ngDevMode ? [{ debugName: "treeNodes" }] : []));
26
27
  translate(key, vars) {
@@ -46,7 +47,7 @@ class ActionListPageComponent {
46
47
  this.isLoading.set(true);
47
48
  try {
48
49
  const response = await firstValueFrom(this.actionApi.getTree());
49
- this.treeNodes.set(convertActionToTreeNode(response?.success ? response.data ?? [] : []));
50
+ this.treeNodes.set(convertActionToTreeNode(response?.success ? (response.data ?? []) : []));
50
51
  }
51
52
  catch {
52
53
  // Handled by global interceptor
@@ -72,17 +73,24 @@ class ActionListPageComponent {
72
73
  if (!action?.id || !action?.name)
73
74
  return;
74
75
  this.confirmationService.confirm({
75
- message: this.translate('shared.confirm.delete.item', { name: action.name }),
76
+ message: this.translate('shared.confirm.delete.item', {
77
+ name: action.name,
78
+ }),
76
79
  header: this.translate('iam.action.delete.title'),
77
80
  icon: 'pi pi-exclamation-triangle',
78
81
  accept: async () => {
79
82
  try {
80
- const response = await this.actionApi.delete({ id: action.id, type: 'delete' });
83
+ const response = await this.actionApi.delete({
84
+ id: action.id,
85
+ type: 'delete',
86
+ });
81
87
  await this.loadActions();
82
88
  this.messageService.add({
83
89
  severity: 'success',
84
90
  summary: this.translate('shared.success'),
85
- detail: response?.messageKey ? this.translate(response.messageKey, response.messageVariables) : (response?.message ?? ''),
91
+ detail: response?.messageKey
92
+ ? this.translate(response.messageKey, response.messageVariables)
93
+ : (response?.message ?? ''),
86
94
  });
87
95
  }
88
96
  catch {
@@ -94,14 +102,19 @@ class ActionListPageComponent {
94
102
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: ActionListPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
95
103
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.5", type: ActionListPageComponent, isStandalone: true, selector: "lib-action-list-page", ngImport: i0, template: `
96
104
  <div class="card">
97
- <div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4">
98
- <h3 class="text-lg sm:text-xl font-semibold">{{ 'iam.action.title' | translate }}</h3>
105
+ <div
106
+ class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4"
107
+ >
108
+ <h3 class="text-lg sm:text-xl font-semibold">
109
+ {{ 'iam.action.title' | translate }}
110
+ </h3>
99
111
  <p-button
100
112
  *hasPermission="ACTION_PERMISSIONS.CREATE"
101
113
  [label]="'iam.action.new' | translate"
102
114
  icon="pi pi-plus"
103
115
  (onClick)="onCreate()"
104
- styleClass="w-full sm:w-auto" />
116
+ styleClass="w-full sm:w-auto"
117
+ />
105
118
  </div>
106
119
 
107
120
  <div class="overflow-x-auto -mx-4 sm:mx-0">
@@ -110,14 +123,21 @@ class ActionListPageComponent {
110
123
  [loading]="isLoading()"
111
124
  dataKey="id"
112
125
  styleClass="p-treetable-sm"
113
- [tableStyle]="{ 'min-width': '50rem' }">
126
+ [tableStyle]="{ 'min-width': '50rem' }"
127
+ >
114
128
  <ng-template #header>
115
129
  <tr>
116
130
  <th>{{ 'iam.action.name' | translate }}</th>
117
- <th class="hidden md:table-cell">{{ 'iam.action.code' | translate }}</th>
131
+ <th class="hidden md:table-cell">
132
+ {{ 'iam.action.code' | translate }}
133
+ </th>
118
134
  <th>{{ 'iam.action.type' | translate }}</th>
119
- <th class="hidden sm:table-cell">{{ 'shared.active' | translate }}</th>
120
- <th class="hidden lg:table-cell">{{ 'shared.read.only' | translate }}</th>
135
+ <th class="hidden sm:table-cell">
136
+ {{ 'shared.active' | translate }}
137
+ </th>
138
+ <th class="hidden lg:table-cell">
139
+ {{ 'shared.read.only' | translate }}
140
+ </th>
121
141
  <th class="w-[100px]">{{ 'shared.actions' | translate }}</th>
122
142
  </tr>
123
143
  </ng-template>
@@ -131,17 +151,28 @@ class ActionListPageComponent {
131
151
  <td>
132
152
  <p-tag
133
153
  [value]="getActionTypeLabel(rowData.actionType)"
134
- [severity]="getActionTypeSeverity(rowData.actionType)" />
154
+ [severity]="getActionTypeSeverity(rowData.actionType)"
155
+ />
135
156
  </td>
136
157
  <td class="hidden sm:table-cell">
137
158
  <p-tag
138
- [value]="rowData.isActive ? ('shared.active' | translate) : ('shared.inactive' | translate)"
139
- [severity]="rowData.isActive ? 'success' : 'secondary'" />
159
+ [value]="
160
+ rowData.isActive
161
+ ? ('shared.active' | translate)
162
+ : ('shared.inactive' | translate)
163
+ "
164
+ [severity]="rowData.isActive ? 'success' : 'secondary'"
165
+ />
140
166
  </td>
141
167
  <td class="hidden lg:table-cell">
142
168
  <p-tag
143
- [value]="rowData.readOnly ? ('shared.yes' | translate) : ('shared.no' | translate)"
144
- [severity]="rowData.readOnly ? 'warn' : 'secondary'" />
169
+ [value]="
170
+ rowData.readOnly
171
+ ? ('shared.yes' | translate)
172
+ : ('shared.no' | translate)
173
+ "
174
+ [severity]="rowData.readOnly ? 'warn' : 'secondary'"
175
+ />
145
176
  </td>
146
177
  <td>
147
178
  <div class="flex gap-1">
@@ -151,8 +182,10 @@ class ActionListPageComponent {
151
182
  [text]="true"
152
183
  severity="secondary"
153
184
  size="small"
185
+ [disabled]="rowData.readOnly"
154
186
  [pTooltip]="'shared.edit' | translate"
155
- (onClick)="onEdit(rowData)" />
187
+ (onClick)="onEdit(rowData)"
188
+ />
156
189
  <p-button
157
190
  *hasPermission="ACTION_PERMISSIONS.DELETE"
158
191
  icon="pi pi-trash"
@@ -161,14 +194,17 @@ class ActionListPageComponent {
161
194
  size="small"
162
195
  [pTooltip]="'shared.delete' | translate"
163
196
  [disabled]="rowData.readOnly"
164
- (onClick)="onDelete(rowData)" />
197
+ (onClick)="onDelete(rowData)"
198
+ />
165
199
  </div>
166
200
  </td>
167
201
  </tr>
168
202
  </ng-template>
169
203
  <ng-template #emptymessage>
170
204
  <tr>
171
- <td colspan="6" class="text-center py-4 text-muted-color">{{ 'iam.action.no.actions' | translate }}</td>
205
+ <td colspan="6" class="text-center py-4 text-muted-color">
206
+ {{ 'iam.action.no.actions' | translate }}
207
+ </td>
172
208
  </tr>
173
209
  </ng-template>
174
210
  </p-treeTable>
@@ -180,17 +216,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
180
216
  type: Component,
181
217
  args: [{
182
218
  selector: 'lib-action-list-page',
183
- imports: [AngularModule, PrimeModule, TagModule, HasPermissionDirective, TranslatePipe],
219
+ imports: [
220
+ AngularModule,
221
+ PrimeModule,
222
+ TagModule,
223
+ HasPermissionDirective,
224
+ TranslatePipe,
225
+ ],
184
226
  template: `
185
227
  <div class="card">
186
- <div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4">
187
- <h3 class="text-lg sm:text-xl font-semibold">{{ 'iam.action.title' | translate }}</h3>
228
+ <div
229
+ class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4"
230
+ >
231
+ <h3 class="text-lg sm:text-xl font-semibold">
232
+ {{ 'iam.action.title' | translate }}
233
+ </h3>
188
234
  <p-button
189
235
  *hasPermission="ACTION_PERMISSIONS.CREATE"
190
236
  [label]="'iam.action.new' | translate"
191
237
  icon="pi pi-plus"
192
238
  (onClick)="onCreate()"
193
- styleClass="w-full sm:w-auto" />
239
+ styleClass="w-full sm:w-auto"
240
+ />
194
241
  </div>
195
242
 
196
243
  <div class="overflow-x-auto -mx-4 sm:mx-0">
@@ -199,14 +246,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
199
246
  [loading]="isLoading()"
200
247
  dataKey="id"
201
248
  styleClass="p-treetable-sm"
202
- [tableStyle]="{ 'min-width': '50rem' }">
249
+ [tableStyle]="{ 'min-width': '50rem' }"
250
+ >
203
251
  <ng-template #header>
204
252
  <tr>
205
253
  <th>{{ 'iam.action.name' | translate }}</th>
206
- <th class="hidden md:table-cell">{{ 'iam.action.code' | translate }}</th>
254
+ <th class="hidden md:table-cell">
255
+ {{ 'iam.action.code' | translate }}
256
+ </th>
207
257
  <th>{{ 'iam.action.type' | translate }}</th>
208
- <th class="hidden sm:table-cell">{{ 'shared.active' | translate }}</th>
209
- <th class="hidden lg:table-cell">{{ 'shared.read.only' | translate }}</th>
258
+ <th class="hidden sm:table-cell">
259
+ {{ 'shared.active' | translate }}
260
+ </th>
261
+ <th class="hidden lg:table-cell">
262
+ {{ 'shared.read.only' | translate }}
263
+ </th>
210
264
  <th class="w-[100px]">{{ 'shared.actions' | translate }}</th>
211
265
  </tr>
212
266
  </ng-template>
@@ -220,17 +274,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
220
274
  <td>
221
275
  <p-tag
222
276
  [value]="getActionTypeLabel(rowData.actionType)"
223
- [severity]="getActionTypeSeverity(rowData.actionType)" />
277
+ [severity]="getActionTypeSeverity(rowData.actionType)"
278
+ />
224
279
  </td>
225
280
  <td class="hidden sm:table-cell">
226
281
  <p-tag
227
- [value]="rowData.isActive ? ('shared.active' | translate) : ('shared.inactive' | translate)"
228
- [severity]="rowData.isActive ? 'success' : 'secondary'" />
282
+ [value]="
283
+ rowData.isActive
284
+ ? ('shared.active' | translate)
285
+ : ('shared.inactive' | translate)
286
+ "
287
+ [severity]="rowData.isActive ? 'success' : 'secondary'"
288
+ />
229
289
  </td>
230
290
  <td class="hidden lg:table-cell">
231
291
  <p-tag
232
- [value]="rowData.readOnly ? ('shared.yes' | translate) : ('shared.no' | translate)"
233
- [severity]="rowData.readOnly ? 'warn' : 'secondary'" />
292
+ [value]="
293
+ rowData.readOnly
294
+ ? ('shared.yes' | translate)
295
+ : ('shared.no' | translate)
296
+ "
297
+ [severity]="rowData.readOnly ? 'warn' : 'secondary'"
298
+ />
234
299
  </td>
235
300
  <td>
236
301
  <div class="flex gap-1">
@@ -240,8 +305,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
240
305
  [text]="true"
241
306
  severity="secondary"
242
307
  size="small"
308
+ [disabled]="rowData.readOnly"
243
309
  [pTooltip]="'shared.edit' | translate"
244
- (onClick)="onEdit(rowData)" />
310
+ (onClick)="onEdit(rowData)"
311
+ />
245
312
  <p-button
246
313
  *hasPermission="ACTION_PERMISSIONS.DELETE"
247
314
  icon="pi pi-trash"
@@ -250,14 +317,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
250
317
  size="small"
251
318
  [pTooltip]="'shared.delete' | translate"
252
319
  [disabled]="rowData.readOnly"
253
- (onClick)="onDelete(rowData)" />
320
+ (onClick)="onDelete(rowData)"
321
+ />
254
322
  </div>
255
323
  </td>
256
324
  </tr>
257
325
  </ng-template>
258
326
  <ng-template #emptymessage>
259
327
  <tr>
260
- <td colspan="6" class="text-center py-4 text-muted-color">{{ 'iam.action.no.actions' | translate }}</td>
328
+ <td colspan="6" class="text-center py-4 text-muted-color">
329
+ {{ 'iam.action.no.actions' | translate }}
330
+ </td>
261
331
  </tr>
262
332
  </ng-template>
263
333
  </p-treeTable>
@@ -268,4 +338,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
268
338
  }], ctorParameters: () => [] });
269
339
 
270
340
  export { ActionListPageComponent };
271
- //# sourceMappingURL=flusys-ng-iam-action-list-page.component-DRK79zUR.mjs.map
341
+ //# sourceMappingURL=flusys-ng-iam-action-list-page.component-BIA9UpeH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flusys-ng-iam-action-list-page.component-BIA9UpeH.mjs","sources":["../../../projects/ng-iam/pages/action/action-list-page.component.ts"],"sourcesContent":["import { Component, effect, inject, signal, untracked } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { LAYOUT_AUTH_STATE } from '@flusys/ng-layout';\nimport {\n ACTION_PERMISSIONS,\n AngularModule,\n HasPermissionDirective,\n PrimeModule,\n TranslatePipe,\n TranslateService,\n} from '@flusys/ng-shared';\nimport { ConfirmationService, MessageService, TreeNode } from 'primeng/api';\nimport { TagModule } from 'primeng/tag';\nimport { firstValueFrom } from 'rxjs';\nimport { ActionType, IAction } from '../../interfaces/action.interface';\nimport { ActionApiService } from '../../services/action-api.service';\nimport { convertActionToTreeNode } from '../../utils/tree-utils';\n\n@Component({\n selector: 'lib-action-list-page',\n imports: [\n AngularModule,\n PrimeModule,\n TagModule,\n HasPermissionDirective,\n TranslatePipe,\n ],\n template: `\n <div class=\"card\">\n <div\n class=\"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4\"\n >\n <h3 class=\"text-lg sm:text-xl font-semibold\">\n {{ 'iam.action.title' | translate }}\n </h3>\n <p-button\n *hasPermission=\"ACTION_PERMISSIONS.CREATE\"\n [label]=\"'iam.action.new' | translate\"\n icon=\"pi pi-plus\"\n (onClick)=\"onCreate()\"\n styleClass=\"w-full sm:w-auto\"\n />\n </div>\n\n <div class=\"overflow-x-auto -mx-4 sm:mx-0\">\n <p-treeTable\n [value]=\"treeNodes()\"\n [loading]=\"isLoading()\"\n dataKey=\"id\"\n styleClass=\"p-treetable-sm\"\n [tableStyle]=\"{ 'min-width': '50rem' }\"\n >\n <ng-template #header>\n <tr>\n <th>{{ 'iam.action.name' | translate }}</th>\n <th class=\"hidden md:table-cell\">\n {{ 'iam.action.code' | translate }}\n </th>\n <th>{{ 'iam.action.type' | translate }}</th>\n <th class=\"hidden sm:table-cell\">\n {{ 'shared.active' | translate }}\n </th>\n <th class=\"hidden lg:table-cell\">\n {{ 'shared.read.only' | translate }}\n </th>\n <th class=\"w-[100px]\">{{ 'shared.actions' | translate }}</th>\n </tr>\n </ng-template>\n <ng-template #body let-rowNode let-rowData=\"rowData\">\n <tr>\n <td>\n <p-treeTableToggler [rowNode]=\"rowNode\" />\n {{ rowData.name }}\n </td>\n <td class=\"hidden md:table-cell\">{{ rowData.code ?? '-' }}</td>\n <td>\n <p-tag\n [value]=\"getActionTypeLabel(rowData.actionType)\"\n [severity]=\"getActionTypeSeverity(rowData.actionType)\"\n />\n </td>\n <td class=\"hidden sm:table-cell\">\n <p-tag\n [value]=\"\n rowData.isActive\n ? ('shared.active' | translate)\n : ('shared.inactive' | translate)\n \"\n [severity]=\"rowData.isActive ? 'success' : 'secondary'\"\n />\n </td>\n <td class=\"hidden lg:table-cell\">\n <p-tag\n [value]=\"\n rowData.readOnly\n ? ('shared.yes' | translate)\n : ('shared.no' | translate)\n \"\n [severity]=\"rowData.readOnly ? 'warn' : 'secondary'\"\n />\n </td>\n <td>\n <div class=\"flex gap-1\">\n <p-button\n *hasPermission=\"ACTION_PERMISSIONS.UPDATE\"\n icon=\"pi pi-pencil\"\n [text]=\"true\"\n severity=\"secondary\"\n size=\"small\"\n [disabled]=\"rowData.readOnly\"\n [pTooltip]=\"'shared.edit' | translate\"\n (onClick)=\"onEdit(rowData)\"\n />\n <p-button\n *hasPermission=\"ACTION_PERMISSIONS.DELETE\"\n icon=\"pi pi-trash\"\n [text]=\"true\"\n severity=\"danger\"\n size=\"small\"\n [pTooltip]=\"'shared.delete' | translate\"\n [disabled]=\"rowData.readOnly\"\n (onClick)=\"onDelete(rowData)\"\n />\n </div>\n </td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr>\n <td colspan=\"6\" class=\"text-center py-4 text-muted-color\">\n {{ 'iam.action.no.actions' | translate }}\n </td>\n </tr>\n </ng-template>\n </p-treeTable>\n </div>\n </div>\n `,\n})\nexport class ActionListPageComponent {\n readonly ACTION_PERMISSIONS = ACTION_PERMISSIONS;\n\n private readonly router = inject(Router);\n private readonly companyContext = inject(LAYOUT_AUTH_STATE);\n private readonly actionApi = inject(ActionApiService);\n private readonly messageService = inject(MessageService);\n private readonly confirmationService = inject(ConfirmationService);\n private readonly translateAdapter = inject(TranslateService, {\n optional: true,\n });\n\n readonly isLoading = signal(false);\n readonly treeNodes = signal<TreeNode<IAction>[]>([]);\n\n private translate(\n key: string,\n vars?: Record<string, string | number>,\n ): string {\n return this.translateAdapter?.translate(key, vars) ?? key;\n }\n\n private static readonly TYPE_SEVERITIES: Record<\n ActionType,\n 'info' | 'success' | 'warn'\n > = {\n [ActionType.BACKEND]: 'info',\n [ActionType.FRONTEND]: 'success',\n [ActionType.BOTH]: 'warn',\n };\n\n private static readonly TYPE_LABEL_KEYS: Record<ActionType, string> = {\n [ActionType.BACKEND]: 'iam.action.type.backend',\n [ActionType.FRONTEND]: 'iam.action.type.frontend',\n [ActionType.BOTH]: 'iam.action.type.both',\n };\n\n constructor() {\n effect(() => {\n this.companyContext.currentCompanyInfo();\n untracked(() => this.loadActions());\n });\n }\n\n private async loadActions(): Promise<void> {\n this.isLoading.set(true);\n try {\n const response = await firstValueFrom(this.actionApi.getTree());\n this.treeNodes.set(\n convertActionToTreeNode(response?.success ? (response.data ?? []) : []),\n );\n } catch {\n // Handled by global interceptor\n } finally {\n this.isLoading.set(false);\n }\n }\n\n getActionTypeLabel(type: ActionType): string {\n const key =\n ActionListPageComponent.TYPE_LABEL_KEYS[type] ?? 'shared.unknown';\n return this.translate(key);\n }\n\n getActionTypeSeverity(type: ActionType): 'info' | 'success' | 'warn' {\n return ActionListPageComponent.TYPE_SEVERITIES[type] ?? 'info';\n }\n\n onCreate(): void {\n this.router.navigate(['/iam/actions/new']);\n }\n\n onEdit(action: IAction): void {\n this.router.navigate(['/iam/actions', action.id]);\n }\n\n onDelete(action: IAction): void {\n if (!action?.id || !action?.name) return;\n\n this.confirmationService.confirm({\n message: this.translate('shared.confirm.delete.item', {\n name: action.name,\n }),\n header: this.translate('iam.action.delete.title'),\n icon: 'pi pi-exclamation-triangle',\n accept: async () => {\n try {\n const response = await this.actionApi.delete({\n id: action.id,\n type: 'delete',\n });\n await this.loadActions();\n this.messageService.add({\n severity: 'success',\n summary: this.translate('shared.success'),\n detail: response?.messageKey\n ? this.translate(\n response.messageKey,\n response.messageVariables as Record<string, string | number>,\n )\n : (response?.message ?? ''),\n });\n } catch {\n // Handled by global interceptor\n }\n },\n });\n }\n}\n"],"names":["i1","i2","i3","i4"],"mappings":";;;;;;;;;;;;;;MA2Ia,uBAAuB,CAAA;IACzB,kBAAkB,GAAG,kBAAkB;AAE/B,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACpC,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,IAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,EAAE;AAC3D,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC;AAEO,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,qDAAC;AACzB,IAAA,SAAS,GAAG,MAAM,CAAsB,EAAE,qDAAC;IAE5C,SAAS,CACf,GAAW,EACX,IAAsC,EAAA;AAEtC,QAAA,OAAO,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,GAAG;IAC3D;IAEQ,OAAgB,eAAe,GAGnC;AACF,QAAA,CAAC,UAAU,CAAC,OAAO,GAAG,MAAM;AAC5B,QAAA,CAAC,UAAU,CAAC,QAAQ,GAAG,SAAS;AAChC,QAAA,CAAC,UAAU,CAAC,IAAI,GAAG,MAAM;KAC1B;IAEO,OAAgB,eAAe,GAA+B;AACpE,QAAA,CAAC,UAAU,CAAC,OAAO,GAAG,yBAAyB;AAC/C,QAAA,CAAC,UAAU,CAAC,QAAQ,GAAG,0BAA0B;AACjD,QAAA,CAAC,UAAU,CAAC,IAAI,GAAG,sBAAsB;KAC1C;AAED,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,IAAI,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AA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,gBAAA,EAAA,QAAA,EAAA,6DAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACX,SAAS,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACT,sBAAsB,kFACtB,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAkHJ,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAzHnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,OAAO,EAAE;wBACP,aAAa;wBACb,WAAW;wBACX,SAAS;wBACT,sBAAsB;wBACtB,aAAa;AACd,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GT,EAAA,CAAA;AACF,iBAAA;;;;;"}
@@ -1,9 +1,9 @@
1
- import { HttpClient } from '@angular/common/http';
2
1
  import * as i0 from '@angular/core';
3
- import { inject, Injectable, signal, input, output, effect, Component, computed, DestroyRef } from '@angular/core';
4
- import { ApiResourceService, PermissionValidatorService, AngularModule, PrimeModule, TranslatePipe, ROLE_ACTION_PERMISSIONS, HasPermissionDirective, COMPANY_ACTION_PERMISSIONS, COMPANY_API_PROVIDER, USER_ROLE_PERMISSIONS, USER_PERMISSION_PROVIDER, UserSelectComponent, USER_ACTION_PERMISSIONS, PROFILE_PERMISSION_PROVIDER, permissionGuard, ACTION_PERMISSIONS, ROLE_PERMISSIONS, anyPermissionGuard, resolveTranslationModule, SHARED_MESSAGES } from '@flusys/ng-shared';
5
- import { APP_CONFIG, getServiceUrl, TRANSLATE_ADAPTER, BaseApiService, isCompanyFeatureEnabled } from '@flusys/ng-core';
2
+ import { Injectable, inject, signal, input, output, effect, Component, computed, DestroyRef } from '@angular/core';
3
+ import { ApiResourceService, TranslateService, PermissionValidatorService, AngularModule, PrimeModule, TranslatePipe, ROLE_ACTION_PERMISSIONS, HasPermissionDirective, COMPANY_ACTION_PERMISSIONS, COMPANY_API_PROVIDER, USER_ROLE_PERMISSIONS, USER_PERMISSION_PROVIDER, UserSelectComponent, USER_ACTION_PERMISSIONS, PROFILE_PERMISSION_PROVIDER, permissionGuard, ACTION_PERMISSIONS, ROLE_PERMISSIONS, anyPermissionGuard, resolveTranslationModule, SHARED_MESSAGES } from '@flusys/ng-shared';
4
+ import { APP_CONFIG, getServiceUrl, BaseApiService, isCompanyFeatureEnabled } from '@flusys/ng-core';
6
5
  import { ConfirmationService, MessageService } from 'primeng/api';
6
+ import { HttpClient } from '@angular/common/http';
7
7
  import { of, firstValueFrom, map as map$1 } from 'rxjs';
8
8
  import { tap, catchError, map } from 'rxjs/operators';
9
9
  import * as i1 from '@angular/common';
@@ -225,7 +225,7 @@ const IAM_MESSAGES = {
225
225
 
226
226
  class RoleApiService extends ApiResourceService {
227
227
  constructor() {
228
- super('roles', inject(HttpClient), 'iam');
228
+ super('roles', 'iam');
229
229
  }
230
230
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: RoleApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
231
231
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: RoleApiService, providedIn: 'root' });
@@ -238,7 +238,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
238
238
  class ActionApiService extends ApiResourceService {
239
239
  appConfig = inject(APP_CONFIG);
240
240
  constructor() {
241
- super('actions', inject(HttpClient), 'iam');
241
+ super('actions', 'iam');
242
242
  }
243
243
  /** Get actions filtered by company whitelist for permission assignment */
244
244
  getActionsForPermission() {
@@ -327,7 +327,9 @@ function evaluateLogicNodeWithMissing(node, selectedActionIds) {
327
327
  class ActionPermissionLogicService {
328
328
  confirmationService = inject(ConfirmationService);
329
329
  messageService = inject(MessageService);
330
- translateAdapter = inject(TRANSLATE_ADAPTER, { optional: true });
330
+ translateAdapter = inject(TranslateService, {
331
+ optional: true,
332
+ });
331
333
  t(key, variables) {
332
334
  return this.translateAdapter?.translate(key, variables) ?? key;
333
335
  }
@@ -419,7 +421,9 @@ class ActionPermissionLogicService {
419
421
  this.messageService.add({
420
422
  severity: 'warning',
421
423
  summary: this.t('iam.logic.invalid.actions.removed'),
422
- detail: this.t('iam.logic.removed.actions.detail', { count: invalidActions.length }),
424
+ detail: this.t('iam.logic.removed.actions.detail', {
425
+ count: invalidActions.length,
426
+ }),
423
427
  });
424
428
  },
425
429
  reject: () => {
@@ -450,7 +454,9 @@ class ActionPermissionLogicService {
450
454
  }
451
455
  /** Build dynamic logic tree message with AND/OR operators and nesting */
452
456
  buildLogicMessage(logic, _missingActions, allActions, currentSelection) {
453
- const selectedIds = currentSelection ? this.getSelectedIds(currentSelection) : new Set();
457
+ const selectedIds = currentSelection
458
+ ? this.getSelectedIds(currentSelection)
459
+ : new Set();
454
460
  const actionMap = new Map(allActions.map((a) => [a.id, a]));
455
461
  return this.formatLogicNode(logic, selectedIds, actionMap, 0);
456
462
  }
@@ -510,12 +516,19 @@ class ActionPermissionLogicService {
510
516
  : missingActions;
511
517
  const selectionCount = actionsToSelect.length;
512
518
  const sanitizedActionName = this.sanitizeHtml(action.name ?? this.t('iam.logic.unknown.action'));
513
- const acceptLabel = selectionCount === 0 ? this.t('iam.logic.select.action.label') : this.t('iam.logic.auto.select.actions');
519
+ const acceptLabel = selectionCount === 0
520
+ ? this.t('iam.logic.select.action.label')
521
+ : this.t('iam.logic.auto.select.actions');
514
522
  const detailMessage = selectionCount === 0
515
523
  ? this.t('iam.logic.action.selected.detail')
516
524
  : this.t('iam.logic.auto.selected.detail', { count: selectionCount });
517
- const suffix = selectionCount < missingActions.length ? this.t('iam.logic.minimum.required') : '';
518
- const autoSelectPrompt = this.t('iam.logic.auto.select.prompt', { count: selectionCount, suffix });
525
+ const suffix = selectionCount < missingActions.length
526
+ ? this.t('iam.logic.minimum.required')
527
+ : '';
528
+ const autoSelectPrompt = this.t('iam.logic.auto.select.prompt', {
529
+ count: selectionCount,
530
+ suffix,
531
+ });
519
532
  this.confirmationService.confirm({
520
533
  header: this.t('iam.logic.missing.prerequisites'),
521
534
  message: `<strong>${sanitizedActionName}</strong> ${this.t('iam.logic.requires.conditions')}<br/><br/>${logicMessage}<br/><br/><strong>${autoSelectPrompt}</strong><br/>${this.t('iam.logic.would.you.continue')}`,
@@ -572,7 +585,9 @@ class ActionPermissionLogicService {
572
585
  header: this.t('iam.logic.dependency.warning'),
573
586
  message,
574
587
  icon: 'pi pi-exclamation-triangle',
575
- acceptLabel: alternatives.length > 0 ? this.t('iam.logic.use.alternatives') : this.t('iam.logic.remove.all'),
588
+ acceptLabel: alternatives.length > 0
589
+ ? this.t('iam.logic.use.alternatives')
590
+ : this.t('iam.logic.remove.all'),
576
591
  rejectLabel: this.t('shared.cancel'),
577
592
  acceptIcon: 'pi pi-check',
578
593
  rejectIcon: 'pi pi-times',
@@ -601,7 +616,10 @@ class ActionPermissionLogicService {
601
616
  this.messageService.add({
602
617
  severity: 'warn',
603
618
  summary: this.t('iam.logic.actions.removed'),
604
- detail: this.t('iam.logic.removed.with.dependents', { name: action.name ?? '', count: affectedActions.length }),
619
+ detail: this.t('iam.logic.removed.with.dependents', {
620
+ name: action.name ?? '',
621
+ count: affectedActions.length,
622
+ }),
605
623
  });
606
624
  }
607
625
  onUpdate(selMap);
@@ -1363,7 +1381,9 @@ function convertActionToTreeNode(actions) {
1363
1381
 
1364
1382
  class BaseActionSelectorComponent {
1365
1383
  permissionLogic = inject(ActionPermissionLogicService);
1366
- translateAdapter = inject(TRANSLATE_ADAPTER, { optional: true });
1384
+ translateAdapter = inject(TranslateService, {
1385
+ optional: true,
1386
+ });
1367
1387
  loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
1368
1388
  saving = signal(false, ...(ngDevMode ? [{ debugName: "saving" }] : []));
1369
1389
  _actions = signal([], ...(ngDevMode ? [{ debugName: "_actions" }] : []));
@@ -1395,7 +1415,8 @@ class BaseActionSelectorComponent {
1395
1415
  const allActions = this.actions();
1396
1416
  const unmetSet = new Set();
1397
1417
  for (const action of allActions) {
1398
- if (action.id && this.permissionLogic.hasUnmetPrerequisites(action, selMap, allActions)) {
1418
+ if (action.id &&
1419
+ this.permissionLogic.hasUnmetPrerequisites(action, selMap, allActions)) {
1399
1420
  unmetSet.add(action.id);
1400
1421
  }
1401
1422
  }
@@ -1417,7 +1438,9 @@ class BaseActionSelectorComponent {
1417
1438
  return this.translateAdapter?.translate(key, vars) ?? key;
1418
1439
  }
1419
1440
  hasUnmetPrerequisites(action) {
1420
- return action.id ? this.actionsWithUnmetPrerequisites().has(action.id) : false;
1441
+ return action.id
1442
+ ? this.actionsWithUnmetPrerequisites().has(action.id)
1443
+ : false;
1421
1444
  }
1422
1445
  getTooltip(action) {
1423
1446
  const selMap = this.selectionMap();
@@ -2806,7 +2829,7 @@ class UserRoleSelectorComponent {
2806
2829
  roleApi = inject(RoleApiService);
2807
2830
  permissionApi = inject(PermissionApiService);
2808
2831
  messageService = inject(MessageService);
2809
- translateAdapter = inject(TRANSLATE_ADAPTER, {
2832
+ translateAdapter = inject(TranslateService, {
2810
2833
  optional: true,
2811
2834
  });
2812
2835
  translate(key, vars) {
@@ -4396,7 +4419,7 @@ const IAM_ROUTES = [
4396
4419
  {
4397
4420
  path: '',
4398
4421
  resolve: { translations: resolveTranslationModule({ modules: ['iam'], fallbackMessages: { ...IAM_MESSAGES, ...SHARED_MESSAGES } }) },
4399
- loadComponent: () => import('./flusys-ng-iam-iam-container.component-CQA2B6cU.mjs').then((m) => m.IamContainerComponent),
4422
+ loadComponent: () => import('./flusys-ng-iam-iam-container.component-DAiS1Mtk.mjs').then((m) => m.IamContainerComponent),
4400
4423
  children: [
4401
4424
  // Actions Management
4402
4425
  {
@@ -4405,15 +4428,15 @@ const IAM_ROUTES = [
4405
4428
  children: [
4406
4429
  {
4407
4430
  path: '',
4408
- loadComponent: () => import('./flusys-ng-iam-action-list-page.component-DRK79zUR.mjs').then((m) => m.ActionListPageComponent),
4431
+ loadComponent: () => import('./flusys-ng-iam-action-list-page.component-BIA9UpeH.mjs').then((m) => m.ActionListPageComponent),
4409
4432
  },
4410
4433
  {
4411
4434
  path: 'new',
4412
- loadComponent: () => import('./flusys-ng-iam-action-form-page.component-D_vwcCjG.mjs').then((m) => m.ActionFormPageComponent),
4435
+ loadComponent: () => import('./flusys-ng-iam-action-form-page.component-DMrFt5MP.mjs').then((m) => m.ActionFormPageComponent),
4413
4436
  },
4414
4437
  {
4415
4438
  path: ':id',
4416
- loadComponent: () => import('./flusys-ng-iam-action-form-page.component-D_vwcCjG.mjs').then((m) => m.ActionFormPageComponent),
4439
+ loadComponent: () => import('./flusys-ng-iam-action-form-page.component-DMrFt5MP.mjs').then((m) => m.ActionFormPageComponent),
4417
4440
  },
4418
4441
  ],
4419
4442
  },
@@ -4424,15 +4447,15 @@ const IAM_ROUTES = [
4424
4447
  children: [
4425
4448
  {
4426
4449
  path: '',
4427
- loadComponent: () => import('./flusys-ng-iam-role-list-page.component-CT7CvvHj.mjs').then((m) => m.RoleListPageComponent),
4450
+ loadComponent: () => import('./flusys-ng-iam-role-list-page.component-CuHewjjr.mjs').then((m) => m.RoleListPageComponent),
4428
4451
  },
4429
4452
  {
4430
4453
  path: 'new',
4431
- loadComponent: () => import('./flusys-ng-iam-role-form-page.component-49dKMKOj.mjs').then((m) => m.RoleFormPageComponent),
4454
+ loadComponent: () => import('./flusys-ng-iam-role-form-page.component-TfZDInlN.mjs').then((m) => m.RoleFormPageComponent),
4432
4455
  },
4433
4456
  {
4434
4457
  path: ':id',
4435
- loadComponent: () => import('./flusys-ng-iam-role-form-page.component-49dKMKOj.mjs').then((m) => m.RoleFormPageComponent),
4458
+ loadComponent: () => import('./flusys-ng-iam-role-form-page.component-TfZDInlN.mjs').then((m) => m.RoleFormPageComponent),
4436
4459
  },
4437
4460
  ],
4438
4461
  },
@@ -4447,7 +4470,7 @@ const IAM_ROUTES = [
4447
4470
  COMPANY_ACTION_PERMISSIONS.READ,
4448
4471
  ]),
4449
4472
  ],
4450
- loadComponent: () => import('./flusys-ng-iam-permission-page.component-CZebeUhC.mjs').then((m) => m.PermissionPageComponent),
4473
+ loadComponent: () => import('./flusys-ng-iam-permission-page.component-BFZCb8Md.mjs').then((m) => m.PermissionPageComponent),
4451
4474
  },
4452
4475
  // Default redirect to actions
4453
4476
  {
@@ -4466,4 +4489,4 @@ const IAM_ROUTES = [
4466
4489
  */
4467
4490
 
4468
4491
  export { ActionApiService as A, CompanyActionSelectorComponent as C, IAM_MESSAGES as I, LogicBuilderComponent as L, MAX_DROPDOWN_ITEMS as M, PermissionApiService as P, RoleApiService as R, UserRoleSelectorComponent as U, ActionType as a, RoleActionSelectorComponent as b, convertActionToTreeNode as c, UserActionSelectorComponent as d, ActionPermissionLogicService as e, IAM_ROUTES as f, MyPermissionsApiService as g, PermissionStateService as h, ProfilePermissionProviderAdapter as i, provideIamProviders as p };
4469
- //# sourceMappingURL=flusys-ng-iam-flusys-ng-iam-C6I4k78L.mjs.map
4492
+ //# sourceMappingURL=flusys-ng-iam-flusys-ng-iam-Cfo9kP14.mjs.map