valtech-components 2.0.935 → 2.0.937

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.
@@ -0,0 +1,53 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { InvitationCardEvent, InvitationCardMetadata } from './types';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * val-invitation-card
6
+ *
7
+ * Tarjeta de invitación pendiente a una organización. Muestra el nombre de la
8
+ * org, quién invita y el rol, con acciones aceptar / rechazar.
9
+ *
10
+ * Soporta i18n (namespace `InvitationCard` por defecto) y dark mode vía
11
+ * variables Ionic basadas en `dark` (sin tonos light/medium).
12
+ *
13
+ * @example
14
+ * ```html
15
+ * <val-invitation-card
16
+ * [props]="{
17
+ * token: invite.orgId,
18
+ * orgName: invite.orgName,
19
+ * inviterName: invite.inviterName,
20
+ * role: invite.roleId,
21
+ * accepting: accepting() === invite.orgId
22
+ * }"
23
+ * (onAccept)="accept(invite)"
24
+ * (onDecline)="decline(invite)"
25
+ * />
26
+ * ```
27
+ */
28
+ export declare class InvitationCardComponent {
29
+ private i18n;
30
+ readonly props: import("@angular/core").InputSignal<Partial<InvitationCardMetadata>>;
31
+ onAccept: EventEmitter<InvitationCardEvent>;
32
+ onDecline: EventEmitter<InvitationCardEvent>;
33
+ readonly config: import("@angular/core").Signal<{
34
+ token?: string;
35
+ orgName?: string;
36
+ inviterName?: string;
37
+ role?: string;
38
+ accepting: boolean;
39
+ disabled: boolean;
40
+ i18nNamespace: string;
41
+ acceptKey: string;
42
+ declineKey: string;
43
+ acceptLabel?: string;
44
+ declineLabel?: string;
45
+ }>;
46
+ readonly subtitle: import("@angular/core").Signal<string>;
47
+ readonly acceptLabel: import("@angular/core").Signal<string>;
48
+ readonly declineLabel: import("@angular/core").Signal<string>;
49
+ emitAccept(): void;
50
+ emitDecline(): void;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<InvitationCardComponent, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<InvitationCardComponent, "val-invitation-card", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "onAccept": "onAccept"; "onDecline": "onDecline"; }, never, never, true, never>;
53
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Evento emitido por val-invitation-card (accept / decline).
3
+ */
4
+ export interface InvitationCardEvent {
5
+ /** Token identificador de la invitación (orgId u otro). */
6
+ token?: string;
7
+ }
8
+ /**
9
+ * Metadata para val-invitation-card.
10
+ *
11
+ * El contenido dinámico (orgName, inviterName, role) llega por props.
12
+ * Las etiquetas de acción se traducen vía i18n (namespace por defecto
13
+ * `InvitationCard`) o se sobrescriben con acceptLabel / declineLabel.
14
+ */
15
+ export interface InvitationCardMetadata {
16
+ /** Token identificador (e.g. orgId). Se reenvía en los eventos. */
17
+ token?: string;
18
+ /** Nombre de la organización que invita. */
19
+ orgName: string;
20
+ /** Nombre de quien invita (opcional). */
21
+ inviterName?: string;
22
+ /** Rol asignado — id crudo (e.g. 'viewer') o etiqueta ya traducida. */
23
+ role?: string;
24
+ /** Muestra spinner en lugar de acciones (acción en curso). */
25
+ accepting?: boolean;
26
+ /** Deshabilita las acciones. */
27
+ disabled?: boolean;
28
+ /** Namespace i18n para las etiquetas de acción. */
29
+ i18nNamespace?: string;
30
+ /** Key i18n para "aceptar". */
31
+ acceptKey?: string;
32
+ /** Key i18n para "rechazar". */
33
+ declineKey?: string;
34
+ /** Etiqueta estática para aceptar (override de i18n). */
35
+ acceptLabel?: string;
36
+ /** Etiqueta estática para rechazar (override de i18n). */
37
+ declineLabel?: string;
38
+ }
39
+ /**
40
+ * Defaults de InvitationCardMetadata.
41
+ */
42
+ export declare const INVITATION_CARD_DEFAULTS: Required<Pick<InvitationCardMetadata, 'accepting' | 'disabled' | 'i18nNamespace' | 'acceptKey' | 'declineKey'>>;
@@ -90,7 +90,7 @@ 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?: "small" | "default" | "large";
93
+ size?: "default" | "small" | "large";
94
94
  fill?: "default" | "clear" | "outline" | "solid";
95
95
  type: "reset" | "submit" | "button";
96
96
  token?: string;
@@ -32,9 +32,14 @@ export declare class DebugConsoleComponent implements OnInit, OnDestroy {
32
32
  */
33
33
  private push;
34
34
  /**
35
- * Vuelca el buffer al signal `entries` en un microtask — fuera del contexto
36
- * reactivo desde el que se haya llamado `console.log`. Batchea: múltiples
37
- * logs del mismo tick resultan en una sola escritura del signal.
35
+ * Vuelca el buffer al signal `entries`, diferido y throttled.
36
+ *
37
+ * `entries.set()` dispara change-detection (el signal se lee en el template).
38
+ * Si algo emite `console.*` en cada CD (p.ej. un binding que loguea), un flush
39
+ * por microtask re-encola CD inmediatamente → loop infinito que congela el
40
+ * navegador. El throttle por tiempo acota el peor caso a ~1 CD/ventana en vez
41
+ * de 1 CD/microtask: el buffer absorbe todos los logs intermedios en una sola
42
+ * escritura. Sigue fuera del contexto reactivo del `console.log` (evita NG0600).
38
43
  */
39
44
  private scheduleFlush;
40
45
  /** Convierte cualquier argumento a una representación legible de una línea. */
@@ -31,6 +31,16 @@ export declare class I18nService {
31
31
  readonly isSpanish: import("@angular/core").Signal<boolean>;
32
32
  readonly isEnglish: import("@angular/core").Signal<boolean>;
33
33
  private readonly isBrowser;
34
+ /**
35
+ * Keys faltantes ya advertidas (`ns.key.lang`). Garantiza que el warning se
36
+ * emita UNA sola vez por key, nunca por cada change-detection.
37
+ *
38
+ * Crítico: `getText` se evalúa en bindings de template (una vez por CD). Si
39
+ * advirtiéramos en cada llamada, un `console.warn` por CD + el `val-debug-console`
40
+ * (que espeja `console.*` a un signal) crea un loop infinito de CD que congela
41
+ * el navegador en dev. Deduplicar corta ese loop en su origen.
42
+ */
43
+ private readonly _warnedMissing;
34
44
  constructor(platformId: Object);
35
45
  /**
36
46
  * Obtiene texto traducido (alias corto de getText)
@@ -68,7 +78,8 @@ export declare class I18nService {
68
78
  * Fallback order:
69
79
  * 1. content[namespace][lang][key]
70
80
  * 2. content['_global'][lang][key]
71
- * 3. "[namespace.key]" (placeholder)
81
+ * 3. "" (string vacío) — nunca un placeholder visible ni un valor que
82
+ * rompa el render. El consumer puede aplicar su propio fallback con `||`.
72
83
  */
73
84
  getText(key: string, namespace?: string, data?: Record<string, string>): string;
74
85
  /**
package/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "2.0.935";
5
+ export declare const VERSION = "2.0.937";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.935",
3
+ "version": "2.0.937",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"
package/public-api.d.ts CHANGED
@@ -173,6 +173,8 @@ export * from './lib/components/molecules/update-banner/update-banner.component'
173
173
  export * from './lib/components/molecules/update-banner/types';
174
174
  export * from './lib/components/molecules/action-card/action-card.component';
175
175
  export * from './lib/components/molecules/action-card/types';
176
+ export * from './lib/components/molecules/invitation-card/invitation-card.component';
177
+ export * from './lib/components/molecules/invitation-card/types';
176
178
  export * from './lib/components/molecules/username-input/username-input.component';
177
179
  export * from './lib/components/molecules/username-input/types';
178
180
  export * from './lib/components/molecules/linked-providers/linked-providers.component';