valtech-components 4.0.235 → 4.0.236
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/profile-modal/profile-modal.component.mjs +72 -0
- package/esm2022/lib/services/header-actions.service.mjs +60 -0
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/valtech-components.mjs +126 -5
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/profile-modal/profile-modal.component.d.ts +20 -0
- package/lib/services/header-actions.service.d.ts +38 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* `val-profile-modal` — modal que envuelve `val-profile-view` (organism compartido).
|
|
4
|
+
* Promovido desde `bingo` (ADR-021) para que todas las apps abran el MISMO modal de
|
|
5
|
+
* perfil desde el avatar del header. Se abre vía `ModalService.open({ component })`
|
|
6
|
+
* (recibe `_modalRef` por componentProps) o lo despacha `HeaderActionsService`.
|
|
7
|
+
*
|
|
8
|
+
* Header canónico (Regla #5): sin `ion-title`, botón Cerrar en `slot=end`.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ProfileModalComponent {
|
|
11
|
+
private readonly i18n;
|
|
12
|
+
_modalRef?: {
|
|
13
|
+
dismiss: (data?: unknown, role?: string) => void;
|
|
14
|
+
};
|
|
15
|
+
constructor();
|
|
16
|
+
t(key: string): string;
|
|
17
|
+
close(): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProfileModalComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ProfileModalComponent, "val-profile-modal", never, { "_modalRef": { "alias": "_modalRef"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Rutas que las acciones estándar del header pueden necesitar. Cada app las
|
|
4
|
+
* ajusta a su routing; los defaults siguen la convención del factory.
|
|
5
|
+
*/
|
|
6
|
+
export interface HeaderActionsConfig {
|
|
7
|
+
/** Ruta del inbox de notificaciones. Default `/app/notifications`. */
|
|
8
|
+
notificationsRoute?: string;
|
|
9
|
+
/** Ruta de perfil (link "ver perfil" dentro del switch-org). Default `/app/settings/profile`. */
|
|
10
|
+
profileRoute?: string;
|
|
11
|
+
/** Ruta de gestión de la org (link "gestionar" del switch-org). Default `/app/settings/organization`. */
|
|
12
|
+
manageOrgRoute?: string;
|
|
13
|
+
/** Callback opcional para "crear organización" desde el switch-org (la app maneja su propio modal de creación). */
|
|
14
|
+
onCreateOrg?: () => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* HeaderActionsService — comportamiento ESTÁNDAR de los avatares/acciones del
|
|
18
|
+
* header del factory, centralizado en la lib para que todas las apps lo hereden.
|
|
19
|
+
*
|
|
20
|
+
* Cada app decide QUÉ acciones pone en su header (tokens), pero QUÉ HACE cada
|
|
21
|
+
* token estándar vive aquí:
|
|
22
|
+
* - `org` → abre el modal de cambio/gestión de organización.
|
|
23
|
+
* - `profile` → abre el modal de perfil (`val-profile-modal`).
|
|
24
|
+
* - `notifications` → navega al inbox de notificaciones.
|
|
25
|
+
*
|
|
26
|
+
* Uso en el `(onHeaderClick)` del `val-page-wrapper`:
|
|
27
|
+
* onHeaderClick(token: string) { void this.headerActions.handle(token); }
|
|
28
|
+
*
|
|
29
|
+
* `handle` devuelve `true` si manejó el token (para que la app pueda encadenar
|
|
30
|
+
* sus propios tokens custom cuando devuelva `false`).
|
|
31
|
+
*/
|
|
32
|
+
export declare class HeaderActionsService {
|
|
33
|
+
private modal;
|
|
34
|
+
private router;
|
|
35
|
+
handle(token: string, config?: HeaderActionsConfig): Promise<boolean>;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderActionsService, never>;
|
|
37
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HeaderActionsService>;
|
|
38
|
+
}
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -315,6 +315,7 @@ export * from './lib/components/organisms/about-view/about.routes';
|
|
|
315
315
|
export * from './lib/services/org/permission-catalog.service';
|
|
316
316
|
export * from './lib/components/organisms/delete-account-modal/delete-account-modal.component';
|
|
317
317
|
export * from './lib/components/organisms/switch-org-modal/switch-org-modal.component';
|
|
318
|
+
export * from './lib/components/organisms/profile-modal/profile-modal.component';
|
|
318
319
|
export * from './lib/components/organisms/create-org-modal/create-org-modal.component';
|
|
319
320
|
export * from './lib/components/organisms/org-info-sheet/org-info-sheet.component';
|
|
320
321
|
export * from './lib/components/organisms/invite-member-modal/invite-member-modal.component';
|
|
@@ -370,6 +371,7 @@ export * from './lib/services/qr-generator/types';
|
|
|
370
371
|
export * from './lib/services/ticket-card-image/ticket-card-image.service';
|
|
371
372
|
export * from './lib/services/ticket-card-image/types';
|
|
372
373
|
export * from './lib/services/modal/modal.service';
|
|
374
|
+
export * from './lib/services/header-actions.service';
|
|
373
375
|
export * from './lib/services/modal/types';
|
|
374
376
|
export * from './lib/services/meta';
|
|
375
377
|
export * from './lib/services/markdown-article/markdown-article-parser';
|