@flusys/ng-iam 0.1.0-beta.3 → 1.1.0-beta

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 (22) hide show
  1. package/README.md +51 -2
  2. package/fesm2022/{flusys-ng-iam-action-form-page.component-BVWZMlLU.mjs → flusys-ng-iam-action-form-page.component-DBJzC5GS.mjs} +11 -12
  3. package/fesm2022/flusys-ng-iam-action-form-page.component-DBJzC5GS.mjs.map +1 -0
  4. package/fesm2022/{flusys-ng-iam-action-list-page.component-CCp7M7xo.mjs → flusys-ng-iam-action-list-page.component-Dfts0JCt.mjs} +10 -11
  5. package/fesm2022/flusys-ng-iam-action-list-page.component-Dfts0JCt.mjs.map +1 -0
  6. package/fesm2022/{flusys-ng-iam-flusys-ng-iam-D_i24Gub.mjs → flusys-ng-iam-flusys-ng-iam-BjdM-Vgz.mjs} +185 -298
  7. package/fesm2022/flusys-ng-iam-flusys-ng-iam-BjdM-Vgz.mjs.map +1 -0
  8. package/fesm2022/{flusys-ng-iam-iam-container.component-BFKoNtdz.mjs → flusys-ng-iam-iam-container.component-Chl5MDkV.mjs} +4 -4
  9. package/fesm2022/{flusys-ng-iam-iam-container.component-BFKoNtdz.mjs.map → flusys-ng-iam-iam-container.component-Chl5MDkV.mjs.map} +1 -1
  10. package/fesm2022/{flusys-ng-iam-permission-page.component-C0yLMdW5.mjs → flusys-ng-iam-permission-page.component-cDrwUAQ_.mjs} +7 -7
  11. package/fesm2022/{flusys-ng-iam-permission-page.component-C0yLMdW5.mjs.map → flusys-ng-iam-permission-page.component-cDrwUAQ_.mjs.map} +1 -1
  12. package/fesm2022/{flusys-ng-iam-role-form-page.component-Co6bbHik.mjs → flusys-ng-iam-role-form-page.component-Ctigzpon.mjs} +8 -8
  13. package/fesm2022/{flusys-ng-iam-role-form-page.component-Co6bbHik.mjs.map → flusys-ng-iam-role-form-page.component-Ctigzpon.mjs.map} +1 -1
  14. package/fesm2022/{flusys-ng-iam-role-list-page.component-KJUVOrf0.mjs → flusys-ng-iam-role-list-page.component-BF-Z_TQK.mjs} +10 -11
  15. package/fesm2022/flusys-ng-iam-role-list-page.component-BF-Z_TQK.mjs.map +1 -0
  16. package/fesm2022/flusys-ng-iam.mjs +1 -1
  17. package/package.json +4 -4
  18. package/types/flusys-ng-iam.d.ts +50 -17
  19. package/fesm2022/flusys-ng-iam-action-form-page.component-BVWZMlLU.mjs.map +0 -1
  20. package/fesm2022/flusys-ng-iam-action-list-page.component-CCp7M7xo.mjs.map +0 -1
  21. package/fesm2022/flusys-ng-iam-flusys-ng-iam-D_i24Gub.mjs.map +0 -1
  22. package/fesm2022/flusys-ng-iam-role-list-page.component-KJUVOrf0.mjs.map +0 -1
@@ -1,22 +1,22 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, Injectable, signal, input, output, computed, ChangeDetectionStrategy, Component, effect } from '@angular/core';
3
3
  import { HttpClient, HttpParams } from '@angular/common/http';
4
- import { ApiResourceService, PermissionValidatorService, AngularModule, PrimeModule, COMPANY_API_PROVIDER, USER_PROVIDER, USER_PERMISSION_PROVIDER } from '@flusys/ng-shared';
4
+ import { ApiResourceService, PermissionValidatorService, AngularModule, PrimeModule, COMPANY_API_PROVIDER, USER_PERMISSION_PROVIDER, UserSelectComponent, PROFILE_PERMISSION_PROVIDER } from '@flusys/ng-shared';
5
5
  import { APP_CONFIG, BaseApiService, isCompanyFeatureEnabled } from '@flusys/ng-core';
6
- import * as i3$1 from 'primeng/api';
6
+ import * as i2$1 from 'primeng/api';
7
7
  import { ConfirmationService, MessageService } from 'primeng/api';
8
- import { of, firstValueFrom } from 'rxjs';
8
+ import { of, firstValueFrom, map as map$1 } from 'rxjs';
9
9
  import { tap, catchError, map } from 'rxjs/operators';
10
10
  import * as i1 from '@angular/common';
11
11
  import { CommonModule } from '@angular/common';
12
12
  import * as i1$1 from '@angular/forms';
13
13
  import { FormsModule } from '@angular/forms';
14
- import * as i3 from 'primeng/button';
14
+ import * as i2 from 'primeng/button';
15
15
  import { ButtonModule } from 'primeng/button';
16
- import * as i5 from 'primeng/tooltip';
17
- import * as i2 from 'primeng/tag';
18
- import * as i6 from 'primeng/checkbox';
19
- import * as i7 from 'primeng/select';
16
+ import * as i7 from 'primeng/tooltip';
17
+ import * as i4 from 'primeng/checkbox';
18
+ import * as i5 from 'primeng/select';
19
+ import * as i6 from 'primeng/tag';
20
20
  import * as i8 from 'primeng/treetable';
21
21
  import { LAYOUT_AUTH_STATE } from '@flusys/ng-layout';
22
22
  import * as i5$1 from 'primeng/table';
@@ -60,10 +60,10 @@ class RoleApiService extends ApiResourceService {
60
60
  const http = inject(HttpClient);
61
61
  super('iam/roles', http);
62
62
  }
63
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RoleApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
64
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RoleApiService, providedIn: 'root' });
63
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: RoleApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
64
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: RoleApiService, providedIn: 'root' });
65
65
  }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RoleApiService, decorators: [{
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: RoleApiService, decorators: [{
67
67
  type: Injectable,
68
68
  args: [{
69
69
  providedIn: 'root',
@@ -112,10 +112,10 @@ class ActionApiService extends ApiResourceService {
112
112
  }
113
113
  return this.http.post(`${this.appConfig.apiBaseUrl}/iam/actions/tree`, body);
114
114
  }
115
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ActionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
116
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ActionApiService, providedIn: 'root' });
115
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ActionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
116
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ActionApiService, providedIn: 'root' });
117
117
  }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ActionApiService, decorators: [{
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ActionApiService, decorators: [{
119
119
  type: Injectable,
120
120
  args: [{
121
121
  providedIn: 'root',
@@ -435,7 +435,7 @@ class ActionPermissionLogicService {
435
435
  const selectedActionIds = new Set(Object.keys(currentSelection).filter((id) => currentSelection[id]));
436
436
  const validationResult = validateActionPrerequisites(action, selectedActionIds, allActions);
437
437
  if (validationResult.valid) {
438
- return ' Prerequisites Satisfied\n\nAll required actions are already selected.\nYou can safely add this action.';
438
+ return '[OK] Prerequisites Satisfied\n\nAll required actions are already selected.\nYou can safely add this action.';
439
439
  }
440
440
  const allMissingActions = this.getAllMissingPrerequisitesRecursive(action, currentSelection, allActions);
441
441
  const logicTree = this.buildTooltipLogicTree(action.permissionLogic, currentSelection, allActions, 0);
@@ -497,13 +497,11 @@ class ActionPermissionLogicService {
497
497
  if (!targetAction.permissionLogic || !targetAction.id)
498
498
  return;
499
499
  if (depth > 50) {
500
- console.error('[Permission Logic] Circular dependency detected', targetAction.id);
501
500
  return;
502
501
  }
503
502
  if (visited.has(targetAction.id))
504
503
  return;
505
504
  if (stack.has(targetAction.id)) {
506
- console.warn('[Permission Logic] Circular reference detected:', targetAction.id);
507
505
  return;
508
506
  }
509
507
  visited.add(targetAction.id);
@@ -800,10 +798,10 @@ class ActionPermissionLogicService {
800
798
  }
801
799
  return `${indent}(invalid)`;
802
800
  }
803
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ActionPermissionLogicService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
804
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ActionPermissionLogicService, providedIn: 'root' });
801
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ActionPermissionLogicService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
802
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ActionPermissionLogicService, providedIn: 'root' });
805
803
  }
806
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ActionPermissionLogicService, decorators: [{
804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ActionPermissionLogicService, decorators: [{
807
805
  type: Injectable,
808
806
  args: [{
809
807
  providedIn: 'root',
@@ -901,10 +899,10 @@ class PermissionApiService extends BaseApiService {
901
899
  getCompanyActions(companyId) {
902
900
  return this.http.get(this.getUrl(`permissions/company-actions/${companyId}`));
903
901
  }
904
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PermissionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
905
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PermissionApiService, providedIn: 'root' });
902
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: PermissionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
903
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: PermissionApiService, providedIn: 'root' });
906
904
  }
907
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PermissionApiService, decorators: [{
905
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: PermissionApiService, decorators: [{
908
906
  type: Injectable,
909
907
  args: [{
910
908
  providedIn: 'root',
@@ -933,10 +931,10 @@ class MyPermissionsApiService {
933
931
  getMyPermissions(dto = {}) {
934
932
  return this.http.post(`${this.baseUrl}/my-permissions`, dto);
935
933
  }
936
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MyPermissionsApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
937
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MyPermissionsApiService, providedIn: 'root' });
934
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MyPermissionsApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
935
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MyPermissionsApiService, providedIn: 'root' });
938
936
  }
939
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: MyPermissionsApiService, decorators: [{
937
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: MyPermissionsApiService, decorators: [{
940
938
  type: Injectable,
941
939
  args: [{
942
940
  providedIn: 'root',
@@ -986,11 +984,9 @@ class PermissionStateService {
986
984
  // Update shared permission validator
987
985
  const actionCodes = response.data?.frontendActions.map((a) => a.code) ?? [];
988
986
  this.permissionValidator.setPermissions(actionCodes);
989
- }), catchError((error) => {
990
- console.error('Failed to load permissions:', error);
987
+ }), catchError(() => {
991
988
  this._permissions.set(null);
992
989
  this._isLoading.set(false);
993
- // Clear shared permission validator
994
990
  this.permissionValidator.clearPermissions();
995
991
  return of(void 0);
996
992
  }), map(() => void 0));
@@ -1004,10 +1000,10 @@ class PermissionStateService {
1004
1000
  return (this._permissions() !== null &&
1005
1001
  this.permissionValidator.isPermissionsLoaded());
1006
1002
  }
1007
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PermissionStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1008
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PermissionStateService, providedIn: 'root' });
1003
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: PermissionStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1004
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: PermissionStateService, providedIn: 'root' });
1009
1005
  }
1010
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: PermissionStateService, decorators: [{
1006
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: PermissionStateService, decorators: [{
1011
1007
  type: Injectable,
1012
1008
  args: [{ providedIn: 'root' }]
1013
1009
  }] });
@@ -1135,8 +1131,8 @@ class LogicBuilderComponent {
1135
1131
  }
1136
1132
  return node;
1137
1133
  }
1138
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LogicBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1139
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: LogicBuilderComponent, isStandalone: true, selector: "lib-logic-builder", inputs: { logic: { classPropertyName: "logic", publicName: "logic", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { logicChange: "logicChange" }, ngImport: i0, template: `
1134
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: LogicBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1135
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: LogicBuilderComponent, isStandalone: true, selector: "lib-logic-builder", inputs: { logic: { classPropertyName: "logic", publicName: "logic", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { logicChange: "logicChange" }, ngImport: i0, template: `
1140
1136
  <div class="logic-builder">
1141
1137
  <div class="flex justify-between items-center mb-3">
1142
1138
  <h4 class="text-sm font-semibold">Permission Logic</h4>
@@ -1247,9 +1243,9 @@ class LogicBuilderComponent {
1247
1243
  }
1248
1244
  </div>
1249
1245
  </ng-template>
1250
- `, isInline: true, styles: [":host{display:block}.logic-tree{font-size:.875rem}.node{padding:.75rem;border-bottom:1px solid #e5e7eb}.node:last-child{border-bottom:none}.node-header{display:flex;align-items:center;gap:.75rem;margin-bottom:.5rem}.node-type{display:inline-flex;align-items:center;padding:.25rem .5rem;border-radius:.25rem;font-weight:600;font-size:.75rem;text-transform:uppercase}.node-type.group{background-color:#dbeafe;color:#1e40af}.node-type.action{background-color:#d1fae5;color:#065f46}.node-content{flex:1;display:flex;align-items:center;gap:.5rem}.node-actions{display:flex;gap:.25rem}.node-children{margin-left:1.5rem;margin-top:.5rem;padding-left:1rem;border-left:2px solid #e5e7eb}.operator-badge{display:inline-flex;align-items:center;padding:.125rem .5rem;border-radius:9999px;font-weight:600;font-size:.75rem;cursor:pointer;transition:all .2s}.operator-badge.and{background-color:#fef3c7;color:#92400e}.operator-badge.or{background-color:#e0e7ff;color:#3730a3}.operator-badge:hover{opacity:.8}select{padding:.375rem .75rem;border:1px solid #d1d5db;border-radius:.375rem;font-size:.875rem;background-color:#fff}select:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.add-child-section{margin-top:.75rem;padding:.75rem;background-color:#f9fafb;border-radius:.375rem;border:1px dashed #d1d5db}.add-child-buttons{display:flex;gap:.5rem;flex-wrap:wrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AngularModule }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "ngmodule", type: ButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1246
+ `, isInline: true, styles: [":host{display:block}.logic-tree{font-size:.875rem}.node{padding:.75rem;border-bottom:1px solid #e5e7eb}.node:last-child{border-bottom:none}.node-header{display:flex;align-items:center;gap:.75rem;margin-bottom:.5rem}.node-type{display:inline-flex;align-items:center;padding:.25rem .5rem;border-radius:.25rem;font-weight:600;font-size:.75rem;text-transform:uppercase}.node-type.group{background-color:#dbeafe;color:#1e40af}.node-type.action{background-color:#d1fae5;color:#065f46}.node-content{flex:1;display:flex;align-items:center;gap:.5rem}.node-actions{display:flex;gap:.25rem}.node-children{margin-left:1.5rem;margin-top:.5rem;padding-left:1rem;border-left:2px solid #e5e7eb}.operator-badge{display:inline-flex;align-items:center;padding:.125rem .5rem;border-radius:9999px;font-weight:600;font-size:.75rem;cursor:pointer;transition:all .2s}.operator-badge.and{background-color:#fef3c7;color:#92400e}.operator-badge.or{background-color:#e0e7ff;color:#3730a3}.operator-badge:hover{opacity:.8}select{padding:.375rem .75rem;border:1px solid #d1d5db;border-radius:.375rem;font-size:.875rem;background-color:#fff}select:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.add-child-section{margin-top:.75rem;padding:.75rem;background-color:#f9fafb;border-radius:.375rem;border:1px dashed #d1d5db}.add-child-buttons{display:flex;gap:.5rem;flex-wrap:wrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AngularModule }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i7.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "ngmodule", type: ButtonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1251
1247
  }
1252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: LogicBuilderComponent, decorators: [{
1248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: LogicBuilderComponent, decorators: [{
1253
1249
  type: Component,
1254
1250
  args: [{ selector: 'lib-logic-builder', standalone: true, imports: [CommonModule, FormsModule, AngularModule, PrimeModule, ButtonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: `
1255
1251
  <div class="logic-builder">
@@ -1650,7 +1646,6 @@ class RoleActionSelectorComponent {
1650
1646
  this.loadDataAbortController = new AbortController();
1651
1647
  this.onRoleChange(this.loadDataAbortController.signal).catch((err) => {
1652
1648
  if (err.name !== 'AbortError') {
1653
- console.error('[Role Selector] Failed to load data:', err);
1654
1649
  this.messageService.add({
1655
1650
  severity: 'error',
1656
1651
  summary: 'Error',
@@ -1678,8 +1673,7 @@ class RoleActionSelectorComponent {
1678
1673
  }));
1679
1674
  this.roles.set(response?.data ?? []);
1680
1675
  }
1681
- catch (err) {
1682
- console.error('[Role Selector] Failed to load roles:', err);
1676
+ catch {
1683
1677
  this.messageService.add({
1684
1678
  severity: 'error',
1685
1679
  summary: 'Error',
@@ -1700,13 +1694,7 @@ class RoleActionSelectorComponent {
1700
1694
  if (signal.aborted)
1701
1695
  return;
1702
1696
  // Get flat list (filtered by company if enabled)
1703
- const flatActions = (actionsResponse?.data ?? []).filter((a) => {
1704
- if (!a.id) {
1705
- console.warn('[Role Selector] Skipping action without ID:', a.name);
1706
- return false;
1707
- }
1708
- return true;
1709
- });
1697
+ const flatActions = (actionsResponse?.data ?? []).filter((a) => !!a.id);
1710
1698
  // Build tree structure from flat list with parentId
1711
1699
  const actionsTree = buildTreeFromFlat(flatActions);
1712
1700
  // Store both representations
@@ -1743,15 +1731,15 @@ class RoleActionSelectorComponent {
1743
1731
  const prerequisiteInfo = this.permissionLogic.getPrerequisiteTooltip(action, selMap, this.actions());
1744
1732
  if (prerequisiteInfo) {
1745
1733
  const actionHint = isCurrentlySelected
1746
- ? '\n\n━━━━━━━━━━━━━━━━━━\n🗑️ Click to remove'
1747
- : '\n\n━━━━━━━━━━━━━━━━━━\n Click to add (auto-selects required)';
1734
+ ? '\n\n---\n[Remove] Click to remove'
1735
+ : '\n\n---\n[Add] Click to add (auto-selects required)';
1748
1736
  return `${prerequisiteInfo}${actionHint}`;
1749
1737
  }
1750
1738
  }
1751
1739
  if (isCurrentlySelected) {
1752
- return ' Assigned to role\n\n🗑️ Click to remove';
1740
+ return '[Assigned] Assigned to role\n\n[Remove] Click to remove';
1753
1741
  }
1754
- return ' Click to assign to role';
1742
+ return '[Add] Click to assign to role';
1755
1743
  }
1756
1744
  /**
1757
1745
  * Check if action has unmet prerequisites
@@ -1869,8 +1857,8 @@ class RoleActionSelectorComponent {
1869
1857
  this._selectionMap.set({});
1870
1858
  this._initialSelection.set({});
1871
1859
  }
1872
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RoleActionSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1873
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: RoleActionSelectorComponent, isStandalone: true, selector: "flusys-role-action-selector", ngImport: i0, template: `
1860
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: RoleActionSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1861
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: RoleActionSelectorComponent, isStandalone: true, selector: "flusys-role-action-selector", ngImport: i0, template: `
1874
1862
  <div class="role-action-selector">
1875
1863
  <!-- Role Selector -->
1876
1864
  <div class="mb-4">
@@ -2100,9 +2088,9 @@ class RoleActionSelectorComponent {
2100
2088
  }
2101
2089
  }
2102
2090
  </div>
2103
- `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i2.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i6.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i7.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i8.TreeTable, selector: "p-treeTable, p-treetable, p-tree-table", inputs: ["columns", "styleClass", "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", "contextMenuSelectionMode", "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", "virtualRowHeight", "selectionKeys", "showGridlines"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i8.TreeTableToggler, selector: "p-treeTableToggler, p-treetabletoggler, p-treetable-toggler", inputs: ["rowNode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2091
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i4.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i5.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i6.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "directive", type: i7.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i8.TreeTable, selector: "p-treeTable, p-treetable, p-tree-table", inputs: ["columns", "styleClass", "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", "contextMenuSelectionMode", "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", "virtualRowHeight", "selectionKeys", "showGridlines"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i8.TreeTableToggler, selector: "p-treeTableToggler, p-treetabletoggler, p-treetable-toggler", inputs: ["rowNode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2104
2092
  }
2105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RoleActionSelectorComponent, decorators: [{
2093
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: RoleActionSelectorComponent, decorators: [{
2106
2094
  type: Component,
2107
2095
  args: [{ selector: 'flusys-role-action-selector', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, PrimeModule], template: `
2108
2096
  <div class="role-action-selector">
@@ -2463,7 +2451,6 @@ class CompanyActionSelectorComponent {
2463
2451
  this.loadDataAbortController = new AbortController();
2464
2452
  this.loadData(this.loadDataAbortController.signal).catch((err) => {
2465
2453
  if (err.name !== 'AbortError') {
2466
- console.error('[Company Selector] Failed to load data:', err);
2467
2454
  this.messageService.add({
2468
2455
  severity: 'error',
2469
2456
  summary: 'Error',
@@ -2492,8 +2479,7 @@ class CompanyActionSelectorComponent {
2492
2479
  }));
2493
2480
  this.companies.set(response?.data ?? []);
2494
2481
  }
2495
- catch (err) {
2496
- console.error('[Company Selector] Failed to load companies:', err);
2482
+ catch {
2497
2483
  this.messageService.add({
2498
2484
  severity: 'error',
2499
2485
  summary: 'Error',
@@ -2516,13 +2502,7 @@ class CompanyActionSelectorComponent {
2516
2502
  return;
2517
2503
  const actionsTree = actionsResponse?.data ?? [];
2518
2504
  // Flatten tree for business logic
2519
- const actionsList = flattenTree(actionsTree).filter((a) => {
2520
- if (!a.id) {
2521
- console.warn('[Company Selector] Skipping action without ID:', a.name);
2522
- return false;
2523
- }
2524
- return true;
2525
- });
2505
+ const actionsList = flattenTree(actionsTree).filter((a) => !!a.id);
2526
2506
  // Store both representations
2527
2507
  this._actionsTree.set(actionsTree);
2528
2508
  this._actions.set(actionsList);
@@ -2565,15 +2545,15 @@ class CompanyActionSelectorComponent {
2565
2545
  const prerequisiteInfo = this.permissionLogic.getPrerequisiteTooltip(action, selMap, this.actions());
2566
2546
  if (prerequisiteInfo) {
2567
2547
  const actionHint = isCurrentlySelected
2568
- ? '\n\n━━━━━━━━━━━━━━━━━━\n🗑️ Click to remove'
2569
- : '\n\n━━━━━━━━━━━━━━━━━━\n Click to add (auto-selects required)';
2548
+ ? '\n\n---\n[Remove] Click to remove'
2549
+ : '\n\n---\n[Add] Click to add (auto-selects required)';
2570
2550
  return `${prerequisiteInfo}${actionHint}`;
2571
2551
  }
2572
2552
  }
2573
2553
  if (isCurrentlySelected) {
2574
- return ' Selected\n\n🗑️ Click to remove from company whitelist';
2554
+ return '[Selected] Selected\n\n[Remove] Click to remove from company whitelist';
2575
2555
  }
2576
- return ' Click to add to company whitelist';
2556
+ return '[Add] Click to add to company whitelist';
2577
2557
  }
2578
2558
  /**
2579
2559
  * Handle action checkbox toggle
@@ -2737,8 +2717,8 @@ class CompanyActionSelectorComponent {
2737
2717
  this._selectionMap.set({});
2738
2718
  this._initialSelection.set({});
2739
2719
  }
2740
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CompanyActionSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2741
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: CompanyActionSelectorComponent, isStandalone: true, selector: "flusys-company-action-selector", ngImport: i0, template: `
2720
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: CompanyActionSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2721
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: CompanyActionSelectorComponent, isStandalone: true, selector: "flusys-company-action-selector", ngImport: i0, template: `
2742
2722
  <div class="company-action-selector">
2743
2723
  <!-- Company Selector -->
2744
2724
  <div class="mb-4">
@@ -2963,9 +2943,9 @@ class CompanyActionSelectorComponent {
2963
2943
  }
2964
2944
  }
2965
2945
  </div>
2966
- `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i2.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i6.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i7.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i8.TreeTable, selector: "p-treeTable, p-treetable, p-tree-table", inputs: ["columns", "styleClass", "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", "contextMenuSelectionMode", "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", "virtualRowHeight", "selectionKeys", "showGridlines"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i8.TreeTableToggler, selector: "p-treeTableToggler, p-treetabletoggler, p-treetable-toggler", inputs: ["rowNode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2946
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i4.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i5.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i6.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "directive", type: i7.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i8.TreeTable, selector: "p-treeTable, p-treetable, p-tree-table", inputs: ["columns", "styleClass", "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", "contextMenuSelectionMode", "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", "virtualRowHeight", "selectionKeys", "showGridlines"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i8.TreeTableToggler, selector: "p-treeTableToggler, p-treetabletoggler, p-treetable-toggler", inputs: ["rowNode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2967
2947
  }
2968
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: CompanyActionSelectorComponent, decorators: [{
2948
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: CompanyActionSelectorComponent, decorators: [{
2969
2949
  type: Component,
2970
2950
  args: [{ selector: 'flusys-company-action-selector', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, PrimeModule], template: `
2971
2951
  <div class="company-action-selector">
@@ -3229,15 +3209,13 @@ class UserRoleSelectorComponent {
3229
3209
  // Dependencies
3230
3210
  appConfig = inject(APP_CONFIG);
3231
3211
  companyContext = inject(LAYOUT_AUTH_STATE);
3232
- userProvider = inject(USER_PROVIDER);
3233
3212
  userPermissionProvider = inject(USER_PERMISSION_PROVIDER);
3234
3213
  roleApi = inject(RoleApiService);
3235
3214
  permissionApi = inject(PermissionApiService);
3236
3215
  messageService = inject(MessageService);
3237
3216
  // State - User/Branch Selection
3238
- selectedUserId = signal(undefined, ...(ngDevMode ? [{ debugName: "selectedUserId" }] : []));
3217
+ selectedUserId = signal(null, ...(ngDevMode ? [{ debugName: "selectedUserId" }] : []));
3239
3218
  selectedBranchId = signal(undefined, ...(ngDevMode ? [{ debugName: "selectedBranchId" }] : []));
3240
- users = signal([], ...(ngDevMode ? [{ debugName: "users" }] : []));
3241
3219
  branches = signal([], ...(ngDevMode ? [{ debugName: "branches" }] : []));
3242
3220
  // State - Loading/Saving
3243
3221
  loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
@@ -3291,7 +3269,6 @@ class UserRoleSelectorComponent {
3291
3269
  return this.hasChanges() && !this.saving();
3292
3270
  }, ...(ngDevMode ? [{ debugName: "canSave" }] : []));
3293
3271
  constructor() {
3294
- this.loadUsers();
3295
3272
  // Effect: Load user branches and data when user changes
3296
3273
  effect(() => {
3297
3274
  const userId = this.selectedUserId();
@@ -3318,28 +3295,6 @@ class UserRoleSelectorComponent {
3318
3295
  }
3319
3296
  });
3320
3297
  }
3321
- /**
3322
- * Load users from provider
3323
- */
3324
- async loadUsers() {
3325
- try {
3326
- const response = await this.userProvider
3327
- .getUsers({
3328
- page: 0,
3329
- pageSize: MAX_DROPDOWN_ITEMS,
3330
- })
3331
- .toPromise();
3332
- this.users.set(response?.data ?? []);
3333
- }
3334
- catch (err) {
3335
- console.error('[User Role Selector] Failed to load users:', err);
3336
- this.messageService.add({
3337
- severity: 'error',
3338
- summary: 'Error',
3339
- detail: 'Failed to load users',
3340
- });
3341
- }
3342
- }
3343
3298
  /**
3344
3299
  * Load user's permitted branches
3345
3300
  */
@@ -3360,8 +3315,7 @@ class UserRoleSelectorComponent {
3360
3315
  })) ?? [];
3361
3316
  this.branches.set(userBranches);
3362
3317
  }
3363
- catch (err) {
3364
- console.error('[User Role Selector] Failed to load user branches:', err);
3318
+ catch {
3365
3319
  this.messageService.add({
3366
3320
  severity: 'error',
3367
3321
  summary: 'Error',
@@ -3403,8 +3357,7 @@ class UserRoleSelectorComponent {
3403
3357
  this._selectionMap.set(selMap);
3404
3358
  this._initialSelection.set({ ...selMap });
3405
3359
  }
3406
- catch (err) {
3407
- console.error('[User Role Selector] Failed to load user roles:', err);
3360
+ catch {
3408
3361
  this.messageService.add({
3409
3362
  severity: 'error',
3410
3363
  summary: 'Error',
@@ -3422,9 +3375,9 @@ class UserRoleSelectorComponent {
3422
3375
  const selMap = this.selectionMap();
3423
3376
  const isCurrentlySelected = selMap[role.id];
3424
3377
  if (isCurrentlySelected) {
3425
- return ' Assigned to user\n\n🗑️ Click to remove role';
3378
+ return '[Assigned] Assigned to user\n\n[Remove] Click to remove role';
3426
3379
  }
3427
- return ' Click to assign role to user';
3380
+ return '[Add] Click to assign role to user';
3428
3381
  }
3429
3382
  /**
3430
3383
  * Handle role checkbox toggle
@@ -3536,8 +3489,8 @@ class UserRoleSelectorComponent {
3536
3489
  this._selectionMap.set({});
3537
3490
  this._initialSelection.set({});
3538
3491
  }
3539
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: UserRoleSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3540
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: UserRoleSelectorComponent, isStandalone: true, selector: "flusys-user-role-selector", ngImport: i0, template: `
3492
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: UserRoleSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3493
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: UserRoleSelectorComponent, isStandalone: true, selector: "flusys-user-role-selector", ngImport: i0, template: `
3541
3494
  <div class="user-role-selector">
3542
3495
  <!-- User and Branch Selectors -->
3543
3496
  <div class="surface-card p-4 border-round mb-4 shadow-1">
@@ -3547,41 +3500,11 @@ class UserRoleSelectorComponent {
3547
3500
  <i class="pi pi-user mr-2 text-primary"></i>
3548
3501
  Select User
3549
3502
  </label>
3550
- <p-select
3551
- [(ngModel)]="selectedUserId"
3552
- [options]="users()"
3553
- optionLabel="name"
3554
- optionValue="id"
3555
- placeholder="Select a user"
3556
- [showClear]="true"
3557
- [filter]="true"
3558
- styleClass="w-full"
3559
- >
3560
- <ng-template #selectedItem let-user>
3561
- @if (user) {
3562
- <div class="flex align-items-center gap-2">
3563
- <i class="pi pi-user text-primary"></i>
3564
- <div>
3565
- <div class="font-semibold">{{ user.name }}</div>
3566
- <div class="text-xs text-color-secondary">
3567
- {{ user.email }}
3568
- </div>
3569
- </div>
3570
- </div>
3571
- }
3572
- </ng-template>
3573
- <ng-template #item let-user>
3574
- <div class="flex align-items-center gap-2">
3575
- <i class="pi pi-user text-color-secondary"></i>
3576
- <div>
3577
- <div class="font-semibold">{{ user.name }}</div>
3578
- <div class="text-xs text-color-secondary">
3579
- {{ user.email }}
3580
- </div>
3581
- </div>
3582
- </div>
3583
- </ng-template>
3584
- </p-select>
3503
+ <lib-user-select
3504
+ [(value)]="selectedUserId"
3505
+ [isEditMode]="true"
3506
+ placeHolder="Select a user"
3507
+ />
3585
3508
  </div>
3586
3509
 
3587
3510
  @if (showBranchSelector()) {
@@ -3793,11 +3716,11 @@ class UserRoleSelectorComponent {
3793
3716
  }
3794
3717
  }
3795
3718
  </div>
3796
- `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i6.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i5$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "component", type: i7.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3719
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i4.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i5.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i5$1.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i7.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: UserSelectComponent, selector: "lib-user-select", inputs: ["loadUsers", "placeHolder", "isEditMode", "filterActive", "additionalFilters", "pageSize", "value"], outputs: ["valueChange", "userSelected", "onError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3797
3720
  }
3798
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: UserRoleSelectorComponent, decorators: [{
3721
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: UserRoleSelectorComponent, decorators: [{
3799
3722
  type: Component,
3800
- args: [{ selector: 'flusys-user-role-selector', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, PrimeModule], template: `
3723
+ args: [{ selector: 'flusys-user-role-selector', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, PrimeModule, UserSelectComponent], template: `
3801
3724
  <div class="user-role-selector">
3802
3725
  <!-- User and Branch Selectors -->
3803
3726
  <div class="surface-card p-4 border-round mb-4 shadow-1">
@@ -3807,41 +3730,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
3807
3730
  <i class="pi pi-user mr-2 text-primary"></i>
3808
3731
  Select User
3809
3732
  </label>
3810
- <p-select
3811
- [(ngModel)]="selectedUserId"
3812
- [options]="users()"
3813
- optionLabel="name"
3814
- optionValue="id"
3815
- placeholder="Select a user"
3816
- [showClear]="true"
3817
- [filter]="true"
3818
- styleClass="w-full"
3819
- >
3820
- <ng-template #selectedItem let-user>
3821
- @if (user) {
3822
- <div class="flex align-items-center gap-2">
3823
- <i class="pi pi-user text-primary"></i>
3824
- <div>
3825
- <div class="font-semibold">{{ user.name }}</div>
3826
- <div class="text-xs text-color-secondary">
3827
- {{ user.email }}
3828
- </div>
3829
- </div>
3830
- </div>
3831
- }
3832
- </ng-template>
3833
- <ng-template #item let-user>
3834
- <div class="flex align-items-center gap-2">
3835
- <i class="pi pi-user text-color-secondary"></i>
3836
- <div>
3837
- <div class="font-semibold">{{ user.name }}</div>
3838
- <div class="text-xs text-color-secondary">
3839
- {{ user.email }}
3840
- </div>
3841
- </div>
3842
- </div>
3843
- </ng-template>
3844
- </p-select>
3733
+ <lib-user-select
3734
+ [(value)]="selectedUserId"
3735
+ [isEditMode]="true"
3736
+ placeHolder="Select a user"
3737
+ />
3845
3738
  </div>
3846
3739
 
3847
3740
  @if (showBranchSelector()) {
@@ -4091,16 +3984,14 @@ class UserActionSelectorComponent {
4091
3984
  // Dependencies
4092
3985
  appConfig = inject(APP_CONFIG);
4093
3986
  companyContext = inject(LAYOUT_AUTH_STATE);
4094
- userProvider = inject(USER_PROVIDER);
4095
3987
  userPermissionProvider = inject(USER_PERMISSION_PROVIDER);
4096
3988
  actionApi = inject(ActionApiService);
4097
3989
  permissionApi = inject(PermissionApiService);
4098
3990
  permissionLogic = inject(ActionPermissionLogicService);
4099
3991
  messageService = inject(MessageService);
4100
3992
  // State - User/Branch Selection
4101
- selectedUserId = signal(undefined, ...(ngDevMode ? [{ debugName: "selectedUserId" }] : []));
3993
+ selectedUserId = signal(null, ...(ngDevMode ? [{ debugName: "selectedUserId" }] : []));
4102
3994
  selectedBranchId = signal(undefined, ...(ngDevMode ? [{ debugName: "selectedBranchId" }] : []));
4103
- users = signal([], ...(ngDevMode ? [{ debugName: "users" }] : []));
4104
3995
  branches = signal([], ...(ngDevMode ? [{ debugName: "branches" }] : []));
4105
3996
  // State - Loading/Saving
4106
3997
  loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
@@ -4175,7 +4066,6 @@ class UserActionSelectorComponent {
4175
4066
  return (this.hasChanges() && !this.saving() && this.invalidActionsCount() === 0);
4176
4067
  }, ...(ngDevMode ? [{ debugName: "canSave" }] : []));
4177
4068
  constructor() {
4178
- this.loadUsers();
4179
4069
  // Effect: Load user branches and data when user changes
4180
4070
  effect(() => {
4181
4071
  const userId = this.selectedUserId();
@@ -4202,28 +4092,6 @@ class UserActionSelectorComponent {
4202
4092
  }
4203
4093
  });
4204
4094
  }
4205
- /**
4206
- * Load users from provider
4207
- */
4208
- async loadUsers() {
4209
- try {
4210
- const response = await this.userProvider
4211
- .getUsers({
4212
- page: 0,
4213
- pageSize: MAX_DROPDOWN_ITEMS,
4214
- })
4215
- .toPromise();
4216
- this.users.set(response?.data ?? []);
4217
- }
4218
- catch (err) {
4219
- console.error('[User Selector] Failed to load users:', err);
4220
- this.messageService.add({
4221
- severity: 'error',
4222
- summary: 'Error',
4223
- detail: 'Failed to load users',
4224
- });
4225
- }
4226
- }
4227
4095
  /**
4228
4096
  * Load user's permitted branches
4229
4097
  */
@@ -4244,8 +4112,7 @@ class UserActionSelectorComponent {
4244
4112
  })) ?? [];
4245
4113
  this.branches.set(userBranches);
4246
4114
  }
4247
- catch (err) {
4248
- console.error('[User Selector] Failed to load user branches:', err);
4115
+ catch {
4249
4116
  this.messageService.add({
4250
4117
  severity: 'error',
4251
4118
  summary: 'Error',
@@ -4290,8 +4157,7 @@ class UserActionSelectorComponent {
4290
4157
  this._selectionMap.set(selMap);
4291
4158
  this._initialSelection.set({ ...selMap });
4292
4159
  }
4293
- catch (err) {
4294
- console.error('[User Selector] Failed to load user actions:', err);
4160
+ catch {
4295
4161
  this.messageService.add({
4296
4162
  severity: 'error',
4297
4163
  summary: 'Error',
@@ -4312,15 +4178,15 @@ class UserActionSelectorComponent {
4312
4178
  const prerequisiteInfo = this.permissionLogic.getPrerequisiteTooltip(action, selMap, this.actions());
4313
4179
  if (prerequisiteInfo) {
4314
4180
  const actionHint = isCurrentlySelected
4315
- ? '\n\n━━━━━━━━━━━━━━━━━━\n🗑️ Click to remove'
4316
- : '\n\n━━━━━━━━━━━━━━━━━━\n Click to add (auto-selects required)';
4181
+ ? '\n\n---\n[Remove] Click to remove'
4182
+ : '\n\n---\n[Add] Click to add (auto-selects required)';
4317
4183
  return `${prerequisiteInfo}${actionHint}`;
4318
4184
  }
4319
4185
  }
4320
4186
  if (isCurrentlySelected) {
4321
- return ' Assigned to user\n\n🗑️ Click to remove direct permission';
4187
+ return '[Assigned] Assigned to user\n\n[Remove] Click to remove direct permission';
4322
4188
  }
4323
- return ' Click to assign direct permission';
4189
+ return '[Add] Click to assign direct permission';
4324
4190
  }
4325
4191
  /**
4326
4192
  * Check if action has unmet prerequisites
@@ -4447,8 +4313,8 @@ class UserActionSelectorComponent {
4447
4313
  this._selectionMap.set({});
4448
4314
  this._initialSelection.set({});
4449
4315
  }
4450
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: UserActionSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4451
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.0", type: UserActionSelectorComponent, isStandalone: true, selector: "flusys-user-action-selector", ngImport: i0, template: `
4316
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: UserActionSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4317
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: UserActionSelectorComponent, isStandalone: true, selector: "flusys-user-action-selector", ngImport: i0, template: `
4452
4318
  <div class="user-action-selector">
4453
4319
  <!-- User and Branch Selectors -->
4454
4320
  <div class="surface-card p-4 border-round mb-4 shadow-1">
@@ -4458,41 +4324,11 @@ class UserActionSelectorComponent {
4458
4324
  <i class="pi pi-user mr-2 text-primary"></i>
4459
4325
  Select User
4460
4326
  </label>
4461
- <p-select
4462
- [(ngModel)]="selectedUserId"
4463
- [options]="users()"
4464
- optionLabel="name"
4465
- optionValue="id"
4466
- placeholder="Select a user"
4467
- [showClear]="true"
4468
- [filter]="true"
4469
- styleClass="w-full"
4470
- >
4471
- <ng-template #selectedItem let-user>
4472
- @if (user) {
4473
- <div class="flex align-items-center gap-2">
4474
- <i class="pi pi-user text-primary"></i>
4475
- <div>
4476
- <div class="font-semibold">{{ user.name }}</div>
4477
- <div class="text-xs text-color-secondary">
4478
- {{ user.email }}
4479
- </div>
4480
- </div>
4481
- </div>
4482
- }
4483
- </ng-template>
4484
- <ng-template #item let-user>
4485
- <div class="flex align-items-center gap-2">
4486
- <i class="pi pi-user text-color-secondary"></i>
4487
- <div>
4488
- <div class="font-semibold">{{ user.name }}</div>
4489
- <div class="text-xs text-color-secondary">
4490
- {{ user.email }}
4491
- </div>
4492
- </div>
4493
- </div>
4494
- </ng-template>
4495
- </p-select>
4327
+ <lib-user-select
4328
+ [(value)]="selectedUserId"
4329
+ [isEditMode]="true"
4330
+ placeHolder="Select a user"
4331
+ />
4496
4332
  </div>
4497
4333
 
4498
4334
  @if (showBranchSelector()) {
@@ -4708,11 +4544,11 @@ class UserActionSelectorComponent {
4708
4544
  }
4709
4545
  }
4710
4546
  </div>
4711
- `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i2.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i5.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i6.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i7.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i8.TreeTable, selector: "p-treeTable, p-treetable, p-tree-table", inputs: ["columns", "styleClass", "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", "contextMenuSelectionMode", "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", "virtualRowHeight", "selectionKeys", "showGridlines"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i8.TreeTableToggler, selector: "p-treeTableToggler, p-treetabletoggler, p-treetable-toggler", inputs: ["rowNode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4547
+ `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: PrimeModule }, { kind: "directive", type: i2$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i4.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: i5.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i6.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "directive", type: i7.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "component", type: i8.TreeTable, selector: "p-treeTable, p-treetable, p-tree-table", inputs: ["columns", "styleClass", "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", "contextMenuSelectionMode", "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", "virtualRowHeight", "selectionKeys", "showGridlines"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i8.TreeTableToggler, selector: "p-treeTableToggler, p-treetabletoggler, p-treetable-toggler", inputs: ["rowNode"] }, { kind: "component", type: UserSelectComponent, selector: "lib-user-select", inputs: ["loadUsers", "placeHolder", "isEditMode", "filterActive", "additionalFilters", "pageSize", "value"], outputs: ["valueChange", "userSelected", "onError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4712
4548
  }
4713
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: UserActionSelectorComponent, decorators: [{
4549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: UserActionSelectorComponent, decorators: [{
4714
4550
  type: Component,
4715
- args: [{ selector: 'flusys-user-action-selector', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, PrimeModule], template: `
4551
+ args: [{ selector: 'flusys-user-action-selector', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, PrimeModule, UserSelectComponent], template: `
4716
4552
  <div class="user-action-selector">
4717
4553
  <!-- User and Branch Selectors -->
4718
4554
  <div class="surface-card p-4 border-round mb-4 shadow-1">
@@ -4722,41 +4558,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
4722
4558
  <i class="pi pi-user mr-2 text-primary"></i>
4723
4559
  Select User
4724
4560
  </label>
4725
- <p-select
4726
- [(ngModel)]="selectedUserId"
4727
- [options]="users()"
4728
- optionLabel="name"
4729
- optionValue="id"
4730
- placeholder="Select a user"
4731
- [showClear]="true"
4732
- [filter]="true"
4733
- styleClass="w-full"
4734
- >
4735
- <ng-template #selectedItem let-user>
4736
- @if (user) {
4737
- <div class="flex align-items-center gap-2">
4738
- <i class="pi pi-user text-primary"></i>
4739
- <div>
4740
- <div class="font-semibold">{{ user.name }}</div>
4741
- <div class="text-xs text-color-secondary">
4742
- {{ user.email }}
4743
- </div>
4744
- </div>
4745
- </div>
4746
- }
4747
- </ng-template>
4748
- <ng-template #item let-user>
4749
- <div class="flex align-items-center gap-2">
4750
- <i class="pi pi-user text-color-secondary"></i>
4751
- <div>
4752
- <div class="font-semibold">{{ user.name }}</div>
4753
- <div class="text-xs text-color-secondary">
4754
- {{ user.email }}
4755
- </div>
4756
- </div>
4757
- </div>
4758
- </ng-template>
4759
- </p-select>
4561
+ <lib-user-select
4562
+ [(value)]="selectedUserId"
4563
+ [isEditMode]="true"
4564
+ placeHolder="Select a user"
4565
+ />
4760
4566
  </div>
4761
4567
 
4762
4568
  @if (showBranchSelector()) {
@@ -4977,6 +4783,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
4977
4783
 
4978
4784
  // Logic Builder Component
4979
4785
 
4786
+ /**
4787
+ * Profile Permission Provider Adapter
4788
+ *
4789
+ * Implements IProfilePermissionProvider using ng-iam's PermissionApiService.
4790
+ * Allows ng-auth profile page to display user permissions without
4791
+ * depending on ng-iam directly.
4792
+ *
4793
+ * @example
4794
+ * // In app.config.ts
4795
+ * providers: [
4796
+ * ...provideIamProviders()
4797
+ * ]
4798
+ *
4799
+ * // In profile component
4800
+ * private readonly permissionProvider = inject(PROFILE_PERMISSION_PROVIDER, { optional: true });
4801
+ */
4802
+ class ProfilePermissionProviderAdapter {
4803
+ permissionApi = inject(PermissionApiService);
4804
+ getUserRoles(userId, branchId) {
4805
+ return this.permissionApi
4806
+ .getUserRoles(userId, branchId ? { branchId } : undefined)
4807
+ .pipe(map$1((response) => ({
4808
+ success: response.success,
4809
+ message: response.message,
4810
+ data: (response.data ?? []).map((role) => ({
4811
+ id: role.roleId,
4812
+ name: role.roleName,
4813
+ description: null,
4814
+ })),
4815
+ })));
4816
+ }
4817
+ getUserActions(userId, branchId) {
4818
+ return this.permissionApi
4819
+ .getUserActions(userId, branchId ? { branchId } : undefined)
4820
+ .pipe(map$1((response) => ({
4821
+ success: response.success,
4822
+ message: response.message,
4823
+ data: (response.data ?? []).map((action) => ({
4824
+ id: action.actionId,
4825
+ name: action.actionName,
4826
+ code: action.actionCode,
4827
+ description: null,
4828
+ })),
4829
+ })));
4830
+ }
4831
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ProfilePermissionProviderAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4832
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ProfilePermissionProviderAdapter });
4833
+ }
4834
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ProfilePermissionProviderAdapter, decorators: [{
4835
+ type: Injectable
4836
+ }] });
4837
+
4838
+ /**
4839
+ * Provide IAM Provider Adapters
4840
+ *
4841
+ * Registers IAM implementations for provider interfaces from ng-shared.
4842
+ * This allows ng-auth profile page to display permissions without direct dependencies.
4843
+ *
4844
+ * @example
4845
+ * // In app.config.ts
4846
+ * import { provideIamProviders } from '@flusys/ng-iam';
4847
+ *
4848
+ * export const appConfig: ApplicationConfig = {
4849
+ * providers: [
4850
+ * ...provideIamProviders(),
4851
+ * // ... other providers
4852
+ * ]
4853
+ * };
4854
+ *
4855
+ * @returns Array of Angular providers
4856
+ */
4857
+ function provideIamProviders() {
4858
+ return [
4859
+ // Profile permission provider (for auth profile page)
4860
+ {
4861
+ provide: PROFILE_PERMISSION_PROVIDER,
4862
+ useClass: ProfilePermissionProviderAdapter,
4863
+ },
4864
+ ];
4865
+ }
4866
+
4980
4867
  /**
4981
4868
  * IAM Routes Configuration
4982
4869
  *
@@ -4990,7 +4877,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
4990
4877
  const IAM_ROUTES = [
4991
4878
  {
4992
4879
  path: '',
4993
- loadComponent: () => import('./flusys-ng-iam-iam-container.component-BFKoNtdz.mjs').then((m) => m.IamContainerComponent),
4880
+ loadComponent: () => import('./flusys-ng-iam-iam-container.component-Chl5MDkV.mjs').then((m) => m.IamContainerComponent),
4994
4881
  children: [
4995
4882
  // Actions Management
4996
4883
  {
@@ -4998,15 +4885,15 @@ const IAM_ROUTES = [
4998
4885
  children: [
4999
4886
  {
5000
4887
  path: '',
5001
- loadComponent: () => import('./flusys-ng-iam-action-list-page.component-CCp7M7xo.mjs').then((m) => m.ActionListPageComponent),
4888
+ loadComponent: () => import('./flusys-ng-iam-action-list-page.component-Dfts0JCt.mjs').then((m) => m.ActionListPageComponent),
5002
4889
  },
5003
4890
  {
5004
4891
  path: 'new',
5005
- loadComponent: () => import('./flusys-ng-iam-action-form-page.component-BVWZMlLU.mjs').then((m) => m.ActionFormPageComponent),
4892
+ loadComponent: () => import('./flusys-ng-iam-action-form-page.component-DBJzC5GS.mjs').then((m) => m.ActionFormPageComponent),
5006
4893
  },
5007
4894
  {
5008
4895
  path: ':id',
5009
- loadComponent: () => import('./flusys-ng-iam-action-form-page.component-BVWZMlLU.mjs').then((m) => m.ActionFormPageComponent),
4896
+ loadComponent: () => import('./flusys-ng-iam-action-form-page.component-DBJzC5GS.mjs').then((m) => m.ActionFormPageComponent),
5010
4897
  },
5011
4898
  ],
5012
4899
  },
@@ -5016,22 +4903,22 @@ const IAM_ROUTES = [
5016
4903
  children: [
5017
4904
  {
5018
4905
  path: '',
5019
- loadComponent: () => import('./flusys-ng-iam-role-list-page.component-KJUVOrf0.mjs').then((m) => m.RoleListPageComponent),
4906
+ loadComponent: () => import('./flusys-ng-iam-role-list-page.component-BF-Z_TQK.mjs').then((m) => m.RoleListPageComponent),
5020
4907
  },
5021
4908
  {
5022
4909
  path: 'new',
5023
- loadComponent: () => import('./flusys-ng-iam-role-form-page.component-Co6bbHik.mjs').then((m) => m.RoleFormPageComponent),
4910
+ loadComponent: () => import('./flusys-ng-iam-role-form-page.component-Ctigzpon.mjs').then((m) => m.RoleFormPageComponent),
5024
4911
  },
5025
4912
  {
5026
4913
  path: ':id',
5027
- loadComponent: () => import('./flusys-ng-iam-role-form-page.component-Co6bbHik.mjs').then((m) => m.RoleFormPageComponent),
4914
+ loadComponent: () => import('./flusys-ng-iam-role-form-page.component-Ctigzpon.mjs').then((m) => m.RoleFormPageComponent),
5028
4915
  },
5029
4916
  ],
5030
4917
  },
5031
4918
  // Permissions Management (User permission assignment)
5032
4919
  {
5033
4920
  path: 'permissions',
5034
- loadComponent: () => import('./flusys-ng-iam-permission-page.component-C0yLMdW5.mjs').then((m) => m.PermissionPageComponent),
4921
+ loadComponent: () => import('./flusys-ng-iam-permission-page.component-cDrwUAQ_.mjs').then((m) => m.PermissionPageComponent),
5035
4922
  },
5036
4923
  // Default redirect to actions
5037
4924
  {
@@ -5049,5 +4936,5 @@ const IAM_ROUTES = [
5049
4936
  * Generated bundle index. Do not edit.
5050
4937
  */
5051
4938
 
5052
- export { ActionApiService as A, CompanyActionSelectorComponent as C, IAM_ROUTES 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, MyPermissionsApiService as f, PermissionStateService as g };
5053
- //# sourceMappingURL=flusys-ng-iam-flusys-ng-iam-D_i24Gub.mjs.map
4939
+ export { ActionApiService as A, CompanyActionSelectorComponent as C, IAM_ROUTES 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, MyPermissionsApiService as f, PermissionStateService as g, ProfilePermissionProviderAdapter as h, provideIamProviders as p };
4940
+ //# sourceMappingURL=flusys-ng-iam-flusys-ng-iam-BjdM-Vgz.mjs.map