valtech-components 4.0.996 → 4.0.998
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 +58 -7
- package/esm2022/lib/components/organisms/survey-builder/survey-builder.i18n.mjs +19 -1
- package/esm2022/lib/components/organisms/survey-builder/types.mjs +1 -1
- package/esm2022/lib/components/organisms/survey-response/survey-response.component.mjs +46 -5
- package/esm2022/lib/services/forms/form-schema-builder.service.mjs +2 -1
- package/esm2022/lib/services/requests/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +1 -1
- package/fesm2022/valtech-components.mjs +122 -11
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/survey-builder/survey-builder.component.d.ts +5 -0
- package/lib/components/organisms/survey-builder/types.d.ts +2 -1
- package/lib/components/organisms/survey-response/survey-response.component.d.ts +5 -0
- package/lib/services/requests/types.d.ts +9 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
|
@@ -38,6 +38,10 @@ export declare class SurveyBuilderComponent implements OnInit {
|
|
|
38
38
|
private readonly errors;
|
|
39
39
|
readonly titleControl: FormControl<string>;
|
|
40
40
|
readonly subtitleControl: FormControl<string>;
|
|
41
|
+
readonly headerImageControl: FormControl<string>;
|
|
42
|
+
readonly successTitleControl: FormControl<string>;
|
|
43
|
+
readonly successMessageControl: FormControl<string>;
|
|
44
|
+
readonly successImageControl: FormControl<string>;
|
|
41
45
|
readonly questions: import("@angular/core").WritableSignal<EditableFieldDef[]>;
|
|
42
46
|
readonly editingId: import("@angular/core").WritableSignal<string>;
|
|
43
47
|
readonly validationError: import("@angular/core").WritableSignal<string>;
|
|
@@ -67,6 +71,7 @@ export declare class SurveyBuilderComponent implements OnInit {
|
|
|
67
71
|
applyQuestion(field: EditableFieldDef): void;
|
|
68
72
|
save(): Promise<void>;
|
|
69
73
|
private hydrate;
|
|
74
|
+
private presentationPayload;
|
|
70
75
|
private rowFromField;
|
|
71
76
|
static ɵfac: i0.ɵɵFactoryDeclaration<SurveyBuilderComponent, never>;
|
|
72
77
|
static ɵcmp: i0.ɵɵComponentDeclaration<SurveyBuilderComponent, "val-survey-builder", never, { "props": { "alias": "props"; "required": false; }; }, { "saved": "saved"; "draft": "draft"; }, never, never, true, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityRef, FieldSchemaDef, RequestTypeConfig, RequestVisibility } from '../../../services/requests/types';
|
|
1
|
+
import { EntityRef, FieldSchemaDef, RequestTypeConfig, RequestTypePresentation, RequestVisibility } from '../../../services/requests/types';
|
|
2
2
|
/**
|
|
3
3
|
* Tipos de pregunta que ofrece una encuesta.
|
|
4
4
|
*
|
|
@@ -85,5 +85,6 @@ export interface SurveyBuilderSaveEvent {
|
|
|
85
85
|
export interface SurveyDraftEvent {
|
|
86
86
|
label: string;
|
|
87
87
|
subtitle: string;
|
|
88
|
+
presentation?: RequestTypePresentation;
|
|
88
89
|
questions: FieldSchemaDef[];
|
|
89
90
|
}
|
|
@@ -85,6 +85,11 @@ export declare class SurveyResponseComponent implements OnInit {
|
|
|
85
85
|
private hasMissingRequiredMultiSelect;
|
|
86
86
|
readonly alreadyAnsweredState: import("@angular/core").Signal<EmptyStateMetadata>;
|
|
87
87
|
readonly sentState: import("@angular/core").Signal<EmptyStateMetadata>;
|
|
88
|
+
readonly successPresentation: import("@angular/core").Signal<{
|
|
89
|
+
title: string;
|
|
90
|
+
message: string;
|
|
91
|
+
imageUrl: string;
|
|
92
|
+
}>;
|
|
88
93
|
readonly loadErrorState: import("@angular/core").Signal<EmptyStateMetadata>;
|
|
89
94
|
readonly loginRequiredState: import("@angular/core").Signal<EmptyStateMetadata>;
|
|
90
95
|
t(key: string): string;
|
|
@@ -55,6 +55,12 @@ export interface EntityRef {
|
|
|
55
55
|
entityType: string;
|
|
56
56
|
entityId: string;
|
|
57
57
|
}
|
|
58
|
+
export interface RequestTypePresentation {
|
|
59
|
+
headerImageUrl?: string;
|
|
60
|
+
successTitle?: string;
|
|
61
|
+
successMessage?: string;
|
|
62
|
+
successImageUrl?: string;
|
|
63
|
+
}
|
|
58
64
|
/** Quién puede leer un tipo de solicitud (y sus solicitudes públicas). */
|
|
59
65
|
export type RequestVisibility = 'PUBLIC' | 'AUTHENTICATED' | 'ORG' | 'INTERNAL';
|
|
60
66
|
export interface RequestTypeConfig {
|
|
@@ -66,6 +72,7 @@ export interface RequestTypeConfig {
|
|
|
66
72
|
/** Bajada del enunciado (ej. encuestas). Label ya cubre el título. */
|
|
67
73
|
subtitle?: string;
|
|
68
74
|
entityRef?: EntityRef;
|
|
75
|
+
presentation?: RequestTypePresentation;
|
|
69
76
|
createdBy?: RequestActor;
|
|
70
77
|
/**
|
|
71
78
|
* true = cada envío se agrega, no se revisa uno por uno (ej. encuestas).
|
|
@@ -145,6 +152,7 @@ export interface CreateRequestTypePayload {
|
|
|
145
152
|
label: string;
|
|
146
153
|
subtitle?: string;
|
|
147
154
|
entityRef?: EntityRef;
|
|
155
|
+
presentation?: RequestTypePresentation;
|
|
148
156
|
skipReview?: boolean;
|
|
149
157
|
/**
|
|
150
158
|
* true = el formulario NO pide nombre ni correo a quien responde sin sesión.
|
|
@@ -161,6 +169,7 @@ export interface UpdateRequestTypePayload {
|
|
|
161
169
|
label: string;
|
|
162
170
|
subtitle?: string;
|
|
163
171
|
entityRef?: EntityRef;
|
|
172
|
+
presentation?: RequestTypePresentation;
|
|
164
173
|
skipReview?: boolean;
|
|
165
174
|
/**
|
|
166
175
|
* true = el formulario NO pide nombre ni correo a quien responde sin sesión.
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -560,7 +560,7 @@ export { ValtechErrorService, VALTECH_NETWORK_ERROR_KEY, } from './lib/services/
|
|
|
560
560
|
export { ClientTelemetryService } from './lib/services/errors/client-telemetry.service';
|
|
561
561
|
export * from './lib/services/forms';
|
|
562
562
|
export { REQUEST_STATUSES } from './lib/services/requests/types';
|
|
563
|
-
export type { AddCommentPayload, AppRequest, CreateRequestPayload, CreateRequestTypePayload, ListCommentsResponse, ListRequestsParams, ListRequestsResponse, ListRequestTypesResponse, RequestActor, RequestComment, RequestStatus, RequestTypeConfig, RequestVisibility, TransitionPayload, UpdateRequestPayload, UpdateRequestTypePayload, } from './lib/services/requests/types';
|
|
563
|
+
export type { AddCommentPayload, AppRequest, CreateRequestPayload, CreateRequestTypePayload, ListCommentsResponse, ListRequestsParams, ListRequestsResponse, ListRequestTypesResponse, RequestActor, RequestComment, RequestStatus, RequestTypeConfig, RequestTypePresentation, RequestVisibility, TransitionPayload, UpdateRequestPayload, UpdateRequestTypePayload, } from './lib/services/requests/types';
|
|
564
564
|
export * from './lib/services/requests/request.service';
|
|
565
565
|
export * from './lib/services/requests/request-form-builder.service';
|
|
566
566
|
export * from './lib/services/requests/request-firestore.service';
|