valtech-components 2.0.917 → 2.0.919
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/directives/has-permission.directive.mjs +44 -0
- package/esm2022/lib/services/org/org.service.mjs +13 -1
- package/esm2022/lib/services/org/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/valtech-components.mjs +24740 -24687
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +2 -2
- package/lib/components/atoms/text/text.component.d.ts +1 -1
- package/lib/components/atoms/user-avatar/user-avatar.component.d.ts +1 -1
- package/lib/components/molecules/features-list/features-list.component.d.ts +1 -1
- package/lib/components/organisms/article/article.component.d.ts +5 -5
- package/lib/components/organisms/toolbar/toolbar.component.d.ts +1 -1
- package/lib/directives/has-permission.directive.d.ts +21 -0
- package/lib/services/org/org.service.d.ts +4 -1
- package/lib/services/org/types.d.ts +18 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -1
|
@@ -39,11 +39,11 @@ export declare class RightsFooterComponent {
|
|
|
39
39
|
/**
|
|
40
40
|
* Computed helper for align prop in template.
|
|
41
41
|
*/
|
|
42
|
-
propsAlign: import("@angular/core").Signal<"
|
|
42
|
+
propsAlign: import("@angular/core").Signal<"left" | "center" | "right">;
|
|
43
43
|
/**
|
|
44
44
|
* Computed helper for color prop in template.
|
|
45
45
|
*/
|
|
46
|
-
propsColor: import("@angular/core").Signal<"
|
|
46
|
+
propsColor: import("@angular/core").Signal<"success" | "medium" | "primary" | "secondary" | "tertiary" | "warning" | "danger" | "light" | "dark">;
|
|
47
47
|
/**
|
|
48
48
|
* Computed helper for withMargin prop in template.
|
|
49
49
|
*/
|
|
@@ -11,7 +11,7 @@ export declare class TextComponent {
|
|
|
11
11
|
*/
|
|
12
12
|
displayContent: import("@angular/core").Signal<string>;
|
|
13
13
|
propsColor: import("@angular/core").Signal<import("@ionic/core").Color>;
|
|
14
|
-
propsSize: import("@angular/core").Signal<"
|
|
14
|
+
propsSize: import("@angular/core").Signal<"small" | "medium" | "large" | "xlarge">;
|
|
15
15
|
propsBold: import("@angular/core").Signal<boolean>;
|
|
16
16
|
propsProcessLinks: import("@angular/core").Signal<boolean>;
|
|
17
17
|
propsAllowPartialBold: import("@angular/core").Signal<boolean>;
|
|
@@ -38,7 +38,7 @@ export declare class UserAvatarComponent {
|
|
|
38
38
|
readonly imageUrl: import("@angular/core").Signal<string>;
|
|
39
39
|
/** Iniciales — 1-2 chars derivados de name (preferred) o email prefix. */
|
|
40
40
|
readonly initials: import("@angular/core").Signal<string>;
|
|
41
|
-
readonly sizeClass: import("@angular/core").Signal<"
|
|
41
|
+
readonly sizeClass: import("@angular/core").Signal<"small" | "medium" | "large" | "xlarge" | "xsmall">;
|
|
42
42
|
readonly shapeClass: import("@angular/core").Signal<"circle" | "square">;
|
|
43
43
|
/** Background — explicito o derivado deterministicamente del user. */
|
|
44
44
|
readonly bgColor: import("@angular/core").Signal<string>;
|
|
@@ -48,7 +48,7 @@ export declare class FeaturesListComponent {
|
|
|
48
48
|
iconColor: string;
|
|
49
49
|
iconSize: number;
|
|
50
50
|
mode: "horizontal" | "vertical";
|
|
51
|
-
gap: "
|
|
51
|
+
gap: "small" | "medium" | "large";
|
|
52
52
|
alignment: "center" | "start";
|
|
53
53
|
}>;
|
|
54
54
|
/** Resolved icon color (handles Ionic colors and CSS colors) */
|
|
@@ -45,7 +45,7 @@ export declare class ArticleComponent implements OnInit {
|
|
|
45
45
|
getVideoElement(element: ArticleElement): ArticleVideoElement;
|
|
46
46
|
getCustomElement(element: ArticleElement): ArticleCustomElement;
|
|
47
47
|
getQuoteTextProps(element: ArticleElement): {
|
|
48
|
-
size: "
|
|
48
|
+
size: "small" | "medium" | "large" | "xlarge";
|
|
49
49
|
color: import("@ionic/core").Color;
|
|
50
50
|
content?: string;
|
|
51
51
|
bold: boolean;
|
|
@@ -57,11 +57,11 @@ export declare class ArticleComponent implements OnInit {
|
|
|
57
57
|
linkConfig?: import("valtech-components").LinkProcessorConfig;
|
|
58
58
|
allowPartialBold?: boolean;
|
|
59
59
|
authorColor?: import("@ionic/core").Color;
|
|
60
|
-
alignment?: "
|
|
60
|
+
alignment?: "left" | "center" | "right";
|
|
61
61
|
showQuoteMark?: boolean;
|
|
62
62
|
};
|
|
63
63
|
getHighlightTextProps(element: ArticleElement): {
|
|
64
|
-
size: "
|
|
64
|
+
size: "small" | "medium" | "large" | "xlarge";
|
|
65
65
|
color: import("@ionic/core").Color;
|
|
66
66
|
content?: string;
|
|
67
67
|
bold: boolean;
|
|
@@ -90,9 +90,9 @@ export declare class ArticleComponent implements OnInit {
|
|
|
90
90
|
contentInterpolation?: Record<string, string | number>;
|
|
91
91
|
icon?: import("valtech-components").IconMetada;
|
|
92
92
|
shape?: "round";
|
|
93
|
-
size?: "
|
|
93
|
+
size?: "default" | "small" | "large";
|
|
94
94
|
fill?: "default" | "clear" | "outline" | "solid";
|
|
95
|
-
type: "
|
|
95
|
+
type: "reset" | "submit" | "button";
|
|
96
96
|
token?: string;
|
|
97
97
|
ref?: any;
|
|
98
98
|
handler?: (value: any) => any;
|
|
@@ -72,7 +72,7 @@ export declare class ToolbarComponent implements OnInit {
|
|
|
72
72
|
};
|
|
73
73
|
showFlags?: boolean;
|
|
74
74
|
color: import("@ionic/core").Color;
|
|
75
|
-
size?: "
|
|
75
|
+
size?: "default" | "small" | "large";
|
|
76
76
|
fill?: "default" | "clear" | "outline" | "solid";
|
|
77
77
|
shape?: "round";
|
|
78
78
|
expand?: "full" | "block";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Structural directive that renders its host element only when the
|
|
4
|
+
* authenticated user has the required permission in the active org.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* <ion-button *valHasPermission="'rbac:manage'">Gestionar roles</ion-button>
|
|
8
|
+
*
|
|
9
|
+
* Permissions use resource:action format (e.g. 'users:read', 'documents:*', '*:*').
|
|
10
|
+
* Wildcard rules from the backend are respected by AuthService.hasPermission().
|
|
11
|
+
*/
|
|
12
|
+
export declare class HasPermissionDirective {
|
|
13
|
+
private auth;
|
|
14
|
+
private tpl;
|
|
15
|
+
private vc;
|
|
16
|
+
readonly valHasPermission: import("@angular/core").InputSignal<string>;
|
|
17
|
+
private hasView;
|
|
18
|
+
constructor();
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HasPermissionDirective, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HasPermissionDirective, "[valHasPermission]", never, { "valHasPermission": { "alias": "valHasPermission"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { ValtechAuthConfig } from '../auth/types';
|
|
4
|
-
import { Organization, CreateOrgRequest, UpdateOrgRequest, InviteUserRequest, InviteUserResponse, LeaveOrgResponse, ListOrgMembersResponse, PendingInvitation, AcceptInvitationResponse } from './types';
|
|
4
|
+
import { Organization, CreateOrgRequest, UpdateOrgRequest, InviteUserRequest, InviteUserResponse, LeaveOrgResponse, ListOrgMembersResponse, OrgRole, ChangeMemberRoleResponse, PendingInvitation, AcceptInvitationResponse } from './types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class OrgService {
|
|
7
7
|
private config;
|
|
@@ -22,6 +22,9 @@ export declare class OrgService {
|
|
|
22
22
|
limit?: number;
|
|
23
23
|
nextToken?: string;
|
|
24
24
|
}): Observable<ListOrgMembersResponse>;
|
|
25
|
+
listOrgRoles(orgId: string): Observable<OrgRole[]>;
|
|
26
|
+
changeMemberRole(orgId: string, userId: string, roleId: string): Observable<ChangeMemberRoleResponse>;
|
|
27
|
+
removeMember(orgId: string, userId: string): Observable<void>;
|
|
25
28
|
transferOwnership(orgId: string, newOwnerId: string): Observable<Organization>;
|
|
26
29
|
validateInviteToken(token: string): Observable<{
|
|
27
30
|
valid: boolean;
|
|
@@ -77,3 +77,21 @@ export interface AcceptInvitationResponse {
|
|
|
77
77
|
orgName: string;
|
|
78
78
|
roleId: string;
|
|
79
79
|
}
|
|
80
|
+
export interface OrgRole {
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
}
|
|
85
|
+
export interface ListOrgRolesResponse {
|
|
86
|
+
operationId: string;
|
|
87
|
+
roles: OrgRole[];
|
|
88
|
+
}
|
|
89
|
+
export interface ChangeMemberRoleRequest {
|
|
90
|
+
roleId: string;
|
|
91
|
+
}
|
|
92
|
+
export interface ChangeMemberRoleResponse {
|
|
93
|
+
operationId: string;
|
|
94
|
+
userId: string;
|
|
95
|
+
orgId: string;
|
|
96
|
+
roleId: string;
|
|
97
|
+
}
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './lib/version';
|
|
2
|
+
export * from './lib/directives/has-permission.directive';
|
|
2
3
|
export * from './lib/components/atoms/avatar/avatar.component';
|
|
3
4
|
export * from './lib/components/atoms/avatar/types';
|
|
4
5
|
export * from './lib/components/atoms/box/box.component';
|
|
@@ -285,7 +286,7 @@ export * from './lib/services/legal-link/legal-link.service';
|
|
|
285
286
|
export * from './lib/services/firebase';
|
|
286
287
|
export * from './lib/services/auth';
|
|
287
288
|
export { OrgService } from './lib/services/org/org.service';
|
|
288
|
-
export type { Organization, OrgType, OrgPlan, CreateOrgRequest, UpdateOrgRequest, InviteUserRequest, InviteUserResponse, LeaveOrgResponse, ListMyOrgsResponse, OrgResponse, OrgMember, ListOrgMembersResponse, PendingInvitation, ListPendingInvitationsResponse, AcceptInvitationResponse, } from './lib/services/org/types';
|
|
289
|
+
export type { Organization, OrgType, OrgPlan, CreateOrgRequest, UpdateOrgRequest, InviteUserRequest, InviteUserResponse, LeaveOrgResponse, ListMyOrgsResponse, OrgResponse, OrgMember, ListOrgMembersResponse, PendingInvitation, ListPendingInvitationsResponse, AcceptInvitationResponse, OrgRole, ListOrgRolesResponse, ChangeMemberRoleRequest, ChangeMemberRoleResponse, } from './lib/services/org/types';
|
|
289
290
|
export * from './lib/services/i18n';
|
|
290
291
|
export * from './lib/services/preferences';
|
|
291
292
|
export * from './lib/services/network-status';
|