valtech-components 4.0.20 → 4.0.22
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/esm2022/lib/components/organisms/invite-member-modal/invite-member-modal.component.mjs +8 -8
- package/esm2022/lib/components/organisms/member-detail-modal/member-detail-modal.component.mjs +3 -13
- package/esm2022/lib/components/organisms/organization-view/organization-view.component.mjs +4 -31
- package/esm2022/lib/services/modal/modal.service.mjs +4 -2
- package/esm2022/lib/services/org/types.mjs +62 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +83 -59
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/invite-member-modal/invite-member-modal.component.d.ts +3 -2
- package/lib/services/org/types.d.ts +13 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnDestroy } from '@angular/core';
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
3
|
import { ButtonMetadata, InputMetadata } from '../../types';
|
|
4
4
|
import { OrgRole } from '../../../services/org/types';
|
|
@@ -24,7 +24,7 @@ interface PublicUserProfile {
|
|
|
24
24
|
* Auto-registra sus defaults i18n (es/en) si el consumer no proveyó el namespace
|
|
25
25
|
* `InviteModal`.
|
|
26
26
|
*/
|
|
27
|
-
export declare class InviteMemberModalComponent implements OnDestroy {
|
|
27
|
+
export declare class InviteMemberModalComponent implements OnInit, OnDestroy {
|
|
28
28
|
private orgService;
|
|
29
29
|
private auth;
|
|
30
30
|
private toast;
|
|
@@ -65,6 +65,7 @@ export declare class InviteMemberModalComponent implements OnDestroy {
|
|
|
65
65
|
isSelected(userId: string): boolean;
|
|
66
66
|
toggleUser(user: PublicUserProfile): void;
|
|
67
67
|
onSendSelected(): Promise<void>;
|
|
68
|
+
ngOnInit(): void;
|
|
68
69
|
ngOnDestroy(): void;
|
|
69
70
|
dismiss(): void;
|
|
70
71
|
t(key: string): string;
|
|
@@ -95,6 +95,19 @@ export interface OrgRole {
|
|
|
95
95
|
* Fallback: displayName en otro idioma → role.name (snake_case).
|
|
96
96
|
*/
|
|
97
97
|
export declare function resolveRoleLabel(role: OrgRole, lang: string): string;
|
|
98
|
+
/**
|
|
99
|
+
* Resuelve el label de un rol a partir de una lista de roles disponibles.
|
|
100
|
+
* Busca por id o name → usa resolveRoleLabel → fallback: humaniza el name.
|
|
101
|
+
*
|
|
102
|
+
* Función canónica de resolución. Reemplaza los keyMaps manuales en org-view y
|
|
103
|
+
* member-detail-modal. Cubre roles del sistema Y roles custom de app.
|
|
104
|
+
*/
|
|
105
|
+
export declare function resolveRoleLabelFromList(roleIdOrName: string, roles: OrgRole[], lang: string): string;
|
|
106
|
+
/**
|
|
107
|
+
* Roles del sistema con displayName (es/en). Espejo de SystemRoleLabels (backend Go).
|
|
108
|
+
* Backend es autoritativo — esto es un seed para renders previos a la carga de la API.
|
|
109
|
+
*/
|
|
110
|
+
export declare const SYSTEM_ROLE_DEFAULTS: OrgRole[];
|
|
98
111
|
export interface ListOrgRolesResponse {
|
|
99
112
|
operationId: string;
|
|
100
113
|
roles: OrgRole[];
|
package/lib/version.d.ts
CHANGED