valtech-components 2.0.949 → 2.0.951
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/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/fesm2022/valtech-components.mjs +125 -52
- 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/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
|
@@ -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'>>;
|
|
@@ -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