valtech-components 4.0.1002 → 4.0.1004
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/organisms/survey-builder/survey-builder.component.mjs +412 -68
- package/esm2022/lib/components/organisms/survey-builder/survey-builder.i18n.mjs +25 -1
- package/esm2022/lib/components/organisms/survey-builder/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +436 -68
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/survey-builder/survey-builder.component.d.ts +15 -0
- package/lib/components/organisms/survey-builder/types.d.ts +2 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -44,9 +44,14 @@ export declare class SurveyBuilderComponent implements OnInit {
|
|
|
44
44
|
readonly successImageControl: FormControl<string>;
|
|
45
45
|
readonly questions: import("@angular/core").WritableSignal<EditableFieldDef[]>;
|
|
46
46
|
readonly editingId: import("@angular/core").WritableSignal<string>;
|
|
47
|
+
readonly wizardStep: import("@angular/core").WritableSignal<number>;
|
|
47
48
|
readonly validationError: import("@angular/core").WritableSignal<string>;
|
|
48
49
|
readonly saving: import("@angular/core").WritableSignal<boolean>;
|
|
49
50
|
readonly uploadingImage: import("@angular/core").WritableSignal<"" | "success" | "header">;
|
|
51
|
+
readonly wizardSteps: {
|
|
52
|
+
id: string;
|
|
53
|
+
labelKey: string;
|
|
54
|
+
}[];
|
|
50
55
|
private readonly allowedImageTypes;
|
|
51
56
|
private readonly maxImageBytes;
|
|
52
57
|
constructor();
|
|
@@ -54,6 +59,15 @@ export declare class SurveyBuilderComponent implements OnInit {
|
|
|
54
59
|
t(key: string): string;
|
|
55
60
|
typeLabel(type: string): string;
|
|
56
61
|
questionTypes(): string[];
|
|
62
|
+
isWizard(): boolean;
|
|
63
|
+
showWizardSection(step: number): boolean;
|
|
64
|
+
goToStep(step: number): void;
|
|
65
|
+
nextStep(): void;
|
|
66
|
+
previousStep(): void;
|
|
67
|
+
wizardBackProps(): ButtonMetadata;
|
|
68
|
+
wizardNextProps(): ButtonMetadata;
|
|
69
|
+
saveProps(): ButtonMetadata;
|
|
70
|
+
interpolate(template: string, values: Record<string, string | number>): string;
|
|
57
71
|
editorProps(row: EditableFieldDef): FieldSchemaEditorMetadata;
|
|
58
72
|
iconAction(token: string, icon: string, label: string, disabled?: boolean, color?: Color): ButtonMetadata;
|
|
59
73
|
addQuestion(): void;
|
|
@@ -77,6 +91,7 @@ export declare class SurveyBuilderComponent implements OnInit {
|
|
|
77
91
|
save(): Promise<void>;
|
|
78
92
|
private hydrate;
|
|
79
93
|
private presentationPayload;
|
|
94
|
+
private validateWizardStep;
|
|
80
95
|
private rowFromField;
|
|
81
96
|
static ɵfac: i0.ɵɵFactoryDeclaration<SurveyBuilderComponent, never>;
|
|
82
97
|
static ɵcmp: i0.ɵɵComponentDeclaration<SurveyBuilderComponent, "val-survey-builder", never, { "props": { "alias": "props"; "required": false; }; }, { "saved": "saved"; "draft": "draft"; }, never, never, true, never>;
|
|
@@ -35,6 +35,8 @@ export interface SurveyQuestionRow {
|
|
|
35
35
|
required: boolean;
|
|
36
36
|
}
|
|
37
37
|
export interface SurveyBuilderMetadata {
|
|
38
|
+
/** Default 'single'. 'wizard' separa inicio, preguntas, cierre y revisión. */
|
|
39
|
+
layout?: 'single' | 'wizard';
|
|
38
40
|
/** Si se pasa, edita ese tipo existente; si no, crea uno nuevo. */
|
|
39
41
|
typeId?: string;
|
|
40
42
|
/** Prefijo del `Type` del RequestTypeConfig — el componente arma `"<prefix>:<slug>"`. */
|
package/lib/version.d.ts
CHANGED