valtech-components 4.0.999 → 4.0.1001

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.
@@ -90,9 +90,7 @@ export declare class ArticleComponent implements OnInit, AfterViewInit {
90
90
  actionType?: import("valtech-components").ActionType;
91
91
  expand?: "full" | "block";
92
92
  link?: string;
93
- href?: string; /**
94
- * Obtiene los estilos de padding para el contenedor article
95
- */
93
+ href?: string;
96
94
  routerLink?: string | any[];
97
95
  target?: "_blank" | "_self" | "_parent" | "_top";
98
96
  download?: string;
@@ -2,6 +2,7 @@ import { DoCheck, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } f
2
2
  import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
3
  import { EmojiRatingMetadata } from '../../atoms/emoji-rating/types';
4
4
  import { DatePickerMetadata } from '../../molecules/date-picker/types';
5
+ import { NumberPickerMetadata } from '../../molecules/number-picker/types';
5
6
  import { TextareaInputMetadata } from '../../molecules/textarea-input/types';
6
7
  import { UsernameInputMetadata } from '../../molecules/username-input/types';
7
8
  import { AttachmentItem } from '../attachment-uploader/types';
@@ -47,6 +48,7 @@ export declare class FormComponent implements OnInit, OnChanges, DoCheck {
47
48
  private textInputPropMemo;
48
49
  private datePickerPropMemo;
49
50
  private emojiRatingPropMemo;
51
+ private numberPickerPropMemo;
50
52
  private fieldIdMemo;
51
53
  private fieldUid;
52
54
  private previousState;
@@ -132,6 +134,7 @@ export declare class FormComponent implements OnInit, OnChanges, DoCheck {
132
134
  */
133
135
  getDatePickerProp(field: InputMetadata): DatePickerMetadata;
134
136
  getEmojiRatingProp(field: InputMetadata): EmojiRatingMetadata;
137
+ getNumberPickerProp(field: InputMetadata): NumberPickerMetadata;
135
138
  setBooleanValue(fieldName: string, value: boolean): void;
136
139
  orderedOptions(field: InputMetadata): import("../../types").InputOption[];
137
140
  isSimpleMultiSelected(fieldName: string, optionId: string): boolean;
@@ -46,6 +46,9 @@ export declare class SurveyBuilderComponent implements OnInit {
46
46
  readonly editingId: import("@angular/core").WritableSignal<string>;
47
47
  readonly validationError: import("@angular/core").WritableSignal<string>;
48
48
  readonly saving: import("@angular/core").WritableSignal<boolean>;
49
+ readonly uploadingImage: import("@angular/core").WritableSignal<"" | "success" | "header">;
50
+ private readonly allowedImageTypes;
51
+ private readonly maxImageBytes;
49
52
  constructor();
50
53
  ngOnInit(): Promise<void>;
51
54
  t(key: string): string;
@@ -69,6 +72,8 @@ export declare class SurveyBuilderComponent implements OnInit {
69
72
  */
70
73
  draftQuestion(field: EditableFieldDef): void;
71
74
  applyQuestion(field: EditableFieldDef): void;
75
+ onPresentationFileSelected(slot: 'header' | 'success', event: Event): Promise<void>;
76
+ clearPresentationImage(slot: 'header' | 'success'): void;
72
77
  save(): Promise<void>;
73
78
  private hydrate;
74
79
  private presentationPayload;
@@ -46,6 +46,11 @@ export interface SurveyBuilderMetadata {
46
46
  allowAnonymous?: boolean;
47
47
  /** Acota el catálogo de `SURVEY_QUESTION_TYPES` si una app quiere ofrecer menos. */
48
48
  questionTypes?: string[];
49
+ /**
50
+ * Sube imágenes de presentación y devuelve la URL pública. Si no se pasa, el
51
+ * builder conserva solo el campo URL para consumidores sin Storage propio.
52
+ */
53
+ presentationImageUpload?: (slot: 'header' | 'success', file: File) => Promise<string>;
49
54
  /**
50
55
  * Si el builder guarda por su cuenta contra `/v2/request-types`.
51
56
  *
@@ -72,7 +72,9 @@ export declare enum InputType {
72
72
  * cuando las etiquetas son cortas y la pantalla es un teléfono: los radios se
73
73
  * apilan en vertical y su objetivo táctil es el círculo, no la etiqueta.
74
74
  */
75
- CHIP_SELECT = 27
75
+ CHIP_SELECT = 27,
76
+ /** Selector numérico con controles -/+ (`val-number-picker`). */
77
+ NUMBER_PICKER = 28
76
78
  }
77
79
  /**
78
80
  * Option for select, radio, etc. inputs.
@@ -141,6 +143,18 @@ export type InputMetadata = {
141
143
  min: number;
142
144
  max: number;
143
145
  };
146
+ /** Incremento para NUMBER_PICKER. Default 1. */
147
+ step?: number;
148
+ /** Unidad visible para NUMBER_PICKER, por ejemplo kg, cm, años. */
149
+ unitLabel?: string;
150
+ /** Variante visual para NUMBER_PICKER. Default field-stepper. */
151
+ numberPickerVariant?: 'wheel' | 'field-stepper' | 'compact-stepper';
152
+ /** Permite escribir manualmente en NUMBER_PICKER. Default true. */
153
+ numberPickerEditable?: boolean;
154
+ /** Modo de teclado para NUMBER_PICKER. Default numeric. */
155
+ numberPickerInputMode?: 'numeric' | 'decimal';
156
+ /** Decimales para NUMBER_PICKER. Default 0. */
157
+ precision?: number;
144
158
  /** Custom error messages */
145
159
  errors: {
146
160
  [key: string]: string;
@@ -37,6 +37,18 @@ export interface FieldSchemaDef {
37
37
  /** e.g. 'required', 'email', 'maxLength:500', 'minLength:3' */
38
38
  validators?: string[];
39
39
  options?: FieldOption[];
40
+ /** Incremento para campos NUMBER_PICKER. */
41
+ step?: number;
42
+ /** Unidad visible para campos NUMBER_PICKER. */
43
+ unitLabel?: string;
44
+ /** Variante visual para campos NUMBER_PICKER. */
45
+ numberPickerVariant?: 'wheel' | 'field-stepper' | 'compact-stepper';
46
+ /** Permite escribir manualmente en NUMBER_PICKER. */
47
+ numberPickerEditable?: boolean;
48
+ /** Modo de teclado para NUMBER_PICKER. */
49
+ numberPickerInputMode?: 'numeric' | 'decimal';
50
+ /** Decimales para NUMBER_PICKER. */
51
+ precision?: number;
40
52
  order: number;
41
53
  /** Initial value injected by consumers when rendering a configured form. */
42
54
  value?: any;
package/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "4.0.999";
5
+ export declare const VERSION = "4.0.1001";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.999",
3
+ "version": "4.0.1001",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"