valtech-components 2.0.948 → 2.0.950
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/features-list/features-list.component.mjs +120 -47
- package/esm2022/lib/components/molecules/features-list/types.mjs +3 -1
- package/esm2022/lib/components/organisms/attachment-uploader/attachment-uploader.component.mjs +5 -5
- package/esm2022/lib/components/organisms/search-header/search-header.component.mjs +159 -0
- package/esm2022/lib/components/organisms/search-header/types.mjs +10 -0
- package/esm2022/lib/config/company-footer.config.mjs +2 -2
- package/esm2022/lib/config/site-links.config.mjs +2 -2
- package/esm2022/lib/services/org/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/valtech-components.mjs +286 -53
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/features-list/features-list.component.d.ts +34 -31
- package/lib/components/molecules/features-list/types.d.ts +34 -3
- package/lib/components/organisms/search-header/search-header.component.d.ts +54 -0
- package/lib/components/organisms/search-header/types.d.ts +31 -0
- package/lib/config/site-links.config.d.ts +1 -1
- package/lib/services/org/types.d.ts +2 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -1,46 +1,39 @@
|
|
|
1
|
-
import { FeatureItem, FeaturesListMetadata } from './types';
|
|
1
|
+
import { FeatureItem, FeaturesListFooterLink, FeaturesListMetadata } from './types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* val-features-list
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Lista de features con icono **o imagen**, título y descripción. Soporta i18n,
|
|
7
|
+
* colapso opcional ("ver más" cuando supera `maxVisible`) y un link al pie
|
|
8
|
+
* (ej. "Find out more"). Útil para listas de settings, apps, beneficios.
|
|
8
9
|
*
|
|
9
10
|
* @example
|
|
10
11
|
* ```html
|
|
11
12
|
* <val-features-list
|
|
12
13
|
* [props]="{
|
|
13
14
|
* features: [
|
|
14
|
-
* { icon: 'flash-outline', titleKey: '
|
|
15
|
-
* {
|
|
15
|
+
* { icon: 'flash-outline', titleKey: 'Rápido', descriptionKey: 'Carga al instante' },
|
|
16
|
+
* { image: '/logos/app.png', titleKey: 'Mi App', descriptionKey: 'Gestión de equipos', token: 'app' }
|
|
16
17
|
* ],
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* mode: 'vertical'
|
|
20
|
-
* }"
|
|
21
|
-
* />
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @example With custom SVG icons
|
|
25
|
-
* ```html
|
|
26
|
-
* <val-features-list
|
|
27
|
-
* [props]="{
|
|
28
|
-
* features: [
|
|
29
|
-
* {
|
|
30
|
-
* icon: 'custom',
|
|
31
|
-
* svgPath: 'M13 2L3 14h9l-1 8 10-12h-9l1-8z',
|
|
32
|
-
* titleKey: 'Fast & Secure',
|
|
33
|
-
* descriptionKey: 'Modern authentication with OAuth and MFA'
|
|
34
|
-
* }
|
|
35
|
-
* ]
|
|
18
|
+
* maxVisible: 3,
|
|
19
|
+
* footerLink: { label: 'Ver todo', routerLink: '/apps' }
|
|
36
20
|
* }"
|
|
21
|
+
* (itemClick)="open($event)"
|
|
37
22
|
* />
|
|
38
23
|
* ```
|
|
39
24
|
*/
|
|
40
25
|
export declare class FeaturesListComponent {
|
|
41
26
|
private i18n;
|
|
27
|
+
private navigation;
|
|
42
28
|
/** Component configuration */
|
|
43
29
|
readonly props: import("@angular/core").InputSignal<FeaturesListMetadata>;
|
|
30
|
+
/** Emitido al tocar un item (con su `token`). */
|
|
31
|
+
readonly itemClick: import("@angular/core").OutputEmitterRef<string>;
|
|
32
|
+
/** Emitido al tocar el footer link (con su `token`). */
|
|
33
|
+
readonly footerClick: import("@angular/core").OutputEmitterRef<string>;
|
|
34
|
+
private readonly _expanded;
|
|
35
|
+
readonly expanded: import("@angular/core").Signal<boolean>;
|
|
36
|
+
constructor();
|
|
44
37
|
/** Merged configuration with defaults */
|
|
45
38
|
config: import("@angular/core").Signal<{
|
|
46
39
|
features: FeatureItem[];
|
|
@@ -50,17 +43,27 @@ export declare class FeaturesListComponent {
|
|
|
50
43
|
mode: "horizontal" | "vertical";
|
|
51
44
|
gap: "small" | "medium" | "large";
|
|
52
45
|
alignment: "center" | "start";
|
|
46
|
+
imageShape: "circle" | "square";
|
|
47
|
+
maxVisible: number;
|
|
48
|
+
showMoreLabel?: string;
|
|
49
|
+
showLessLabel?: string;
|
|
50
|
+
footerLink?: FeaturesListFooterLink;
|
|
53
51
|
}>;
|
|
52
|
+
/** Items visibles según el estado de colapso. */
|
|
53
|
+
visibleFeatures: import("@angular/core").Signal<FeatureItem[]>;
|
|
54
|
+
/** Si hay items de sobra para colapsar/expandir. */
|
|
55
|
+
canCollapse: import("@angular/core").Signal<boolean>;
|
|
56
|
+
showMoreText: import("@angular/core").Signal<string>;
|
|
57
|
+
showLessText: import("@angular/core").Signal<string>;
|
|
54
58
|
/** Resolved icon color (handles Ionic colors and CSS colors) */
|
|
55
59
|
iconColorStyle: import("@angular/core").Signal<string>;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
toggle(): void;
|
|
61
|
+
onItem(feature: FeatureItem): void;
|
|
62
|
+
onFooter(event: MouseEvent, link: FeaturesListFooterLink): void;
|
|
63
|
+
/** Get translated title or return direct text */
|
|
59
64
|
getTitle(feature: FeatureItem): string;
|
|
60
|
-
/**
|
|
61
|
-
* Get translated description or return direct text
|
|
62
|
-
*/
|
|
65
|
+
/** Get translated description or return direct text */
|
|
63
66
|
getDescription(feature: FeatureItem): string;
|
|
64
67
|
static ɵfac: i0.ɵɵFactoryDeclaration<FeaturesListComponent, never>;
|
|
65
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FeaturesListComponent, "val-features-list", never, { "props": { "alias": "props"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FeaturesListComponent, "val-features-list", never, { "props": { "alias": "props"; "required": true; "isSignal": true; }; }, { "itemClick": "itemClick"; "footerClick": "footerClick"; }, never, never, true, never>;
|
|
66
69
|
}
|
|
@@ -2,14 +2,31 @@
|
|
|
2
2
|
* Feature item configuration
|
|
3
3
|
*/
|
|
4
4
|
export interface FeatureItem {
|
|
5
|
-
/** Ionicon name or 'custom' for SVG path */
|
|
6
|
-
icon
|
|
5
|
+
/** Ionicon name or 'custom' for SVG path. Opcional si se usa `image`. */
|
|
6
|
+
icon?: string;
|
|
7
7
|
/** SVG path data (only used when icon is 'custom') */
|
|
8
8
|
svgPath?: string;
|
|
9
|
+
/** Image URL — si se provee, reemplaza al icono (ej. logos de apps). */
|
|
10
|
+
image?: string;
|
|
9
11
|
/** Title i18n key or direct text */
|
|
10
12
|
titleKey: string;
|
|
11
13
|
/** Description i18n key or direct text */
|
|
12
14
|
descriptionKey: string;
|
|
15
|
+
/** Optional token — emitido por (itemClick) al tocar el item. */
|
|
16
|
+
token?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Footer link / CTA mostrado al pie de la lista (ej. "Find out more").
|
|
20
|
+
*/
|
|
21
|
+
export interface FeaturesListFooterLink {
|
|
22
|
+
/** Texto del link (ya resuelto por el consumer). */
|
|
23
|
+
label: string;
|
|
24
|
+
/** Ruta Angular interna. */
|
|
25
|
+
routerLink?: string | any[];
|
|
26
|
+
/** URL externa (abre en nueva pestaña). */
|
|
27
|
+
href?: string;
|
|
28
|
+
/** Token emitido por (footerClick). */
|
|
29
|
+
token?: string;
|
|
13
30
|
}
|
|
14
31
|
/**
|
|
15
32
|
* Features list component configuration
|
|
@@ -29,8 +46,22 @@ export interface FeaturesListMetadata {
|
|
|
29
46
|
gap?: 'small' | 'medium' | 'large';
|
|
30
47
|
/** Alignment of features */
|
|
31
48
|
alignment?: 'start' | 'center';
|
|
49
|
+
/** Forma de la imagen del item (cuando `feature.image`). Default 'square'. */
|
|
50
|
+
imageShape?: 'square' | 'circle';
|
|
51
|
+
/**
|
|
52
|
+
* Máximo de items visibles antes de colapsar. Si `features.length` supera
|
|
53
|
+
* este número, se muestran los primeros `maxVisible` + un botón "ver más".
|
|
54
|
+
* `0` (default) = sin colapso, muestra todos.
|
|
55
|
+
*/
|
|
56
|
+
maxVisible?: number;
|
|
57
|
+
/** Label del botón expandir. Default: i18n `FeaturesList.showMore`. */
|
|
58
|
+
showMoreLabel?: string;
|
|
59
|
+
/** Label del botón contraer. Default: i18n `FeaturesList.showLess`. */
|
|
60
|
+
showLessLabel?: string;
|
|
61
|
+
/** Link/CTA al pie de la lista (ej. "Find out more"). */
|
|
62
|
+
footerLink?: FeaturesListFooterLink;
|
|
32
63
|
}
|
|
33
64
|
/**
|
|
34
65
|
* Default values for FeaturesListMetadata
|
|
35
66
|
*/
|
|
36
|
-
export declare const FEATURES_LIST_DEFAULTS: Required<
|
|
67
|
+
export declare const FEATURES_LIST_DEFAULTS: Required<Pick<FeaturesListMetadata, 'iconColor' | 'iconSize' | 'mode' | 'gap' | 'alignment' | 'imageShape' | 'maxVisible'>>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { SearchHeaderMetadata } from './types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* `val-search-header` — header/toolbar con búsqueda desplegable.
|
|
6
|
+
*
|
|
7
|
+
* El botón de búsqueda es una ICON action del toolbar (igual que
|
|
8
|
+
* menu/avatar/notificaciones), identificada por su `token` (`searchToken`).
|
|
9
|
+
* Al presionarla se despliega un `val-searchbar` debajo del toolbar: 100% del
|
|
10
|
+
* ancho en mobile, un máximo centrado en desktop.
|
|
11
|
+
*
|
|
12
|
+
* Reusa `val-toolbar` para el header — las demás acciones se emiten por
|
|
13
|
+
* `(onAction)`. La query se emite por `(search)`.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <val-search-header
|
|
18
|
+
* [props]="{
|
|
19
|
+
* header: { toolbar: { title: 'AWS', withActions: true, withBack: false,
|
|
20
|
+
* actions: [
|
|
21
|
+
* { type: 'ICON', description: 'search-outline', token: 'search', position: 'right' },
|
|
22
|
+
* { type: 'ICON', description: 'notifications-outline', token: 'notif', position: 'right' }
|
|
23
|
+
* ] } },
|
|
24
|
+
* searchbar: { placeholder: 'Buscar...' }
|
|
25
|
+
* }"
|
|
26
|
+
* (search)="onSearch($event)"
|
|
27
|
+
* (onAction)="onAction($event)"
|
|
28
|
+
* >
|
|
29
|
+
* <ion-button slot="search-actions" fill="outline">Filter: All</ion-button>
|
|
30
|
+
* </val-search-header>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare class SearchHeaderComponent {
|
|
34
|
+
private host;
|
|
35
|
+
/** Configuración del search header. */
|
|
36
|
+
props: SearchHeaderMetadata;
|
|
37
|
+
/** Emite el token de cualquier acción del toolbar que NO sea la de búsqueda. */
|
|
38
|
+
onAction: EventEmitter<string>;
|
|
39
|
+
/** Emite la query del searchbar. */
|
|
40
|
+
search: EventEmitter<string>;
|
|
41
|
+
/** Emite al abrir/cerrar la barra de búsqueda. */
|
|
42
|
+
searchToggle: EventEmitter<boolean>;
|
|
43
|
+
/** Emite cuando el searchbar pierde el foco. */
|
|
44
|
+
blur: EventEmitter<void>;
|
|
45
|
+
private readonly _open;
|
|
46
|
+
readonly open: import("@angular/core").Signal<boolean>;
|
|
47
|
+
config: import("@angular/core").Signal<SearchHeaderMetadata & Required<Pick<SearchHeaderMetadata, "maxWidth" | "searchToken" | "startOpen" | "showClose">>>;
|
|
48
|
+
constructor();
|
|
49
|
+
handleToolbar(token?: string): void;
|
|
50
|
+
toggle(): void;
|
|
51
|
+
private focusSearchbar;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchHeaderComponent, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchHeaderComponent, "val-search-header", never, { "props": { "alias": "props"; "required": false; }; }, { "onAction": "onAction"; "search": "search"; "searchToggle": "searchToggle"; "blur": "blur"; }, never, ["[search-actions]"], true, never>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HeaderMetadata } from '../header/types';
|
|
2
|
+
import { SearchbarMetadata } from '../../molecules/searchbar/types';
|
|
3
|
+
/**
|
|
4
|
+
* Metadata for val-search-header.
|
|
5
|
+
*
|
|
6
|
+
* Header/toolbar con un botón de búsqueda que, al presionarse, despliega un
|
|
7
|
+
* `val-searchbar` colapsable debajo del toolbar (100% del ancho en mobile, un
|
|
8
|
+
* máximo centrado en desktop). El botón de búsqueda es una ICON action más del
|
|
9
|
+
* toolbar (idéntica a menu/avatar/notificaciones): se identifica por su `token`.
|
|
10
|
+
*/
|
|
11
|
+
export interface SearchHeaderMetadata {
|
|
12
|
+
/** Configuración del header + toolbar (reusa val-header/val-toolbar). */
|
|
13
|
+
header: HeaderMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* Token de la ICON action que dispara la búsqueda. La action correspondiente
|
|
16
|
+
* debe existir en `header.toolbar.actions`. Default: 'search'.
|
|
17
|
+
*/
|
|
18
|
+
searchToken?: string;
|
|
19
|
+
/** Configuración del searchbar desplegado. */
|
|
20
|
+
searchbar?: SearchbarMetadata;
|
|
21
|
+
/** Ancho máximo de la barra en desktop (CSS). Default: '720px'. */
|
|
22
|
+
maxWidth?: string;
|
|
23
|
+
/** Si arranca con la barra abierta. Default: false. */
|
|
24
|
+
startOpen?: boolean;
|
|
25
|
+
/** Mostrar botón de cierre (X) a la derecha de la barra. Default: true. */
|
|
26
|
+
showClose?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Default values for SearchHeaderMetadata.
|
|
30
|
+
*/
|
|
31
|
+
export declare const SEARCH_HEADER_DEFAULTS: Required<Pick<SearchHeaderMetadata, 'searchToken' | 'maxWidth' | 'startOpen' | 'showClose'>>;
|
|
@@ -49,7 +49,7 @@ export declare const VALTECH_SITE_PATHS: {
|
|
|
49
49
|
readonly support: "/contact";
|
|
50
50
|
readonly contact: "/contact";
|
|
51
51
|
readonly faq: "/faq";
|
|
52
|
-
readonly about: "/
|
|
52
|
+
readonly about: "/about";
|
|
53
53
|
readonly terms: "/legal/terms";
|
|
54
54
|
readonly privacy: "/legal/privacy";
|
|
55
55
|
readonly cookies: "/legal/cookies";
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -217,6 +217,8 @@ export * from './lib/components/organisms/form/form-footer/form-footer.component
|
|
|
217
217
|
export * from './lib/components/organisms/form/form.component';
|
|
218
218
|
export * from './lib/components/organisms/header/header.component';
|
|
219
219
|
export * from './lib/components/organisms/header/types';
|
|
220
|
+
export * from './lib/components/organisms/search-header/search-header.component';
|
|
221
|
+
export * from './lib/components/organisms/search-header/types';
|
|
220
222
|
export * from './lib/components/organisms/mfa-modal/mfa-modal.component';
|
|
221
223
|
export * from './lib/components/organisms/item-list/item-list.component';
|
|
222
224
|
export * from './lib/components/organisms/item-list/types';
|