valtech-components 4.0.1020 → 4.0.1022

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.
Files changed (29) hide show
  1. package/esm2022/lib/components/molecules/date-input/date-input.component.mjs +3 -3
  2. package/esm2022/lib/components/molecules/file-input/file-input.component.mjs +3 -3
  3. package/esm2022/lib/components/molecules/hint/hint.component.mjs +3 -3
  4. package/esm2022/lib/components/molecules/password-input/password-input.component.mjs +3 -3
  5. package/esm2022/lib/components/molecules/pin-input/pin-input.component.mjs +3 -3
  6. package/esm2022/lib/components/molecules/text-input/text-input.component.mjs +3 -3
  7. package/esm2022/lib/components/organisms/field-schema-editor/field-schema-editor.component.mjs +18 -1
  8. package/esm2022/lib/components/organisms/field-schema-editor/field-schema-editor.i18n.mjs +5 -3
  9. package/esm2022/lib/components/organisms/field-schema-editor/types.mjs +1 -1
  10. package/esm2022/lib/components/organisms/form/form.component.mjs +32 -5
  11. package/esm2022/lib/components/organisms/survey-builder/survey-builder.component.mjs +64 -39
  12. package/esm2022/lib/components/organisms/survey-builder/survey-builder.i18n.mjs +3 -1
  13. package/esm2022/lib/components/organisms/survey-response/survey-response.component.mjs +5 -6
  14. package/esm2022/lib/components/types.mjs +1 -1
  15. package/esm2022/lib/services/forms/form-schema-builder.service.mjs +3 -1
  16. package/esm2022/lib/services/forms/types.mjs +1 -1
  17. package/esm2022/lib/services/i18n/default-content.mjs +3 -1
  18. package/esm2022/lib/version.mjs +2 -2
  19. package/fesm2022/valtech-components.mjs +138 -62
  20. package/fesm2022/valtech-components.mjs.map +1 -1
  21. package/lib/components/organisms/field-schema-editor/field-schema-editor.component.d.ts +1 -0
  22. package/lib/components/organisms/field-schema-editor/types.d.ts +3 -0
  23. package/lib/components/organisms/form/form.component.d.ts +1 -0
  24. package/lib/components/organisms/survey-builder/survey-builder.component.d.ts +1 -0
  25. package/lib/components/organisms/survey-response/survey-response.component.d.ts +4 -5
  26. package/lib/components/types.d.ts +3 -1
  27. package/lib/services/forms/types.d.ts +1 -0
  28. package/lib/version.d.ts +1 -1
  29. package/package.json +1 -1
@@ -45,6 +45,7 @@ export declare class FieldSchemaEditorComponent implements OnInit {
45
45
  readonly labelControl: FormControl<string>;
46
46
  readonly placeholderControl: FormControl<string>;
47
47
  readonly hintControl: FormControl<string>;
48
+ readonly noteControl: FormControl<string>;
48
49
  readonly sectionControl: FormControl<string>;
49
50
  readonly requiredControl: FormControl<boolean>;
50
51
  readonly typeControl: FormControl<string>;
@@ -18,6 +18,7 @@ export interface EditableFieldDef {
18
18
  label: string;
19
19
  placeholderText: string;
20
20
  hintText: string;
21
+ noteText?: string;
21
22
  type: string;
22
23
  required: boolean;
23
24
  sectionId?: string;
@@ -61,6 +62,8 @@ export interface FieldSchemaEditorMetadata {
61
62
  /** Default true. */
62
63
  showHint?: boolean;
63
64
  /** Default true. */
65
+ showNote?: boolean;
66
+ /** Default true. */
64
67
  showSection?: boolean;
65
68
  state?: ComponentState;
66
69
  }
@@ -144,6 +144,7 @@ export declare class FormComponent implements OnInit, OnChanges, DoCheck {
144
144
  setSimpleMultiSelected(fieldName: string, optionId: string, selected: boolean): void;
145
145
  booleanYesLabel(): string;
146
146
  booleanNoLabel(): string;
147
+ fieldHelpLabel(field: InputMetadata): string;
147
148
  /**
148
149
  * Adapter — convierte un `InputMetadata` (con type=TEXTAREA) a `TextareaInputMetadata`.
149
150
  * Defaults sensatos: autoGrow + counter habilitado, 4-12 rows.
@@ -128,6 +128,7 @@ export declare class SurveyBuilderComponent implements OnInit {
128
128
  private validateRows;
129
129
  private rowFromField;
130
130
  reviewQuestionsCount(): string;
131
+ sectionQuestionCountText(count: number): string;
131
132
  previewProps(): ButtonMetadata;
132
133
  openPreview(): Promise<void>;
133
134
  private sectionOrderFor;
@@ -21,11 +21,10 @@ import * as i0 from "@angular/core";
21
21
  * que pueden no tener cuenta). Encuestas AUTHENTICATED/ORG/INTERNAL están
22
22
  * fuera de alcance de este componente por ahora.
23
23
  *
24
- * Cada pregunta se renderiza según su `FieldSchemaDef.type`: `EMOJI_RATING`
25
- * usa `val-emoji-rating` (NUNCA pasa por `val-form`, no lo sabe rutear);
26
- * cualquier otro tipo (v1: solo `TEXTAREA`) usa `val-textarea-input`. No hay
27
- * `val-form` de por medio un FormGroup armado a mano, porque mezclar tipos
28
- * custom con el form genérico es más complicado que construir el propio.
24
+ * Cada pregunta se renderiza mediante `val-form`, que conoce el catálogo
25
+ * respondible de encuestas: texto, opciones, booleanos, fecha, rating y number
26
+ * picker. Este componente solo decide el flujo público, identidad opcional,
27
+ * pasos por sección y envío de respuestas.
29
28
  */
30
29
  export declare class SurveyResponseComponent implements OnInit {
31
30
  props: SurveyResponseMetadata;
@@ -110,8 +110,10 @@ export type InputMetadata = {
110
110
  label: string;
111
111
  /** Field name */
112
112
  name: string;
113
- /** Help text (shown below input, for validation hints) */
113
+ /** Contextual help text shown next to the field label. */
114
114
  hint: string;
115
+ /** Note shown below the input. */
116
+ note?: string;
115
117
  /** Description text (shown below label, explains the field purpose) */
116
118
  description?: string;
117
119
  /** Input placeholder */
@@ -29,6 +29,7 @@ export interface FieldSchemaDef {
29
29
  placeholderEn?: string;
30
30
  hint?: string;
31
31
  hintText?: string;
32
+ noteText?: string;
32
33
  /** @deprecated Solo lectura de esquemas viejos. */
33
34
  hintEs?: string;
34
35
  /** @deprecated Solo lectura de esquemas viejos. */
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.1020";
5
+ export declare const VERSION = "4.0.1022";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.1020",
3
+ "version": "4.0.1022",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"