valtech-components 2.0.565 → 2.0.566
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/alert-box/alert-box.component.mjs +55 -13
- package/esm2022/lib/components/molecules/card/card.component.mjs +125 -82
- package/esm2022/lib/components/molecules/docs-code-example/docs-code-example.component.mjs +3 -3
- package/esm2022/lib/components/molecules/email-input/email-input.component.mjs +48 -18
- package/esm2022/lib/components/molecules/password-input/password-input.component.mjs +49 -21
- package/esm2022/lib/components/molecules/select-input/select-input.component.mjs +68 -18
- package/esm2022/lib/components/molecules/text-input/text-input.component.mjs +49 -19
- package/esm2022/lib/components/organisms/form/form.component.mjs +2 -2
- package/fesm2022/valtech-components.mjs +380 -163
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/alert-box/alert-box.component.d.ts +24 -5
- package/lib/components/molecules/card/card.component.d.ts +24 -5
- package/lib/components/molecules/email-input/email-input.component.d.ts +25 -6
- package/lib/components/molecules/password-input/password-input.component.d.ts +25 -6
- package/lib/components/molecules/select-input/select-input.component.d.ts +26 -6
- package/lib/components/molecules/text-input/text-input.component.d.ts +26 -26
- package/package.json +1 -1
|
@@ -1,12 +1,25 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { AlertBoxMetadata, ReactiveAlertBoxMetadata } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AlertBoxComponent implements OnInit {
|
|
4
|
+
export declare class AlertBoxComponent implements OnInit, OnChanges {
|
|
5
|
+
private presets;
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
+
* Preset name to apply. Presets define reusable alert configurations
|
|
8
|
+
* (color, icon, box style) that can be registered at app level.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <val-alert-box preset="warning" [props]="{ text: 'Warning message' }"></val-alert-box>
|
|
12
|
+
*/
|
|
13
|
+
preset?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Alert box configuration object. Values here override preset values.
|
|
7
16
|
* Supports both legacy AlertBoxMetadata and ReactiveAlertBoxMetadata patterns.
|
|
8
17
|
*/
|
|
9
|
-
props: AlertBoxMetadata | ReactiveAlertBoxMetadata
|
|
18
|
+
props: Partial<AlertBoxMetadata | ReactiveAlertBoxMetadata>;
|
|
19
|
+
/**
|
|
20
|
+
* Resolved props after merging preset + explicit props.
|
|
21
|
+
*/
|
|
22
|
+
resolvedProps: AlertBoxMetadata | ReactiveAlertBoxMetadata;
|
|
10
23
|
/** Computed text properties for reactive pattern */
|
|
11
24
|
computedTextProps: any;
|
|
12
25
|
/** Whether this is using the legacy props pattern */
|
|
@@ -14,7 +27,13 @@ export declare class AlertBoxComponent implements OnInit {
|
|
|
14
27
|
/** Get text props for legacy pattern */
|
|
15
28
|
getLegacyTextProps(): any;
|
|
16
29
|
ngOnInit(): void;
|
|
30
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
31
|
+
/**
|
|
32
|
+
* Merge preset configuration with explicit props.
|
|
33
|
+
* Explicit props take precedence over preset values.
|
|
34
|
+
*/
|
|
35
|
+
private resolveProps;
|
|
17
36
|
private initializeTextProps;
|
|
18
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<AlertBoxComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AlertBoxComponent, "val-alert-box", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AlertBoxComponent, "val-alert-box", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
20
39
|
}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { ToolbarActionType } from '../../types';
|
|
3
3
|
import { CardClickEvent, CardMetadata, CardSection, CardType } from './types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class CardComponent implements OnInit {
|
|
5
|
+
export declare class CardComponent implements OnInit, OnChanges {
|
|
6
|
+
private presets;
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* Preset name to apply. Presets define reusable card configurations
|
|
9
|
+
* (type, variant, padding, etc.) that can be registered at app level.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <val-card preset="feature" [props]="{ title: 'My Card' }"></val-card>
|
|
13
|
+
*/
|
|
14
|
+
preset?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Card configuration object. Values here override preset values.
|
|
8
17
|
* @type {CardMetadata}
|
|
9
18
|
* @property type - The card type (see CardType).
|
|
10
19
|
* @property title - The card title.
|
|
@@ -14,7 +23,11 @@ export declare class CardComponent implements OnInit {
|
|
|
14
23
|
* @property sections - Custom card sections (optional).
|
|
15
24
|
* @property overtitle - Subtitle or overtitle (optional).
|
|
16
25
|
*/
|
|
17
|
-
props: CardMetadata
|
|
26
|
+
props: Partial<CardMetadata>;
|
|
27
|
+
/**
|
|
28
|
+
* Resolved props after merging preset + explicit props.
|
|
29
|
+
*/
|
|
30
|
+
resolvedProps: CardMetadata;
|
|
18
31
|
/**
|
|
19
32
|
* Event emitted when the card or an action is clicked.
|
|
20
33
|
*/
|
|
@@ -24,7 +37,13 @@ export declare class CardComponent implements OnInit {
|
|
|
24
37
|
sections: typeof CardSection;
|
|
25
38
|
constructor();
|
|
26
39
|
ngOnInit(): void;
|
|
40
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
41
|
+
/**
|
|
42
|
+
* Merge preset configuration with explicit props.
|
|
43
|
+
* Explicit props take precedence over preset values.
|
|
44
|
+
*/
|
|
45
|
+
private resolveProps;
|
|
27
46
|
clickHandler(section: CardSection, token?: string): void;
|
|
28
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<CardComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "val-card", never, { "props": { "alias": "props"; "required": false; }; }, { "onClick": "onClick"; }, never, never, true, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "val-card", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, { "onClick": "onClick"; }, never, never, true, never>;
|
|
30
49
|
}
|
|
@@ -1,15 +1,34 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { InputMetadata } from '../../types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class EmailInputComponent implements OnInit {
|
|
4
|
+
export declare class EmailInputComponent implements OnInit, OnChanges {
|
|
5
|
+
private presets;
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
+
* Preset name to apply. Presets define reusable input configurations
|
|
8
|
+
* that can be registered at app level via provideValtechPresets().
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <val-email-input preset="form-field" [props]="{ control: ctrl }"></val-email-input>
|
|
12
|
+
*/
|
|
13
|
+
preset?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Input configuration object. Values here override preset values.
|
|
7
16
|
* @type {InputMetadata}
|
|
8
17
|
* @property control - The Angular FormControl for the input.
|
|
9
|
-
* @property placeholder - The placeholder text.
|
|
18
|
+
* @property placeholder - The placeholder text.
|
|
19
|
+
*/
|
|
20
|
+
props: Partial<InputMetadata>;
|
|
21
|
+
/**
|
|
22
|
+
* Resolved props after merging preset + explicit props.
|
|
10
23
|
*/
|
|
11
|
-
|
|
24
|
+
resolvedProps: InputMetadata;
|
|
12
25
|
ngOnInit(): void;
|
|
26
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
27
|
+
/**
|
|
28
|
+
* Merge preset configuration with explicit props.
|
|
29
|
+
* Explicit props take precedence over preset values.
|
|
30
|
+
*/
|
|
31
|
+
private resolveProps;
|
|
13
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<EmailInputComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EmailInputComponent, "val-email-input", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EmailInputComponent, "val-email-input", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
15
34
|
}
|
|
@@ -1,18 +1,37 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { IconService } from '../../../services/icons.service';
|
|
3
3
|
import { InputMetadata } from '../../types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class PasswordInputComponent implements OnInit {
|
|
5
|
+
export declare class PasswordInputComponent implements OnInit, OnChanges {
|
|
6
|
+
private presets;
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
+
* Preset name to apply. Presets define reusable input configurations
|
|
9
|
+
* that can be registered at app level via provideValtechPresets().
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <val-password-input preset="login" [props]="{ control: ctrl }"></val-password-input>
|
|
13
|
+
*/
|
|
14
|
+
preset?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Input configuration object. Values here override preset values.
|
|
8
17
|
* @type {InputMetadata}
|
|
9
18
|
* @property control - The Angular FormControl for the input.
|
|
10
|
-
* @property placeholder - The placeholder text.
|
|
19
|
+
* @property placeholder - The placeholder text.
|
|
20
|
+
*/
|
|
21
|
+
props: Partial<InputMetadata>;
|
|
22
|
+
/**
|
|
23
|
+
* Resolved props after merging preset + explicit props.
|
|
11
24
|
*/
|
|
12
|
-
|
|
25
|
+
resolvedProps: InputMetadata;
|
|
13
26
|
hidePassword: boolean;
|
|
14
27
|
constructor(icon: IconService);
|
|
15
28
|
ngOnInit(): void;
|
|
29
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
30
|
+
/**
|
|
31
|
+
* Merge preset configuration with explicit props.
|
|
32
|
+
* Explicit props take precedence over preset values.
|
|
33
|
+
*/
|
|
34
|
+
private resolveProps;
|
|
16
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordInputComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordInputComponent, "val-password-input", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordInputComponent, "val-password-input", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
18
37
|
}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { InputMetadata } from '../../types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SearchSelectorComponent implements OnInit {
|
|
4
|
+
export declare class SearchSelectorComponent implements OnInit, OnChanges {
|
|
5
|
+
private i18n;
|
|
6
|
+
private presets;
|
|
7
|
+
/**
|
|
8
|
+
* Preset name to apply. Presets define reusable input configurations
|
|
9
|
+
* that can be registered at app level via provideValtechPresets().
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <val-select-input preset="form-field" [props]="{ control: ctrl, options: opts }"></val-select-input>
|
|
13
|
+
*/
|
|
14
|
+
preset?: string;
|
|
5
15
|
/**
|
|
6
|
-
* Input configuration object.
|
|
16
|
+
* Input configuration object. Values here override preset values.
|
|
7
17
|
* @type {InputMetadata}
|
|
8
18
|
* @property control - The Angular FormControl for the select input.
|
|
9
19
|
* @property label - The label for the select.
|
|
@@ -13,8 +23,11 @@ export declare class SearchSelectorComponent implements OnInit {
|
|
|
13
23
|
* @property cancelText - Custom cancel button text (default: 'Cancelar').
|
|
14
24
|
* @property okText - Custom OK button text (default: 'Aceptar').
|
|
15
25
|
*/
|
|
16
|
-
props: InputMetadata
|
|
17
|
-
|
|
26
|
+
props: Partial<InputMetadata>;
|
|
27
|
+
/**
|
|
28
|
+
* Resolved props after merging preset + explicit props.
|
|
29
|
+
*/
|
|
30
|
+
resolvedProps: InputMetadata;
|
|
18
31
|
customModalOptions: {
|
|
19
32
|
header: string;
|
|
20
33
|
breakpoints: number[];
|
|
@@ -23,6 +36,13 @@ export declare class SearchSelectorComponent implements OnInit {
|
|
|
23
36
|
cancelText: string;
|
|
24
37
|
okText: string;
|
|
25
38
|
ngOnInit(): void;
|
|
39
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
40
|
+
/**
|
|
41
|
+
* Merge preset configuration with explicit props.
|
|
42
|
+
* Explicit props take precedence over preset values.
|
|
43
|
+
*/
|
|
44
|
+
private resolveProps;
|
|
45
|
+
private setupComponent;
|
|
26
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<SearchSelectorComponent, never>;
|
|
27
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SearchSelectorComponent, "val-select-input", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchSelectorComponent, "val-select-input", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
28
48
|
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { InputMetadata } from '../../types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TextInputComponent implements OnInit {
|
|
4
|
+
export declare class TextInputComponent implements OnInit, OnChanges {
|
|
5
|
+
private presets;
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
+
* Preset name to apply. Presets define reusable input configurations
|
|
8
|
+
* (size, fill, labelPosition, etc.) that can be registered at app level.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <val-text-input preset="form-field" [props]="{ control: ctrl }"></val-text-input>
|
|
12
|
+
*/
|
|
13
|
+
preset?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Input configuration object. Values here override preset values.
|
|
7
16
|
* @type {InputMetadata}
|
|
8
17
|
* @property control - The Angular FormControl for the input.
|
|
9
|
-
* @property placeholder - The placeholder text.
|
|
18
|
+
* @property placeholder - The placeholder text.
|
|
10
19
|
* @property label, name, hint, type, validators, etc. - See InputMetadata for all options.
|
|
11
20
|
*/
|
|
12
|
-
props: InputMetadata
|
|
21
|
+
props: Partial<InputMetadata>;
|
|
22
|
+
/**
|
|
23
|
+
* Resolved props after merging preset + explicit props.
|
|
24
|
+
* Preset values are overridden by explicit props.
|
|
25
|
+
*/
|
|
26
|
+
resolvedProps: InputMetadata;
|
|
13
27
|
states: {
|
|
14
28
|
ENABLED: "ENABLED";
|
|
15
29
|
DISABLED: "DISABLED";
|
|
16
30
|
WORKING: "WORKING";
|
|
17
|
-
/**
|
|
18
|
-
* val-text-input
|
|
19
|
-
*
|
|
20
|
-
* A text input field integrated with Angular forms.
|
|
21
|
-
* For i18n support, pass the translated placeholder text via props.
|
|
22
|
-
*
|
|
23
|
-
* @example Static placeholder:
|
|
24
|
-
* <val-text-input [props]="{ control: myControl, placeholder: 'Enter text' }"></val-text-input>
|
|
25
|
-
*
|
|
26
|
-
* @example With i18n:
|
|
27
|
-
* ```typescript
|
|
28
|
-
* // In component
|
|
29
|
-
* textProps = {
|
|
30
|
-
* control: this.textControl,
|
|
31
|
-
* placeholder: this.langService.getText('MyComponent', 'namePlaceholder')
|
|
32
|
-
* };
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @input props: InputMetadata - Configuration for the input (form control, placeholder, label, etc.)
|
|
36
|
-
*/
|
|
37
31
|
ERROR: "ERROR";
|
|
38
32
|
};
|
|
39
33
|
ngOnInit(): void;
|
|
34
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
35
|
+
/**
|
|
36
|
+
* Merge preset configuration with explicit props.
|
|
37
|
+
* Explicit props take precedence over preset values.
|
|
38
|
+
*/
|
|
39
|
+
private resolveProps;
|
|
40
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextInputComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "val-text-input", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "val-text-input", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
|
|
42
42
|
}
|