valtech-components 4.0.983 → 4.0.984

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.
@@ -33,6 +33,13 @@ export declare const FIELD_TYPES_WITH_OPTIONS: string[];
33
33
  export declare class FieldSchemaEditorComponent implements OnInit {
34
34
  props: FieldSchemaEditorMetadata;
35
35
  readonly save: EventEmitter<EditableFieldDef>;
36
+ /**
37
+ * Emite en cada tecla, sin validar. Existe porque el consumer necesita el
38
+ * borrador en vivo: si solo tuviera `save`, lo escrito acá no existiría para
39
+ * él hasta que alguien toque su botón — y lo escrito ES la intención del
40
+ * usuario, no un borrador que haya que confirmar.
41
+ */
42
+ readonly changed: EventEmitter<EditableFieldDef>;
36
43
  private readonly i18n;
37
44
  private readonly formSchemas;
38
45
  readonly labelControl: FormControl<string>;
@@ -69,6 +76,8 @@ export declare class FieldSchemaEditorComponent implements OnInit {
69
76
  state: import("../../types").ComponentState;
70
77
  options: FieldOption[];
71
78
  }>;
79
+ setOptions(options: FieldOption[]): void;
80
+ private emitChange;
72
81
  selectPreset(preset: FieldSchemaEditorPreset): void;
73
82
  /**
74
83
  * Valida y emite. Público a propósito: lo llama el consumer desde el botón
@@ -86,5 +95,5 @@ export declare class FieldSchemaEditorComponent implements OnInit {
86
95
  */
87
96
  private coerceType;
88
97
  static ɵfac: i0.ɵɵFactoryDeclaration<FieldSchemaEditorComponent, never>;
89
- static ɵcmp: i0.ɵɵComponentDeclaration<FieldSchemaEditorComponent, "val-field-schema-editor", never, { "props": { "alias": "props"; "required": false; }; }, { "save": "save"; }, never, never, true, never>;
98
+ static ɵcmp: i0.ɵɵComponentDeclaration<FieldSchemaEditorComponent, "val-field-schema-editor", never, { "props": { "alias": "props"; "required": false; }; }, { "save": "save"; "changed": "changed"; }, never, never, true, never>;
90
99
  }
@@ -47,6 +47,16 @@ export declare class SurveyBuilderComponent implements OnInit {
47
47
  removeQuestion(row: EditableFieldDef): void;
48
48
  duplicate(row: EditableFieldDef): void;
49
49
  move(index: number, delta: number): void;
50
+ /**
51
+ * Guarda lo que se está escribiendo, sin cerrar el editor ni validar.
52
+ *
53
+ * Sin esto, lo tipeado solo existía dentro del editor hasta que alguien
54
+ * tocaba "Listo": la fila seguía diciendo "Pregunta sin texto" y, peor,
55
+ * "Guardar encuesta" fallaba con "todas las preguntas necesitan texto" sobre
56
+ * una pregunta que en pantalla claramente tenía texto. Tocar "Listo" era un
57
+ * paso obligatorio que no se veía por ningún lado.
58
+ */
59
+ draftQuestion(field: EditableFieldDef): void;
50
60
  applyQuestion(field: EditableFieldDef): void;
51
61
  save(): Promise<void>;
52
62
  private rowFromField;
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.983";
5
+ export declare const VERSION = "4.0.984";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.983",
3
+ "version": "4.0.984",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"