@flusys/ng-iam 5.5.0 → 6.0.0-beta.2

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 (25) hide show
  1. package/fesm2022/{flusys-ng-iam-action-form-page.component-BGEON5_n.mjs → flusys-ng-iam-action-form-page.component-DTJT8Dc-.mjs} +56 -66
  2. package/fesm2022/flusys-ng-iam-action-form-page.component-DTJT8Dc-.mjs.map +1 -0
  3. package/fesm2022/{flusys-ng-iam-action-list-page.component-BQvx2btD.mjs → flusys-ng-iam-action-list-page.component-B1hUE4lD.mjs} +39 -46
  4. package/fesm2022/flusys-ng-iam-action-list-page.component-B1hUE4lD.mjs.map +1 -0
  5. package/fesm2022/{flusys-ng-iam-flusys-ng-iam-C9rdGS64.mjs → flusys-ng-iam-flusys-ng-iam-DzIO0zsO.mjs} +325 -385
  6. package/fesm2022/flusys-ng-iam-flusys-ng-iam-DzIO0zsO.mjs.map +1 -0
  7. package/fesm2022/flusys-ng-iam-iam-container.component-D0m8u6nu.mjs +105 -0
  8. package/fesm2022/flusys-ng-iam-iam-container.component-D0m8u6nu.mjs.map +1 -0
  9. package/fesm2022/{flusys-ng-iam-permission-page.component-DV8qtLcu.mjs → flusys-ng-iam-permission-page.component-rcijgKmE.mjs} +17 -20
  10. package/fesm2022/flusys-ng-iam-permission-page.component-rcijgKmE.mjs.map +1 -0
  11. package/fesm2022/{flusys-ng-iam-role-form-page.component-CR1tl17E.mjs → flusys-ng-iam-role-form-page.component-DrUQ0taO.mjs} +24 -26
  12. package/fesm2022/flusys-ng-iam-role-form-page.component-DrUQ0taO.mjs.map +1 -0
  13. package/fesm2022/{flusys-ng-iam-role-list-page.component-DVto37LL.mjs → flusys-ng-iam-role-list-page.component-BcS9_ysT.mjs} +35 -42
  14. package/fesm2022/flusys-ng-iam-role-list-page.component-BcS9_ysT.mjs.map +1 -0
  15. package/fesm2022/flusys-ng-iam.mjs +1 -1
  16. package/package.json +5 -7
  17. package/types/flusys-ng-iam.d.ts +2 -2
  18. package/fesm2022/flusys-ng-iam-action-form-page.component-BGEON5_n.mjs.map +0 -1
  19. package/fesm2022/flusys-ng-iam-action-list-page.component-BQvx2btD.mjs.map +0 -1
  20. package/fesm2022/flusys-ng-iam-flusys-ng-iam-C9rdGS64.mjs.map +0 -1
  21. package/fesm2022/flusys-ng-iam-iam-container.component-DEuc_l2i.mjs +0 -119
  22. package/fesm2022/flusys-ng-iam-iam-container.component-DEuc_l2i.mjs.map +0 -1
  23. package/fesm2022/flusys-ng-iam-permission-page.component-DV8qtLcu.mjs.map +0 -1
  24. package/fesm2022/flusys-ng-iam-role-form-page.component-CR1tl17E.mjs.map +0 -1
  25. package/fesm2022/flusys-ng-iam-role-list-page.component-DVto37LL.mjs.map +0 -1
@@ -3,13 +3,11 @@ import { inject, signal, computed, effect, Component } from '@angular/core';
3
3
  import { toSignal } from '@angular/core/rxjs-interop';
4
4
  import { form, required, FormField } from '@angular/forms/signals';
5
5
  import { ActivatedRoute, Router } from '@angular/router';
6
- import { TranslateService, AngularModule, PrimeModule, TranslatePipe } from '@flusys/ng-shared';
7
- import { MessageService } from 'primeng/api';
8
- import { A as ActionApiService, a as ActionType, L as LogicBuilderComponent } from './flusys-ng-iam-flusys-ng-iam-C9rdGS64.mjs';
6
+ import * as i2 from '@flusys/ng-ui';
7
+ import { MessageService, UiModule } from '@flusys/ng-ui';
8
+ import { TranslateService, AngularModule, TranslatePipe } from '@flusys/ng-shared';
9
+ import { A as ActionApiService, a as ActionType, L as LogicBuilderComponent } from './flusys-ng-iam-flusys-ng-iam-DzIO0zsO.mjs';
9
10
  import * as i1 from '@angular/forms';
10
- import * as i2 from 'primeng/button';
11
- import * as i3 from 'primeng/checkbox';
12
- import * as i4 from 'primeng/inputtext';
13
11
 
14
12
  class ActionFormPageComponent {
15
13
  route = inject(ActivatedRoute);
@@ -194,8 +192,8 @@ class ActionFormPageComponent {
194
192
  onLogicChange(logic) {
195
193
  this.formModel.update((model) => ({ ...model, permissionLogic: logic }));
196
194
  }
197
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ActionFormPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
198
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: ActionFormPageComponent, isStandalone: true, selector: "lib-action-form-page", ngImport: i0, template: `
195
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ActionFormPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
196
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ActionFormPageComponent, isStandalone: true, selector: "lib-action-form-page", ngImport: i0, template: `
199
197
  <div class="card">
200
198
  <h3 class="text-lg sm:text-xl font-semibold mb-4">
201
199
  {{
@@ -215,7 +213,7 @@ class ActionFormPageComponent {
215
213
  >{{ 'iam.action.name' | translate }} *</label
216
214
  >
217
215
  <input
218
- pInputText
216
+ fInputText
219
217
  id="name"
220
218
  [formField]="actionForm.name"
221
219
  [placeholder]="'iam.action.name.placeholder' | translate"
@@ -228,7 +226,7 @@ class ActionFormPageComponent {
228
226
  'iam.action.code' | translate
229
227
  }}</label>
230
228
  <input
231
- pInputText
229
+ fInputText
232
230
  id="code"
233
231
  [formField]="actionForm.code"
234
232
  [placeholder]="'iam.action.code.placeholder' | translate"
@@ -241,7 +239,7 @@ class ActionFormPageComponent {
241
239
  'shared.description' | translate
242
240
  }}</label>
243
241
  <input
244
- pInputText
242
+ fInputText
245
243
  id="description"
246
244
  [formField]="actionForm.description"
247
245
  [placeholder]="'shared.description.placeholder' | translate"
@@ -253,15 +251,14 @@ class ActionFormPageComponent {
253
251
  <label for="actionType" class="font-medium"
254
252
  >{{ 'iam.action.type' | translate }} *</label
255
253
  >
256
- <select
257
- id="actionType"
258
- class="p-inputtext w-full"
254
+ <f-select
255
+ inputId="actionType"
256
+ [options]="actionTypes()"
257
+ optionLabel="label"
258
+ optionValue="value"
259
259
  [formField]="actionForm.actionType"
260
- >
261
- @for (type of actionTypes(); track type.value) {
262
- <option [value]="type.value">{{ type.label }}</option>
263
- }
264
- </select>
260
+ [placeholder]="'iam.action.type' | translate"
261
+ />
265
262
  </div>
266
263
 
267
264
  <!-- Parent Action -->
@@ -269,18 +266,15 @@ class ActionFormPageComponent {
269
266
  <label for="parentId" class="font-medium">{{
270
267
  'iam.action.parent' | translate
271
268
  }}</label>
272
- <select
273
- id="parentId"
274
- class="p-inputtext w-full"
269
+ <f-select
270
+ inputId="parentId"
271
+ [options]="availableActions()"
272
+ optionLabel="name"
273
+ optionValue="id"
275
274
  [formField]="actionForm.parentId"
276
- >
277
- <option value="">
278
- {{ 'iam.action.select.parent' | translate }}
279
- </option>
280
- @for (action of availableActions(); track action.id) {
281
- <option [value]="action.id">{{ action.name }}</option>
282
- }
283
- </select>
275
+ [placeholder]="'iam.action.select.parent' | translate"
276
+ [filter]="true"
277
+ />
284
278
  </div>
285
279
 
286
280
  <!-- Order -->
@@ -289,7 +283,7 @@ class ActionFormPageComponent {
289
283
  'shared.display.order' | translate
290
284
  }}</label>
291
285
  <input
292
- pInputText
286
+ fInputText
293
287
  id="serial"
294
288
  type="number"
295
289
  [formField]="actionForm.serial"
@@ -299,7 +293,7 @@ class ActionFormPageComponent {
299
293
 
300
294
  <!-- Is Active -->
301
295
  <div class="flex items-end gap-2 pb-1 md:col-span-2">
302
- <p-checkbox
296
+ <f-checkbox
303
297
  [formField]="actionForm.isActive"
304
298
  [binary]="true"
305
299
  inputId="isActive"
@@ -319,7 +313,7 @@ class ActionFormPageComponent {
319
313
  <!-- Actions -->
320
314
  <div class="flex justify-end gap-2 md:col-span-2 pt-4">
321
315
  <button
322
- pButton
316
+ fButton
323
317
  severity="secondary"
324
318
  [outlined]="true"
325
319
  (click)="onBack()"
@@ -327,12 +321,12 @@ class ActionFormPageComponent {
327
321
  <span pButtonLabel>{{ 'shared.cancel' | translate }}</span>
328
322
  </button>
329
323
  <button
330
- pButton
324
+ fButton
331
325
  type="submit"
332
326
  [disabled]="!isFormValid() || isLoading()"
333
327
  >
334
328
  @if (isLoading()) {
335
- <span pButtonIcon class="pi pi-spinner pi-spin"></span>
329
+ <ui-icon pButtonIcon name="spinner" [spin]="true"></ui-icon>
336
330
  }
337
331
  <span pButtonLabel>{{
338
332
  isEditMode()
@@ -343,15 +337,15 @@ class ActionFormPageComponent {
343
337
  </div>
344
338
  </form>
345
339
  </div>
346
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "directive", type: i2.ButtonLabel, selector: "[pButtonLabel]", inputs: ["pButtonLabelPT", "pButtonLabelUnstyled"] }, { kind: "directive", type: i2.ButtonIcon, selector: "[pButtonIcon]", inputs: ["pButtonIconPT", "pButtonUnstyled"] }, { kind: "component", type: i3.Checkbox, selector: "p-checkbox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: LogicBuilderComponent, selector: "lib-logic-builder", inputs: ["logic", "actions"], outputs: ["logicChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
340
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: UiModule }, { kind: "directive", type: i2.FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "rounded", "raised", "fluid", "disabled", "loading", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "component", type: i2.CheckboxComponent, selector: "f-checkbox", inputs: ["label", "binary", "disabled", "inputId", "invalid", "indeterminate", "touched", "styleClass", "checked"], outputs: ["onChange", "onBlur", "touch", "checkedChange"] }, { kind: "directive", type: i2.InputTextDirective, selector: "[fInputText]", inputs: ["invalid", "touched"] }, { kind: "component", type: i2.SelectComponent, selector: "f-select", inputs: ["options", "optionLabel", "optionValue", "placeholder", "disabled", "filter", "showClear", "loading", "inputId", "invalid", "touched", "styleClass", "editable"], outputs: ["onFilter", "onChange", "onShow", "onHide", "onBlur"] }, { kind: "component", type: i2.UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: LogicBuilderComponent, selector: "lib-logic-builder", inputs: ["logic", "actions"], outputs: ["logicChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
347
341
  }
348
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ActionFormPageComponent, decorators: [{
342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ActionFormPageComponent, decorators: [{
349
343
  type: Component,
350
344
  args: [{
351
345
  selector: 'lib-action-form-page',
352
346
  imports: [
353
347
  AngularModule,
354
- PrimeModule,
348
+ UiModule,
355
349
  FormField,
356
350
  LogicBuilderComponent,
357
351
  TranslatePipe,
@@ -376,7 +370,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
376
370
  >{{ 'iam.action.name' | translate }} *</label
377
371
  >
378
372
  <input
379
- pInputText
373
+ fInputText
380
374
  id="name"
381
375
  [formField]="actionForm.name"
382
376
  [placeholder]="'iam.action.name.placeholder' | translate"
@@ -389,7 +383,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
389
383
  'iam.action.code' | translate
390
384
  }}</label>
391
385
  <input
392
- pInputText
386
+ fInputText
393
387
  id="code"
394
388
  [formField]="actionForm.code"
395
389
  [placeholder]="'iam.action.code.placeholder' | translate"
@@ -402,7 +396,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
402
396
  'shared.description' | translate
403
397
  }}</label>
404
398
  <input
405
- pInputText
399
+ fInputText
406
400
  id="description"
407
401
  [formField]="actionForm.description"
408
402
  [placeholder]="'shared.description.placeholder' | translate"
@@ -414,15 +408,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
414
408
  <label for="actionType" class="font-medium"
415
409
  >{{ 'iam.action.type' | translate }} *</label
416
410
  >
417
- <select
418
- id="actionType"
419
- class="p-inputtext w-full"
411
+ <f-select
412
+ inputId="actionType"
413
+ [options]="actionTypes()"
414
+ optionLabel="label"
415
+ optionValue="value"
420
416
  [formField]="actionForm.actionType"
421
- >
422
- @for (type of actionTypes(); track type.value) {
423
- <option [value]="type.value">{{ type.label }}</option>
424
- }
425
- </select>
417
+ [placeholder]="'iam.action.type' | translate"
418
+ />
426
419
  </div>
427
420
 
428
421
  <!-- Parent Action -->
@@ -430,18 +423,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
430
423
  <label for="parentId" class="font-medium">{{
431
424
  'iam.action.parent' | translate
432
425
  }}</label>
433
- <select
434
- id="parentId"
435
- class="p-inputtext w-full"
426
+ <f-select
427
+ inputId="parentId"
428
+ [options]="availableActions()"
429
+ optionLabel="name"
430
+ optionValue="id"
436
431
  [formField]="actionForm.parentId"
437
- >
438
- <option value="">
439
- {{ 'iam.action.select.parent' | translate }}
440
- </option>
441
- @for (action of availableActions(); track action.id) {
442
- <option [value]="action.id">{{ action.name }}</option>
443
- }
444
- </select>
432
+ [placeholder]="'iam.action.select.parent' | translate"
433
+ [filter]="true"
434
+ />
445
435
  </div>
446
436
 
447
437
  <!-- Order -->
@@ -450,7 +440,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
450
440
  'shared.display.order' | translate
451
441
  }}</label>
452
442
  <input
453
- pInputText
443
+ fInputText
454
444
  id="serial"
455
445
  type="number"
456
446
  [formField]="actionForm.serial"
@@ -460,7 +450,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
460
450
 
461
451
  <!-- Is Active -->
462
452
  <div class="flex items-end gap-2 pb-1 md:col-span-2">
463
- <p-checkbox
453
+ <f-checkbox
464
454
  [formField]="actionForm.isActive"
465
455
  [binary]="true"
466
456
  inputId="isActive"
@@ -480,7 +470,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
480
470
  <!-- Actions -->
481
471
  <div class="flex justify-end gap-2 md:col-span-2 pt-4">
482
472
  <button
483
- pButton
473
+ fButton
484
474
  severity="secondary"
485
475
  [outlined]="true"
486
476
  (click)="onBack()"
@@ -488,12 +478,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
488
478
  <span pButtonLabel>{{ 'shared.cancel' | translate }}</span>
489
479
  </button>
490
480
  <button
491
- pButton
481
+ fButton
492
482
  type="submit"
493
483
  [disabled]="!isFormValid() || isLoading()"
494
484
  >
495
485
  @if (isLoading()) {
496
- <span pButtonIcon class="pi pi-spinner pi-spin"></span>
486
+ <ui-icon pButtonIcon name="spinner" [spin]="true"></ui-icon>
497
487
  }
498
488
  <span pButtonLabel>{{
499
489
  isEditMode()
@@ -509,4 +499,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
509
499
  }], ctorParameters: () => [] });
510
500
 
511
501
  export { ActionFormPageComponent };
512
- //# sourceMappingURL=flusys-ng-iam-action-form-page.component-BGEON5_n.mjs.map
502
+ //# sourceMappingURL=flusys-ng-iam-action-form-page.component-DTJT8Dc-.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flusys-ng-iam-action-form-page.component-DTJT8Dc-.mjs","sources":["../../../projects/ng-iam/pages/action/action-form-page.component.ts"],"sourcesContent":["import { Component, computed, effect, inject, signal } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { form, FormField, required } from '@angular/forms/signals';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { MessageService } from '@flusys/ng-ui';\nimport {\n AngularModule,\n ILogicNode,\n TranslatePipe,\n TranslateService,\n} from '@flusys/ng-shared';\nimport { LogicBuilderComponent } from '../../components/logic-builder.component';\nimport { ActionType, IAction } from '../../interfaces/action.interface';\nimport { ActionApiService } from '../../services/action-api.service';\nimport { UiModule } from '@flusys/ng-ui';\n\ninterface IActionFormModel {\n id: string;\n name: string;\n description: string;\n code: string;\n actionType: ActionType;\n permissionLogic: ILogicNode | null;\n parentId: string;\n serial: string;\n isActive: boolean;\n}\n\n@Component({\n selector: 'lib-action-form-page',\n imports: [\n AngularModule,\n UiModule,\n FormField,\n LogicBuilderComponent,\n TranslatePipe,\n ],\n template: `\n <div class=\"card\">\n <h3 class=\"text-lg sm:text-xl font-semibold mb-4\">\n {{\n isEditMode()\n ? ('iam.action.edit' | translate)\n : ('iam.action.new' | translate)\n }}\n </h3>\n\n <form\n (ngSubmit)=\"onSubmit()\"\n class=\"grid grid-cols-1 md:grid-cols-2 gap-4\"\n >\n <!-- Name -->\n <div class=\"flex flex-col gap-2\">\n <label for=\"name\" class=\"font-medium\"\n >{{ 'iam.action.name' | translate }} *</label\n >\n <input\n fInputText\n id=\"name\"\n [formField]=\"actionForm.name\"\n [placeholder]=\"'iam.action.name.placeholder' | translate\"\n />\n </div>\n\n <!-- Code -->\n <div class=\"flex flex-col gap-2\">\n <label for=\"code\" class=\"font-medium\">{{\n 'iam.action.code' | translate\n }}</label>\n <input\n fInputText\n id=\"code\"\n [formField]=\"actionForm.code\"\n [placeholder]=\"'iam.action.code.placeholder' | translate\"\n />\n </div>\n\n <!-- Description -->\n <div class=\"flex flex-col gap-2\">\n <label for=\"description\" class=\"font-medium\">{{\n 'shared.description' | translate\n }}</label>\n <input\n fInputText\n id=\"description\"\n [formField]=\"actionForm.description\"\n [placeholder]=\"'shared.description.placeholder' | translate\"\n />\n </div>\n\n <!-- Action Type -->\n <div class=\"flex flex-col gap-2\">\n <label for=\"actionType\" class=\"font-medium\"\n >{{ 'iam.action.type' | translate }} *</label\n >\n <f-select\n inputId=\"actionType\"\n [options]=\"actionTypes()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [formField]=\"actionForm.actionType\"\n [placeholder]=\"'iam.action.type' | translate\"\n />\n </div>\n\n <!-- Parent Action -->\n <div class=\"flex flex-col gap-2\">\n <label for=\"parentId\" class=\"font-medium\">{{\n 'iam.action.parent' | translate\n }}</label>\n <f-select\n inputId=\"parentId\"\n [options]=\"availableActions()\"\n optionLabel=\"name\"\n optionValue=\"id\"\n [formField]=\"actionForm.parentId\"\n [placeholder]=\"'iam.action.select.parent' | translate\"\n [filter]=\"true\"\n />\n </div>\n\n <!-- Order -->\n <div class=\"flex flex-col gap-2\">\n <label for=\"serial\" class=\"font-medium\">{{\n 'shared.display.order' | translate\n }}</label>\n <input\n fInputText\n id=\"serial\"\n type=\"number\"\n [formField]=\"actionForm.serial\"\n [placeholder]=\"'shared.display.order.placeholder' | translate\"\n />\n </div>\n\n <!-- Is Active -->\n <div class=\"flex items-end gap-2 pb-1 md:col-span-2\">\n <f-checkbox\n [formField]=\"actionForm.isActive\"\n [binary]=\"true\"\n inputId=\"isActive\"\n />\n <label for=\"isActive\">{{ 'shared.active' | translate }}</label>\n </div>\n\n <!-- Permission Logic Builder -->\n <div class=\"md:col-span-2\">\n <lib-logic-builder\n [logic]=\"formModel().permissionLogic\"\n [actions]=\"allActionsForLogic()\"\n (logicChange)=\"onLogicChange($event)\"\n />\n </div>\n\n <!-- Actions -->\n <div class=\"flex justify-end gap-2 md:col-span-2 pt-4\">\n <button\n fButton\n severity=\"secondary\"\n [outlined]=\"true\"\n (click)=\"onBack()\"\n >\n <span pButtonLabel>{{ 'shared.cancel' | translate }}</span>\n </button>\n <button\n fButton\n type=\"submit\"\n [disabled]=\"!isFormValid() || isLoading()\"\n >\n @if (isLoading()) {\n <ui-icon pButtonIcon name=\"spinner\" [spin]=\"true\"></ui-icon>\n }\n <span pButtonLabel>{{ \n isEditMode()\n ? ('shared.update' | translate)\n : ('shared.create' | translate)\n }}</span>\n </button>\n </div>\n </form>\n </div>\n `,\n})\nexport class ActionFormPageComponent {\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n private readonly actionApi = inject(ActionApiService);\n private readonly messageService = inject(MessageService);\n private readonly translateAdapter = inject(TranslateService, {\n optional: true,\n });\n private readonly routeParams = toSignal(this.route.paramMap);\n private initialized = false;\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 readonly isLoading = signal(false);\n readonly existingAction = signal<IAction | null>(null);\n readonly isEditMode = computed(() => !!this.existingAction());\n readonly allActionsForLogic = signal<Array<{ id: string; name: string }>>([]);\n readonly allActions = signal<IAction[]>([]);\n\n readonly availableActions = computed(() => {\n const actions = this.allActions();\n const currentId = this.existingAction()?.id;\n return currentId ? actions.filter((a) => a.id !== currentId) : actions;\n });\n\n readonly formModel = signal<IActionFormModel>({\n id: '',\n name: '',\n description: '',\n code: '',\n actionType: ActionType.BACKEND,\n permissionLogic: null,\n parentId: '',\n serial: '',\n isActive: true,\n });\n\n readonly actionTypes = computed(() => [\n {\n label: this.translate('iam.action.type.backend.label'),\n value: ActionType.BACKEND,\n },\n {\n label: this.translate('iam.action.type.frontend.label'),\n value: ActionType.FRONTEND,\n },\n {\n label: this.translate('iam.action.type.both.label'),\n value: ActionType.BOTH,\n },\n ]);\n\n readonly actionForm = form(this.formModel, (f) => {\n required(f.name, {\n message: this.translate('shared.validation.required', {\n field: this.translate('iam.action.name'),\n }),\n });\n });\n\n readonly isFormValid = computed(() => {\n const model = this.formModel();\n return model.name.trim().length > 0;\n });\n\n constructor() {\n effect(() => {\n const params = this.routeParams();\n if (!params || this.initialized) return;\n\n this.initialized = true;\n this.initializeForm(params.get('id'));\n });\n }\n\n private async initializeForm(id: string | null): Promise<void> {\n try {\n const response = await this.actionApi.getAll({\n pagination: { currentPage: 0, pageSize: 10000 },\n select: ['id', 'name', 'code', 'actionType', 'permissionLogic'],\n });\n if (response?.success && response.data) {\n this.allActionsForLogic.set(\n response.data.map((a) => ({\n id: a.id!,\n name: a.name ?? this.translate('shared.unnamed'),\n })),\n );\n this.allActions.set(response.data);\n }\n } catch {\n // Ignored - form will show empty parent dropdown\n }\n\n if (id && id !== 'new') {\n await this.loadAction(id);\n }\n }\n\n async loadAction(id: string): Promise<void> {\n this.isLoading.set(true);\n try {\n const response = await this.actionApi.findById(id, [\n 'id',\n 'name',\n 'description',\n 'code',\n 'actionType',\n 'permissionLogic',\n 'parentId',\n 'serial',\n 'isActive',\n ]);\n\n if (response?.success && response.data) {\n const action = response.data;\n this.existingAction.set(action);\n this.formModel.set({\n id: action.id ?? '',\n name: action.name ?? '',\n description: action.description ?? '',\n code: action.code ?? '',\n actionType: action.actionType ?? ActionType.BACKEND,\n permissionLogic: action.permissionLogic ?? null,\n parentId: action.parentId ?? '',\n serial: action.serial?.toString() ?? '',\n isActive: action.isActive ?? true,\n });\n } else {\n this.router.navigate(['/iam/actions']);\n }\n } catch {\n this.router.navigate(['/iam/actions']);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n async onSubmit(): Promise<void> {\n if (!this.isFormValid()) {\n this.messageService.add({\n severity: 'error',\n summary: this.translate('shared.validation.error'),\n detail: this.translate('shared.fill.required.fields'),\n });\n return;\n }\n\n this.isLoading.set(true);\n\n try {\n const formValue = this.formModel();\n const dto = {\n ...formValue,\n description: formValue.description || undefined,\n code: formValue.code || undefined,\n parentId: formValue.parentId || undefined,\n serial: formValue.serial ? parseInt(formValue.serial, 10) : undefined,\n permissionLogic: formValue.permissionLogic ?? undefined,\n };\n\n const response = this.isEditMode()\n ? await this.actionApi.update(dto)\n : await this.actionApi.insert(dto);\n\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\n this.router.navigate(['/iam/actions']);\n } catch {\n // Handled by global interceptor\n } finally {\n this.isLoading.set(false);\n }\n }\n\n onBack(): void {\n this.router.navigate(['/iam/actions']);\n }\n\n onLogicChange(logic: ILogicNode | null): void {\n this.formModel.update((model) => ({ ...model, permissionLog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AAA,EACR,SAAS,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACT,qBAAqB,iHACrB,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAoJJ,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBA3JnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,OAAO,EAAE;wBACP,aAAa;wBACb,QAAQ;wBACR,SAAS;wBACT,qBAAqB;wBACrB,aAAa;AACd,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgJT,EAAA,CAAA;AACF,iBAAA;;;;;"}
@@ -2,15 +2,11 @@ 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
4
  import { LAYOUT_AUTH_STATE } from '@flusys/ng-layout';
5
- import { ACTION_PERMISSIONS, TranslateService, AngularModule, PrimeModule, HasPermissionDirective, TranslatePipe } from '@flusys/ng-shared';
6
- import { MessageService, ConfirmationService } from 'primeng/api';
7
- import * as i5 from 'primeng/tag';
8
- import { TagModule } from 'primeng/tag';
5
+ import * as i2 from '@flusys/ng-ui';
6
+ import { MessageService, ConfirmationService, UiModule } from '@flusys/ng-ui';
7
+ import { ACTION_PERMISSIONS, TranslateService, AngularModule, HasPermissionDirective, TranslatePipe } from '@flusys/ng-shared';
9
8
  import { firstValueFrom } from 'rxjs';
10
- import { A as ActionApiService, a as ActionType, c as convertActionToTreeNode } from './flusys-ng-iam-flusys-ng-iam-C9rdGS64.mjs';
11
- import * as i2 from 'primeng/button';
12
- import * as i6 from 'primeng/tooltip';
13
- import * as i7 from 'primeng/treetable';
9
+ import { A as ActionApiService, a as ActionType, c as convertActionToTreeNode } from './flusys-ng-iam-flusys-ng-iam-DzIO0zsO.mjs';
14
10
 
15
11
  class ActionListPageComponent {
16
12
  ACTION_PERMISSIONS = ACTION_PERMISSIONS;
@@ -79,7 +75,7 @@ class ActionListPageComponent {
79
75
  name: action.name,
80
76
  }),
81
77
  header: this.translate('iam.action.delete.title'),
82
- icon: 'pi pi-exclamation-triangle',
78
+ icon: 'exclamation-triangle',
83
79
  accept: async () => {
84
80
  try {
85
81
  const response = await this.actionApi.delete({
@@ -101,8 +97,8 @@ class ActionListPageComponent {
101
97
  },
102
98
  });
103
99
  }
104
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ActionListPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
105
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.5", type: ActionListPageComponent, isStandalone: true, selector: "lib-action-list-page", ngImport: i0, template: `
100
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ActionListPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
101
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: ActionListPageComponent, isStandalone: true, selector: "lib-action-list-page", ngImport: i0, template: `
106
102
  <div class="card">
107
103
  <div
108
104
  class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-4"
@@ -111,22 +107,21 @@ class ActionListPageComponent {
111
107
  {{ 'iam.action.title' | translate }}
112
108
  </h3>
113
109
  <button
114
- pButton
110
+ fButton
115
111
  *hasPermission="ACTION_PERMISSIONS.CREATE"
116
112
  (click)="onCreate()"
117
113
  class="w-full sm:w-auto"
118
114
  >
119
- <span pButtonIcon class="pi pi-plus"></span>
115
+ <ui-icon pButtonIcon name="plus"></ui-icon>
120
116
  <span pButtonLabel>{{ 'iam.action.new' | translate }}</span>
121
117
  </button>
122
118
  </div>
123
119
 
124
120
  <div class="overflow-x-auto -mx-4 sm:mx-0">
125
- <p-treetable
121
+ <f-treetable
126
122
  [value]="treeNodes()"
127
123
  [loading]="isLoading()"
128
124
  dataKey="id"
129
- styleClass="p-treetable-sm"
130
125
  [tableStyle]="{ 'min-width': '50rem' }"
131
126
  >
132
127
  <ng-template #header>
@@ -148,18 +143,18 @@ class ActionListPageComponent {
148
143
  <ng-template #body let-rowNode let-rowData="rowData">
149
144
  <tr>
150
145
  <td>
151
- <p-treetabletoggler [rowNode]="rowNode" />
146
+ <f-treetabletoggler [rowNode]="rowNode" />
152
147
  {{ rowData.name }}
153
148
  </td>
154
149
  <td class="hidden md:table-cell">{{ rowData.code ?? '-' }}</td>
155
150
  <td>
156
- <p-tag
151
+ <f-tag
157
152
  [value]="getActionTypeLabel(rowData.actionType)"
158
153
  [severity]="getActionTypeSeverity(rowData.actionType)"
159
154
  />
160
155
  </td>
161
156
  <td class="hidden sm:table-cell">
162
- <p-tag
157
+ <f-tag
163
158
  [value]="
164
159
  rowData.isActive
165
160
  ? ('shared.active' | translate)
@@ -169,7 +164,7 @@ class ActionListPageComponent {
169
164
  />
170
165
  </td>
171
166
  <td class="hidden lg:table-cell">
172
- <p-tag
167
+ <f-tag
173
168
  [value]="
174
169
  rowData.readOnly
175
170
  ? ('shared.yes' | translate)
@@ -181,28 +176,28 @@ class ActionListPageComponent {
181
176
  <td>
182
177
  <div class="flex gap-1">
183
178
  <button
184
- pButton
179
+ fButton
185
180
  *hasPermission="ACTION_PERMISSIONS.UPDATE"
186
181
  [text]="true"
187
182
  severity="secondary"
188
183
  size="small"
189
184
  [disabled]="rowData.readOnly"
190
- [pTooltip]="'shared.edit' | translate"
185
+ [fTooltip]="'shared.edit' | translate"
191
186
  (click)="onEdit(rowData)"
192
187
  >
193
- <span pButtonIcon class="pi pi-pencil"></span>
188
+ <ui-icon pButtonIcon name="pencil"></ui-icon>
194
189
  </button>
195
190
  <button
196
- pButton
191
+ fButton
197
192
  *hasPermission="ACTION_PERMISSIONS.DELETE"
198
193
  [text]="true"
199
194
  severity="danger"
200
195
  size="small"
201
- [pTooltip]="'shared.delete' | translate"
196
+ [fTooltip]="'shared.delete' | translate"
202
197
  [disabled]="rowData.readOnly"
203
198
  (click)="onDelete(rowData)"
204
199
  >
205
- <span pButtonIcon class="pi pi-trash"></span>
200
+ <ui-icon pButtonIcon name="trash"></ui-icon>
206
201
  </button>
207
202
  </div>
208
203
  </td>
@@ -215,19 +210,18 @@ class ActionListPageComponent {
215
210
  </td>
216
211
  </tr>
217
212
  </ng-template>
218
- </p-treetable>
213
+ </f-treetable>
219
214
  </div>
220
215
  </div>
221
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i2.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "directive", type: i2.ButtonLabel, selector: "[pButtonLabel]", inputs: ["pButtonLabelPT", "pButtonLabelUnstyled"] }, { kind: "directive", type: i2.ButtonIcon, selector: "[pButtonIcon]", inputs: ["pButtonIconPT", "pButtonUnstyled"] }, { kind: "component", type: i5.Tag, selector: "p-tag", inputs: ["severity", "value", "icon", "rounded"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i7.TreeTable, selector: "p-treetable, p-tree-table", inputs: ["columns", "tableStyle", "tableStyleClass", "autoLayout", "lazy", "lazyLoadOnInit", "paginator", "rows", "first", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "customSort", "selectionMode", "contextMenuSelection", "dataKey", "metaKeySelection", "compareSelectionBy", "rowHover", "loading", "loadingIcon", "showLoader", "scrollable", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "frozenColumns", "resizableColumns", "columnResizeMode", "reorderableColumns", "contextMenu", "rowTrackBy", "filters", "globalFilterFields", "filterDelay", "filterMode", "filterLocale", "paginatorLocale", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "value", "selectionKeys", "collapsedKeys", "showGridlines"], outputs: ["rowsChange", "selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange", "collapsedKeysChange"] }, { kind: "component", type: i7.TreeTableToggler, selector: "p-treetabletoggler, p-treetable-toggler", inputs: ["rowNode"] }, { kind: "ngmodule", type: TagModule }, { kind: "directive", type: HasPermissionDirective, selector: "[hasPermission]", inputs: ["hasPermission"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
216
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "ngmodule", type: UiModule }, { kind: "directive", type: i2.FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "rounded", "raised", "fluid", "disabled", "loading", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "component", type: i2.TagComponent, selector: "f-tag", inputs: ["value", "severity", "icon", "rounded", "color"] }, { kind: "directive", type: i2.TooltipDirective, selector: "[fTooltip]", inputs: ["fTooltip", "tooltipPosition", "tooltipStyleClass", "disabled", "tooltipEvent", "showDelay", "hideDelay"] }, { kind: "component", type: i2.TreeTableComponent, selector: "f-treetable", inputs: ["value", "loading", "dataKey", "styleClass", "tableStyle", "scrollable"] }, { kind: "component", type: i2.TreeTableTogglerComponent, selector: "f-treetabletoggler", inputs: ["rowNode"] }, { kind: "component", type: i2.UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill"] }, { kind: "directive", type: HasPermissionDirective, selector: "[hasPermission]", inputs: ["hasPermission"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
222
217
  }
223
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: ActionListPageComponent, decorators: [{
218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ActionListPageComponent, decorators: [{
224
219
  type: Component,
225
220
  args: [{
226
221
  selector: 'lib-action-list-page',
227
222
  imports: [
228
223
  AngularModule,
229
- PrimeModule,
230
- TagModule,
224
+ UiModule,
231
225
  HasPermissionDirective,
232
226
  TranslatePipe,
233
227
  ],
@@ -240,22 +234,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
240
234
  {{ 'iam.action.title' | translate }}
241
235
  </h3>
242
236
  <button
243
- pButton
237
+ fButton
244
238
  *hasPermission="ACTION_PERMISSIONS.CREATE"
245
239
  (click)="onCreate()"
246
240
  class="w-full sm:w-auto"
247
241
  >
248
- <span pButtonIcon class="pi pi-plus"></span>
242
+ <ui-icon pButtonIcon name="plus"></ui-icon>
249
243
  <span pButtonLabel>{{ 'iam.action.new' | translate }}</span>
250
244
  </button>
251
245
  </div>
252
246
 
253
247
  <div class="overflow-x-auto -mx-4 sm:mx-0">
254
- <p-treetable
248
+ <f-treetable
255
249
  [value]="treeNodes()"
256
250
  [loading]="isLoading()"
257
251
  dataKey="id"
258
- styleClass="p-treetable-sm"
259
252
  [tableStyle]="{ 'min-width': '50rem' }"
260
253
  >
261
254
  <ng-template #header>
@@ -277,18 +270,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
277
270
  <ng-template #body let-rowNode let-rowData="rowData">
278
271
  <tr>
279
272
  <td>
280
- <p-treetabletoggler [rowNode]="rowNode" />
273
+ <f-treetabletoggler [rowNode]="rowNode" />
281
274
  {{ rowData.name }}
282
275
  </td>
283
276
  <td class="hidden md:table-cell">{{ rowData.code ?? '-' }}</td>
284
277
  <td>
285
- <p-tag
278
+ <f-tag
286
279
  [value]="getActionTypeLabel(rowData.actionType)"
287
280
  [severity]="getActionTypeSeverity(rowData.actionType)"
288
281
  />
289
282
  </td>
290
283
  <td class="hidden sm:table-cell">
291
- <p-tag
284
+ <f-tag
292
285
  [value]="
293
286
  rowData.isActive
294
287
  ? ('shared.active' | translate)
@@ -298,7 +291,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
298
291
  />
299
292
  </td>
300
293
  <td class="hidden lg:table-cell">
301
- <p-tag
294
+ <f-tag
302
295
  [value]="
303
296
  rowData.readOnly
304
297
  ? ('shared.yes' | translate)
@@ -310,28 +303,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
310
303
  <td>
311
304
  <div class="flex gap-1">
312
305
  <button
313
- pButton
306
+ fButton
314
307
  *hasPermission="ACTION_PERMISSIONS.UPDATE"
315
308
  [text]="true"
316
309
  severity="secondary"
317
310
  size="small"
318
311
  [disabled]="rowData.readOnly"
319
- [pTooltip]="'shared.edit' | translate"
312
+ [fTooltip]="'shared.edit' | translate"
320
313
  (click)="onEdit(rowData)"
321
314
  >
322
- <span pButtonIcon class="pi pi-pencil"></span>
315
+ <ui-icon pButtonIcon name="pencil"></ui-icon>
323
316
  </button>
324
317
  <button
325
- pButton
318
+ fButton
326
319
  *hasPermission="ACTION_PERMISSIONS.DELETE"
327
320
  [text]="true"
328
321
  severity="danger"
329
322
  size="small"
330
- [pTooltip]="'shared.delete' | translate"
323
+ [fTooltip]="'shared.delete' | translate"
331
324
  [disabled]="rowData.readOnly"
332
325
  (click)="onDelete(rowData)"
333
326
  >
334
- <span pButtonIcon class="pi pi-trash"></span>
327
+ <ui-icon pButtonIcon name="trash"></ui-icon>
335
328
  </button>
336
329
  </div>
337
330
  </td>
@@ -344,7 +337,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
344
337
  </td>
345
338
  </tr>
346
339
  </ng-template>
347
- </p-treetable>
340
+ </f-treetable>
348
341
  </div>
349
342
  </div>
350
343
  `,
@@ -352,4 +345,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
352
345
  }], ctorParameters: () => [] });
353
346
 
354
347
  export { ActionListPageComponent };
355
- //# sourceMappingURL=flusys-ng-iam-action-list-page.component-BQvx2btD.mjs.map
348
+ //# sourceMappingURL=flusys-ng-iam-action-list-page.component-B1hUE4lD.mjs.map