valtech-components 4.0.122 → 4.0.124
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/language-selector/language-selector.component.mjs +7 -4
- package/esm2022/lib/components/molecules/language-selector-v2/language-selector-v2.component.mjs +166 -0
- package/esm2022/lib/components/organisms/toolbar/toolbar.component.mjs +6 -6
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/valtech-components.mjs +175 -10
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/language-selector-v2/language-selector-v2.component.d.ts +50 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { I18nLang } from '../../../services/i18n';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Props de `val-language-selector-v2`. Subset de `LanguageSelectorMetadata` —
|
|
6
|
+
* compatible con lo que pasa el toolbar / company-footer.
|
|
7
|
+
*/
|
|
8
|
+
export interface LanguageSelectorV2Metadata {
|
|
9
|
+
/** Códigos de idioma a mostrar. Default: `i18n.supportedLanguages()`. */
|
|
10
|
+
availableLanguages?: string[];
|
|
11
|
+
/** Mostrar banderas (default: true). */
|
|
12
|
+
showFlags?: boolean;
|
|
13
|
+
/** Nombres custom por código de idioma. */
|
|
14
|
+
customLanguageNames?: Record<string, string>;
|
|
15
|
+
/** Forzar reload de la app al cambiar idioma. */
|
|
16
|
+
forceReload?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* `val-language-selector-v2`
|
|
20
|
+
*
|
|
21
|
+
* Selector de idioma con markup y estilos 100% propios (sin ion-button /
|
|
22
|
+
* popover-selector). Nace para tener control total del borde, que en
|
|
23
|
+
* `val-language-selector` se renderizaba con forma "pill" imposible de
|
|
24
|
+
* sobreescribir desde fuera.
|
|
25
|
+
*
|
|
26
|
+
* - Borde neutro (`--ion-color-dark`, adaptable light/dark) por defecto.
|
|
27
|
+
* - Borde `--ion-color-primary` cuando está abierto/enfocado (activo).
|
|
28
|
+
* - Dropdown propio con click-outside, banderas, nombre y check del activo.
|
|
29
|
+
*
|
|
30
|
+
* Hermano de `val-language-selector` (este NO lo reemplaza; coexisten).
|
|
31
|
+
*/
|
|
32
|
+
export declare class LanguageSelectorV2Component implements OnInit {
|
|
33
|
+
props: LanguageSelectorV2Metadata;
|
|
34
|
+
/** Emite el código de idioma seleccionado. */
|
|
35
|
+
languageChange: EventEmitter<string>;
|
|
36
|
+
private i18n;
|
|
37
|
+
private host;
|
|
38
|
+
readonly open: import("@angular/core").WritableSignal<boolean>;
|
|
39
|
+
/** Idioma actual — reactivo al signal de i18n (otro selector también lo mueve). */
|
|
40
|
+
readonly current: import("@angular/core").Signal<I18nLang>;
|
|
41
|
+
readonly languages: import("@angular/core").WritableSignal<string[]>;
|
|
42
|
+
ngOnInit(): void;
|
|
43
|
+
name(code: string): string;
|
|
44
|
+
flag(code: string): string;
|
|
45
|
+
toggle(): void;
|
|
46
|
+
select(code: string): void;
|
|
47
|
+
onDocumentClick(event: MouseEvent): void;
|
|
48
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LanguageSelectorV2Component, never>;
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LanguageSelectorV2Component, "val-language-selector-v2", never, { "props": { "alias": "props"; "required": false; }; }, { "languageChange": "languageChange"; }, never, never, true, never>;
|
|
50
|
+
}
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export * from './lib/components/molecules/file-input/file-input.component';
|
|
|
72
72
|
export * from './lib/components/molecules/file-input/types';
|
|
73
73
|
export * from './lib/components/molecules/hint/hint.component';
|
|
74
74
|
export * from './lib/components/molecules/language-selector/language-selector.component';
|
|
75
|
+
export * from './lib/components/molecules/language-selector-v2/language-selector-v2.component';
|
|
75
76
|
export * from './lib/components/molecules/language-selector/types';
|
|
76
77
|
export * from './lib/components/molecules/font-size-selector/font-size-selector.component';
|
|
77
78
|
export * from './lib/components/molecules/font-size-selector/types';
|