@flusys/ng-iam 1.0.0-rc → 1.1.1-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.
- package/README.md +24 -175
- package/fesm2022/{flusys-ng-iam-action-form-page.component-C_BRrrWW.mjs → flusys-ng-iam-action-form-page.component-C1j10Qhw.mjs} +202 -174
- package/fesm2022/flusys-ng-iam-action-form-page.component-C1j10Qhw.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-action-list-page.component-BCzSardO.mjs +281 -0
- package/fesm2022/flusys-ng-iam-action-list-page.component-BCzSardO.mjs.map +1 -0
- package/fesm2022/{flusys-ng-iam-flusys-ng-iam-BPIpfrjN.mjs → flusys-ng-iam-flusys-ng-iam-DISrddPh.mjs} +829 -822
- package/fesm2022/flusys-ng-iam-flusys-ng-iam-DISrddPh.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-iam-container.component-BkhqmzLi.mjs +97 -0
- package/fesm2022/flusys-ng-iam-iam-container.component-BkhqmzLi.mjs.map +1 -0
- package/fesm2022/{flusys-ng-iam-permission-page.component-CmxOBJPu.mjs → flusys-ng-iam-permission-page.component-BSQFPt_N.mjs} +12 -41
- package/fesm2022/flusys-ng-iam-permission-page.component-BSQFPt_N.mjs.map +1 -0
- package/fesm2022/{flusys-ng-iam-role-form-page.component-ByNueI1a.mjs → flusys-ng-iam-role-form-page.component-Cqziu_BM.mjs} +134 -106
- package/fesm2022/flusys-ng-iam-role-form-page.component-Cqziu_BM.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam-role-list-page.component-BObCxHiB.mjs +266 -0
- package/fesm2022/flusys-ng-iam-role-list-page.component-BObCxHiB.mjs.map +1 -0
- package/fesm2022/flusys-ng-iam.mjs +1 -1
- package/package.json +2 -2
- package/types/flusys-ng-iam.d.ts +21 -40
- package/fesm2022/flusys-ng-iam-action-form-page.component-C_BRrrWW.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-action-list-page.component-Daf93zpS.mjs +0 -289
- package/fesm2022/flusys-ng-iam-action-list-page.component-Daf93zpS.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-flusys-ng-iam-BPIpfrjN.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-iam-container.component-Bn4kQtxW.mjs +0 -92
- package/fesm2022/flusys-ng-iam-iam-container.component-Bn4kQtxW.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-permission-page.component-CmxOBJPu.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-role-form-page.component-ByNueI1a.mjs.map +0 -1
- package/fesm2022/flusys-ng-iam-role-list-page.component-CFly5KnH.mjs +0 -316
- package/fesm2022/flusys-ng-iam-role-list-page.component-CFly5KnH.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
| Version | 1.0.0 |
|
|
15
15
|
| Dependencies | ng-core, ng-shared, ng-layout (IMenuItem only) |
|
|
16
16
|
| NO dependency on | ng-auth (fully independent via Provider Pattern) |
|
|
17
|
-
| CSS Framework | Tailwind CSS (not PrimeFlex) |
|
|
18
17
|
| Build | `npm run build:ng-iam` |
|
|
19
18
|
| Entry point | `public-api.ts` |
|
|
20
19
|
|
|
@@ -65,34 +64,21 @@ ng-iam requires these provider interfaces:
|
|
|
65
64
|
|
|
66
65
|
### How Components Use Providers
|
|
67
66
|
|
|
68
|
-
User selection uses `lib-user-select` component from ng-shared (encapsulates USER_PROVIDER):
|
|
69
|
-
|
|
70
|
-
```html
|
|
71
|
-
<!-- UserActionSelectorComponent / UserRoleSelectorComponent -->
|
|
72
|
-
<lib-user-select
|
|
73
|
-
[(value)]="selectedUserId"
|
|
74
|
-
[isEditMode]="true"
|
|
75
|
-
placeHolder="Select a user"
|
|
76
|
-
/>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Company context is accessed via `LAYOUT_AUTH_STATE`:
|
|
80
|
-
|
|
81
67
|
```typescript
|
|
68
|
+
// UserActionSelectorComponent / UserRoleSelectorComponent
|
|
69
|
+
private readonly userProvider = inject(USER_PROVIDER);
|
|
82
70
|
private readonly companyContext = inject(LAYOUT_AUTH_STATE);
|
|
83
71
|
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
.getUserBranchPermissions(userId)
|
|
95
|
-
.toPromise();
|
|
72
|
+
async loadUsers() {
|
|
73
|
+
const response = await firstValueFrom(
|
|
74
|
+
this.userProvider.getUsers({
|
|
75
|
+
page: 0,
|
|
76
|
+
pageSize: MAX_DROPDOWN_ITEMS,
|
|
77
|
+
companyId: this.companyContext.currentCompanyInfo()?.id || undefined,
|
|
78
|
+
})
|
|
79
|
+
);
|
|
80
|
+
this.users.set(response?.data ?? []);
|
|
81
|
+
}
|
|
96
82
|
```
|
|
97
83
|
|
|
98
84
|
---
|
|
@@ -377,14 +363,12 @@ Assigns actions directly to users (DIRECT/FULL mode).
|
|
|
377
363
|
| Standalone | Yes |
|
|
378
364
|
| Change Detection | OnPush |
|
|
379
365
|
|
|
380
|
-
**Dependencies:** `APP_CONFIG`, `LAYOUT_AUTH_STATE`, `USER_PERMISSION_PROVIDER`, `ActionApiService`, `ActionPermissionLogicService`, `PermissionApiService`, `MessageService`
|
|
366
|
+
**Dependencies:** `APP_CONFIG`, `LAYOUT_AUTH_STATE`, `USER_PROVIDER`, `USER_PERMISSION_PROVIDER`, `ActionApiService`, `ActionPermissionLogicService`, `PermissionApiService`, `MessageService`
|
|
381
367
|
|
|
382
368
|
**Features:**
|
|
383
|
-
- User dropdown (
|
|
369
|
+
- User dropdown (loaded from USER_PROVIDER)
|
|
384
370
|
- Branch selector (conditional, loaded from USER_PERMISSION_PROVIDER)
|
|
385
371
|
- Hierarchical TreeTable with checkboxes
|
|
386
|
-
- Responsive table with `overflow-x-auto` container
|
|
387
|
-
- Responsive columns (Code hidden on mobile, Description hidden until lg)
|
|
388
372
|
- Action type tags (backend/frontend/both)
|
|
389
373
|
- Prerequisite validation with tooltips
|
|
390
374
|
- Change tracking with pending add/remove summary
|
|
@@ -403,13 +387,11 @@ Assigns roles to users (RBAC/FULL mode).
|
|
|
403
387
|
| Standalone | Yes |
|
|
404
388
|
| Change Detection | OnPush |
|
|
405
389
|
|
|
406
|
-
**Dependencies:** `APP_CONFIG`, `LAYOUT_AUTH_STATE`, `USER_PERMISSION_PROVIDER`, `RoleApiService`, `PermissionApiService`, `MessageService`
|
|
390
|
+
**Dependencies:** `APP_CONFIG`, `LAYOUT_AUTH_STATE`, `USER_PROVIDER`, `USER_PERMISSION_PROVIDER`, `RoleApiService`, `PermissionApiService`, `MessageService`
|
|
407
391
|
|
|
408
392
|
**Features:**
|
|
409
|
-
- User dropdown
|
|
410
|
-
-
|
|
411
|
-
- DataTable with pagination and `overflow-x-auto` container
|
|
412
|
-
- Responsive columns (Code hidden on mobile, Description hidden until md)
|
|
393
|
+
- User dropdown with branch selector
|
|
394
|
+
- DataTable with pagination
|
|
413
395
|
- Change tracking with pending add/remove summary
|
|
414
396
|
- Select/deselect all
|
|
415
397
|
- No prerequisite validation (roles are simple assignments)
|
|
@@ -429,13 +411,12 @@ Assigns actions to roles (RBAC/FULL mode).
|
|
|
429
411
|
**Dependencies:** `RoleApiService`, `ActionApiService`, `PermissionApiService`, `MessageService`, `ActionPermissionLogicService`
|
|
430
412
|
|
|
431
413
|
**Features:**
|
|
432
|
-
- Role dropdown
|
|
433
|
-
- Hierarchical TreeTable with checkboxes
|
|
434
|
-
- Responsive columns (Code hidden until md, Requirements hidden until lg)
|
|
414
|
+
- Role dropdown
|
|
415
|
+
- Hierarchical TreeTable with checkboxes
|
|
435
416
|
- Prerequisite validation with smart dependency handling
|
|
436
417
|
- Request cancellation with AbortController
|
|
437
418
|
- Pre-save validation with auto-fix dialog
|
|
438
|
-
- Change tracking
|
|
419
|
+
- Change tracking
|
|
439
420
|
|
|
440
421
|
---
|
|
441
422
|
|
|
@@ -452,14 +433,11 @@ Manages company action whitelisting (when company feature enabled).
|
|
|
452
433
|
**Dependencies:** `COMPANY_API_PROVIDER`, `ActionApiService`, `PermissionApiService`, `MessageService`, `ConfirmationService`, `ActionPermissionLogicService`
|
|
453
434
|
|
|
454
435
|
**Features:**
|
|
455
|
-
- Company dropdown
|
|
436
|
+
- Company dropdown (loaded from COMPANY_API_PROVIDER)
|
|
456
437
|
- Full action tree (not filtered by company whitelist)
|
|
457
|
-
-
|
|
458
|
-
- Responsive columns (Code hidden until md, Description hidden until lg)
|
|
459
|
-
- Prerequisite validation with tooltips
|
|
438
|
+
- Prerequisite validation
|
|
460
439
|
- Backend prerequisite error handling with auto-fix
|
|
461
440
|
- Request cancellation with AbortController
|
|
462
|
-
- Change tracking with pending whitelist/remove summary
|
|
463
441
|
|
|
464
442
|
---
|
|
465
443
|
|
|
@@ -475,34 +453,8 @@ Tabbed navigation container for IAM pages.
|
|
|
475
453
|
|----------|-------|
|
|
476
454
|
| Selector | `lib-iam-container` |
|
|
477
455
|
| Tabs | Actions (always), Roles (RBAC/FULL), Permissions (always) |
|
|
478
|
-
| Change Detection | OnPush |
|
|
479
|
-
|
|
480
|
-
**Features:**
|
|
481
|
-
- Responsive page title (`text-xl sm:text-2xl`)
|
|
482
|
-
- Horizontally scrollable tabs on mobile (hidden scrollbar)
|
|
483
|
-
- Uses `RouterLink` and `RouterLinkActive` for navigation
|
|
484
|
-
- Tab visibility based on permission mode
|
|
485
456
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
```html
|
|
489
|
-
<!-- Page title -->
|
|
490
|
-
<h1 class="text-xl sm:text-2xl font-bold m-0">Identity & Access Management</h1>
|
|
491
|
-
|
|
492
|
-
<!-- Horizontally scrollable tabs (hidden scrollbar) -->
|
|
493
|
-
<div class="scrollbar-hide flex gap-1 overflow-x-auto flex-nowrap">
|
|
494
|
-
<!-- tabs -->
|
|
495
|
-
</div>
|
|
496
|
-
```
|
|
497
|
-
|
|
498
|
-
**Scrollbar hide CSS:**
|
|
499
|
-
```css
|
|
500
|
-
.scrollbar-hide {
|
|
501
|
-
-ms-overflow-style: none;
|
|
502
|
-
scrollbar-width: none;
|
|
503
|
-
&::-webkit-scrollbar { display: none; }
|
|
504
|
-
}
|
|
505
|
-
```
|
|
457
|
+
Uses `RouterLink` and `RouterLinkActive` for navigation. Tab visibility based on permission mode.
|
|
506
458
|
|
|
507
459
|
---
|
|
508
460
|
|
|
@@ -515,11 +467,6 @@ Hierarchical action list with CRUD operations.
|
|
|
515
467
|
| Selector | `lib-action-list-page` |
|
|
516
468
|
| Features | TreeTable display, create/edit/delete, read-only indicators, company context awareness |
|
|
517
469
|
|
|
518
|
-
**Responsive features:**
|
|
519
|
-
- TreeTable with `overflow-x-auto -mx-4 sm:mx-0` container
|
|
520
|
-
- Responsive columns: Code (hidden until md), Active (hidden until sm), Read Only (hidden until lg)
|
|
521
|
-
- Responsive header with stacked layout on mobile
|
|
522
|
-
|
|
523
470
|
Reloads actions when company context changes via effect.
|
|
524
471
|
|
|
525
472
|
---
|
|
@@ -546,11 +493,6 @@ Paginated role list with CRUD operations.
|
|
|
546
493
|
| Selector | `lib-role-list-page` |
|
|
547
494
|
| Features | Paginated table (10/25/50), create/edit/delete, company context filtering, read-only indicators |
|
|
548
495
|
|
|
549
|
-
**Responsive features:**
|
|
550
|
-
- Table with `overflow-x-auto -mx-4 sm:mx-0` container
|
|
551
|
-
- Responsive columns: Description (hidden until md), Read Only (hidden until sm)
|
|
552
|
-
- Conditional paginator (only shown when data exists)
|
|
553
|
-
|
|
554
496
|
---
|
|
555
497
|
|
|
556
498
|
### RoleFormPageComponent
|
|
@@ -941,96 +883,6 @@ GET /iam/permissions/company-actions/:id # Get company's whitelisted action
|
|
|
941
883
|
|
|
942
884
|
---
|
|
943
885
|
|
|
944
|
-
## Responsive Table Patterns
|
|
945
|
-
|
|
946
|
-
All IAM tables and tree tables use consistent responsive patterns with Tailwind CSS.
|
|
947
|
-
|
|
948
|
-
### Table Container Pattern
|
|
949
|
-
|
|
950
|
-
```html
|
|
951
|
-
<!-- Wrapper enables horizontal scroll on mobile, full-width on desktop -->
|
|
952
|
-
<div class="overflow-x-auto -mx-4 sm:mx-0">
|
|
953
|
-
<p-treeTable
|
|
954
|
-
[value]="treeNodes()"
|
|
955
|
-
dataKey="id"
|
|
956
|
-
styleClass="p-treetable-sm"
|
|
957
|
-
[tableStyle]="{ 'min-width': '50rem' }"
|
|
958
|
-
>
|
|
959
|
-
<!-- ... -->
|
|
960
|
-
</p-treeTable>
|
|
961
|
-
</div>
|
|
962
|
-
```
|
|
963
|
-
|
|
964
|
-
**Key properties:**
|
|
965
|
-
- `overflow-x-auto` - Enables horizontal scroll when content exceeds container
|
|
966
|
-
- `-mx-4 sm:mx-0` - Edge-to-edge on mobile, normal margins on desktop
|
|
967
|
-
- `[tableStyle]="{ 'min-width': '50rem' }"` - Minimum width ensures consistent layout
|
|
968
|
-
|
|
969
|
-
### Responsive Column Visibility
|
|
970
|
-
|
|
971
|
-
```html
|
|
972
|
-
<ng-template #header>
|
|
973
|
-
<tr>
|
|
974
|
-
<th class="w-12"><!-- checkbox --></th>
|
|
975
|
-
<th>Name</th> <!-- Always visible -->
|
|
976
|
-
<th class="hidden sm:table-cell">Code</th> <!-- Hidden on xs -->
|
|
977
|
-
<th>Type</th> <!-- Always visible -->
|
|
978
|
-
<th class="hidden md:table-cell">Status</th> <!-- Hidden until md -->
|
|
979
|
-
<th class="hidden lg:table-cell">Description</th> <!-- Hidden until lg -->
|
|
980
|
-
</tr>
|
|
981
|
-
</ng-template>
|
|
982
|
-
```
|
|
983
|
-
|
|
984
|
-
**Breakpoint classes:**
|
|
985
|
-
| Class | Visibility |
|
|
986
|
-
|-------|------------|
|
|
987
|
-
| (none) | Always visible |
|
|
988
|
-
| `hidden sm:table-cell` | Visible at 640px+ |
|
|
989
|
-
| `hidden md:table-cell` | Visible at 768px+ |
|
|
990
|
-
| `hidden lg:table-cell` | Visible at 1024px+ |
|
|
991
|
-
|
|
992
|
-
### Header Layout Pattern
|
|
993
|
-
|
|
994
|
-
```html
|
|
995
|
-
<div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-3 mb-4">
|
|
996
|
-
<div>
|
|
997
|
-
<h5 class="m-0 mb-1">Section Title</h5>
|
|
998
|
-
<p class="text-sm text-muted-color m-0">{{ count }} items available</p>
|
|
999
|
-
</div>
|
|
1000
|
-
<div class="flex flex-wrap gap-2">
|
|
1001
|
-
<!-- Action buttons -->
|
|
1002
|
-
</div>
|
|
1003
|
-
</div>
|
|
1004
|
-
```
|
|
1005
|
-
|
|
1006
|
-
### Dark Mode Styling
|
|
1007
|
-
|
|
1008
|
-
```css
|
|
1009
|
-
/* Light mode */
|
|
1010
|
-
.validation-warning {
|
|
1011
|
-
background-color: var(--p-yellow-50, #fefce8);
|
|
1012
|
-
border-left: 4px solid var(--p-yellow-500, #eab308);
|
|
1013
|
-
color: var(--p-yellow-700, #a16207);
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
/* Dark mode */
|
|
1017
|
-
:host-context(.p-dark) .validation-warning {
|
|
1018
|
-
background-color: rgba(234, 179, 8, 0.1);
|
|
1019
|
-
color: var(--p-yellow-400, #facc15);
|
|
1020
|
-
}
|
|
1021
|
-
```
|
|
1022
|
-
|
|
1023
|
-
**Color classes (Tailwind):**
|
|
1024
|
-
| Purpose | Class |
|
|
1025
|
-
|---------|-------|
|
|
1026
|
-
| Muted text | `text-muted-color` |
|
|
1027
|
-
| Success | `text-green-500` |
|
|
1028
|
-
| Danger | `text-red-500` |
|
|
1029
|
-
| Warning | `text-orange-500` |
|
|
1030
|
-
| Primary | `text-primary` |
|
|
1031
|
-
|
|
1032
|
-
---
|
|
1033
|
-
|
|
1034
886
|
## Best Practices
|
|
1035
887
|
|
|
1036
888
|
### Permission Loading
|
|
@@ -1134,9 +986,6 @@ const logic: ILogicNode = {
|
|
|
1134
986
|
| 401 on IAM endpoints with external auth | Auth token not forwarded | Ensure your auth interceptor adds `Authorization` header to IAM requests |
|
|
1135
987
|
| Provider not configured error | Missing DI registration | Add required providers to `app.config.ts` (USER_PROVIDER, LAYOUT_AUTH_STATE) |
|
|
1136
988
|
| Empty user/company dropdowns | API response format mismatch | Ensure adapters return `IListResponse<T>` format with `data` array |
|
|
1137
|
-
| TreeTable has excessive whitespace | Using `scrollHeight="flex"` without fixed-height parent | Remove `scrollHeight="flex"` and `[scrollable]="true"`, use `overflow-x-auto` container instead |
|
|
1138
|
-
| Table not horizontally scrollable on mobile | Missing responsive wrapper | Add `<div class="overflow-x-auto -mx-4 sm:mx-0">` around table |
|
|
1139
|
-
| Columns visible on mobile causing overflow | Missing responsive column classes | Add `hidden sm:table-cell` or `hidden md:table-cell` to non-essential columns |
|
|
1140
989
|
|
|
1141
990
|
---
|
|
1142
991
|
|
|
@@ -1225,5 +1074,5 @@ if (this.permissionProvider) {
|
|
|
1225
1074
|
|
|
1226
1075
|
---
|
|
1227
1076
|
|
|
1228
|
-
**Last Updated:** 2026-02-
|
|
1077
|
+
**Last Updated:** 2026-02-16
|
|
1229
1078
|
**Angular Version:** 21
|