valtech-components 2.0.864 → 2.0.866
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/molecules/pin-input/pin-input.component.mjs +4 -2
- package/esm2022/lib/services/auth/storage.service.mjs +28 -4
- package/esm2022/lib/services/auth/sync.service.mjs +13 -7
- package/esm2022/lib/services/firebase/analytics.service.mjs +6 -3
- package/esm2022/lib/services/firebase/config.mjs +15 -10
- package/esm2022/lib/services/i18n/config.mjs +11 -4
- package/esm2022/lib/services/i18n/i18n.service.mjs +20 -8
- package/esm2022/lib/services/local-storage.service.mjs +16 -6
- package/esm2022/lib/services/locale.service.mjs +15 -6
- package/esm2022/lib/services/theme.service.mjs +22 -11
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +131 -48
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/services/auth/storage.service.d.ts +2 -1
- package/lib/services/auth/sync.service.d.ts +3 -1
- package/lib/services/i18n/i18n.service.d.ts +2 -1
- package/lib/services/local-storage.service.d.ts +5 -5
- package/lib/services/locale.service.d.ts +3 -1
- package/lib/services/theme.service.d.ts +2 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,8 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
export declare class AuthStorageService {
|
|
7
7
|
private config;
|
|
8
8
|
private keys;
|
|
9
|
-
|
|
9
|
+
private readonly isBrowser;
|
|
10
|
+
constructor(config: ValtechAuthConfig, platformId: Object);
|
|
10
11
|
/**
|
|
11
12
|
* Guarda el estado completo de autenticación.
|
|
12
13
|
*/
|
|
@@ -14,9 +14,11 @@ export declare class AuthSyncService implements OnDestroy {
|
|
|
14
14
|
private storageListener;
|
|
15
15
|
/** Observable de eventos de sincronización */
|
|
16
16
|
readonly onEvent$: Observable<AuthSyncEvent>;
|
|
17
|
-
|
|
17
|
+
private readonly isBrowser;
|
|
18
|
+
constructor(config: ValtechAuthConfig, platformId: Object);
|
|
18
19
|
/**
|
|
19
20
|
* Inicia la sincronización entre pestañas.
|
|
21
|
+
* SSR-noop — sync de pestañas solo aplica en browser.
|
|
20
22
|
*/
|
|
21
23
|
start(): void;
|
|
22
24
|
/**
|
|
@@ -30,7 +30,8 @@ export declare class I18nService {
|
|
|
30
30
|
readonly supportedLanguages: import("@angular/core").Signal<I18nLang[]>;
|
|
31
31
|
readonly isSpanish: import("@angular/core").Signal<boolean>;
|
|
32
32
|
readonly isEnglish: import("@angular/core").Signal<boolean>;
|
|
33
|
-
|
|
33
|
+
private readonly isBrowser;
|
|
34
|
+
constructor(platformId: Object);
|
|
34
35
|
/**
|
|
35
36
|
* Obtiene texto traducido (alias corto de getText)
|
|
36
37
|
*
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utility service for interacting with browser localStorage in a type-safe way.
|
|
3
3
|
* Provides static methods for setting, getting, removing, and clearing items.
|
|
4
|
+
*
|
|
5
|
+
* SSR-safe: en Node (prerender) `localStorage` no existe — los métodos son no-ops
|
|
6
|
+
* en server. `get` retorna `null` casteado a `T`, igual que cuando la key no
|
|
7
|
+
* existe en browser.
|
|
4
8
|
*/
|
|
5
9
|
export declare class LocalStorageService {
|
|
10
|
+
private static get available();
|
|
6
11
|
/**
|
|
7
12
|
* Stores a value in localStorage under the given reference key.
|
|
8
|
-
* @param reference The key to store the value under
|
|
9
|
-
* @param value The value to store
|
|
10
13
|
*/
|
|
11
14
|
static set<T>(reference: string, value: T): void;
|
|
12
15
|
/**
|
|
13
16
|
* Retrieves a value from localStorage by key.
|
|
14
|
-
* @param reference The key to retrieve
|
|
15
|
-
* @returns The parsed value
|
|
16
17
|
*/
|
|
17
18
|
static get<T>(reference: string): T;
|
|
18
19
|
/**
|
|
19
20
|
* Removes an item from localStorage by key.
|
|
20
|
-
* @param reference The key to remove
|
|
21
21
|
*/
|
|
22
22
|
static remove(reference: string): void;
|
|
23
23
|
/**
|
|
@@ -26,7 +26,8 @@ export declare class LocaleService {
|
|
|
26
26
|
* Se lee una vez al iniciar desde localStorage.
|
|
27
27
|
*/
|
|
28
28
|
readonly lang: SupportedLang;
|
|
29
|
-
|
|
29
|
+
private readonly isBrowser;
|
|
30
|
+
constructor(platformId: Object);
|
|
30
31
|
/**
|
|
31
32
|
* Cambia el idioma de la aplicación.
|
|
32
33
|
* Guarda en localStorage y recarga la página para aplicar el cambio.
|
|
@@ -37,6 +38,7 @@ export declare class LocaleService {
|
|
|
37
38
|
/**
|
|
38
39
|
* Obtiene el idioma almacenado en localStorage.
|
|
39
40
|
* Si no existe o no es válido, retorna el idioma por defecto.
|
|
41
|
+
* En SSR (sin localStorage) retorna el default.
|
|
40
42
|
*/
|
|
41
43
|
private getStoredLang;
|
|
42
44
|
/**
|
|
@@ -38,7 +38,8 @@ export declare class ThemeService {
|
|
|
38
38
|
* Observable for the current theme.
|
|
39
39
|
*/
|
|
40
40
|
theme: BehaviorSubject<ThemeOption>;
|
|
41
|
-
|
|
41
|
+
private readonly isBrowser;
|
|
42
|
+
constructor(platformId: Object);
|
|
42
43
|
private handleAutoConfiguration;
|
|
43
44
|
private handleDarkPreference;
|
|
44
45
|
private handleLightPreference;
|
package/lib/version.d.ts
CHANGED