valtech-components 4.0.156 → 4.0.157
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/cookie-settings/cookie-settings.component.mjs +240 -0
- package/esm2022/lib/services/firebase/analytics.service.mjs +28 -4
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/valtech-components.mjs +261 -6
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +1 -1
- package/lib/components/organisms/article/article.component.d.ts +2 -2
- package/lib/components/organisms/cookie-settings/cookie-settings.component.d.ts +47 -0
- package/lib/components/organisms/login/login.component.d.ts +1 -1
- package/lib/services/firebase/analytics.service.d.ts +6 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -43,7 +43,7 @@ export declare class RightsFooterComponent {
|
|
|
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
|
*/
|
|
@@ -93,9 +93,9 @@ export declare class ArticleComponent implements OnInit {
|
|
|
93
93
|
contentInterpolation?: Record<string, string | number>;
|
|
94
94
|
icon?: import("valtech-components").IconMetada;
|
|
95
95
|
shape?: "round";
|
|
96
|
-
size?: "
|
|
96
|
+
size?: "default" | "small" | "large";
|
|
97
97
|
fill?: "default" | "clear" | "outline" | "solid";
|
|
98
|
-
type: "
|
|
98
|
+
type: "reset" | "submit" | "button";
|
|
99
99
|
token?: string;
|
|
100
100
|
ref?: any;
|
|
101
101
|
handler?: (value: any) => any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { FormControl } from '@angular/forms';
|
|
3
|
+
import { ConsentSettings } from '../../../services/firebase/analytics-types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface CookieCategory {
|
|
6
|
+
key: keyof ConsentSettings;
|
|
7
|
+
labelKey: string;
|
|
8
|
+
hintKey: string;
|
|
9
|
+
control: FormControl<boolean>;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* `val-cookie-settings` — panel de gestion de consent GDPR.
|
|
14
|
+
*
|
|
15
|
+
* Self-contained: inyecta AnalyticsService internamente. Solo necesita montarse.
|
|
16
|
+
* Emite `(saved)` cuando el usuario guarda/acepta/rechaza para que el padre
|
|
17
|
+
* pueda cerrar un modal, navegar, etc.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <val-cookie-settings (saved)="onConsentSaved()" />
|
|
21
|
+
*/
|
|
22
|
+
export declare class CookieSettingsComponent implements OnInit {
|
|
23
|
+
private analytics;
|
|
24
|
+
private i18n;
|
|
25
|
+
private toast;
|
|
26
|
+
/** Muestra titulo y descripcion. Util desactivarlo cuando la pagina ya tiene header propio. */
|
|
27
|
+
showTitle: import("@angular/core").WritableSignal<boolean>;
|
|
28
|
+
/** Emite cuando el usuario guarda/acepta/rechaza. */
|
|
29
|
+
saved: EventEmitter<ConsentSettings>;
|
|
30
|
+
private analyticsCtrl;
|
|
31
|
+
private functionalityCtrl;
|
|
32
|
+
private advertisingCtrl;
|
|
33
|
+
private essentialCtrl;
|
|
34
|
+
readonly categories: CookieCategory[];
|
|
35
|
+
protected consentState: import("@angular/core").Signal<import("../../../services/firebase/analytics-types").ConsentState>;
|
|
36
|
+
protected hasDecided: import("@angular/core").Signal<boolean>;
|
|
37
|
+
protected lastUpdatedText: import("@angular/core").Signal<string>;
|
|
38
|
+
protected alwaysOnLabel: string;
|
|
39
|
+
ngOnInit(): void;
|
|
40
|
+
constructor();
|
|
41
|
+
onAcceptAll(): void;
|
|
42
|
+
onRejectAll(): void;
|
|
43
|
+
onSave(): void;
|
|
44
|
+
t(key: string): string;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CookieSettingsComponent, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CookieSettingsComponent, "val-cookie-settings", never, { "showTitle": { "alias": "showTitle"; "required": false; }; }, { "saved": "saved"; }, never, never, true, never>;
|
|
47
|
+
}
|
|
@@ -48,7 +48,7 @@ export declare class LoginComponent implements OnInit, OnDestroy {
|
|
|
48
48
|
private _mfaVerifyFormState;
|
|
49
49
|
private _mfaMethod;
|
|
50
50
|
/** Método MFA pendiente — expuesto al template para gatear el link de backup (solo TOTP). */
|
|
51
|
-
readonly mfaMethod: import("@angular/core").Signal<"
|
|
51
|
+
readonly mfaMethod: import("@angular/core").Signal<"EMAIL" | "SMS" | "TOTP">;
|
|
52
52
|
/** A: el user togglea a "código de respaldo" (8 chars alfanuméricos) cuando perdió el 2º factor. */
|
|
53
53
|
readonly mfaUseBackupCode: import("@angular/core").WritableSignal<boolean>;
|
|
54
54
|
isMFAResetModalOpen: boolean;
|
|
@@ -203,6 +203,12 @@ export declare class AnalyticsService {
|
|
|
203
203
|
* Obtiene el estado actual de consentimiento.
|
|
204
204
|
*/
|
|
205
205
|
getConsentState(): ConsentState;
|
|
206
|
+
/**
|
|
207
|
+
* Establece el consent default ANTES de que Firebase/gtag inicialice.
|
|
208
|
+
* Requerido por Google Consent Mode v2 para no recolectar datos hasta
|
|
209
|
+
* que el usuario tome una decision explicita.
|
|
210
|
+
*/
|
|
211
|
+
private setConsentModeDefault;
|
|
206
212
|
/**
|
|
207
213
|
* Aplica consent settings a gtag (GA4 Consent Mode v2)
|
|
208
214
|
*/
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -218,6 +218,7 @@ export * from './lib/components/organisms/request-modal/request-modal.component'
|
|
|
218
218
|
export * from './lib/components/organisms/fun-modal/types';
|
|
219
219
|
export * from './lib/components/organisms/cookie-banner/cookie-banner.component';
|
|
220
220
|
export * from './lib/components/organisms/cookie-banner/types';
|
|
221
|
+
export * from './lib/components/organisms/cookie-settings/cookie-settings.component';
|
|
221
222
|
export * from './lib/components/organisms/debug-console/config';
|
|
222
223
|
export * from './lib/components/organisms/debug-console/debug-console.component';
|
|
223
224
|
export * from './lib/components/organisms/debug-console/types';
|