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
|
@@ -70,7 +70,7 @@ import fixWebmDuration from 'fix-webm-duration';
|
|
|
70
70
|
* Current version of valtech-components.
|
|
71
71
|
* This is automatically updated during the publish process.
|
|
72
72
|
*/
|
|
73
|
-
const VERSION = '4.0.
|
|
73
|
+
const VERSION = '4.0.998';
|
|
74
74
|
|
|
75
75
|
function evaluateValtechAccess(rule, context, features = {}, visitedFeatures = new Set()) {
|
|
76
76
|
if (rule == null)
|
|
@@ -39255,6 +39255,7 @@ class FormSchemaBuilderService {
|
|
|
39255
39255
|
DATE: InputType.DATE,
|
|
39256
39256
|
SELECT: InputType.SELECT,
|
|
39257
39257
|
MULTI_SELECT: InputType.MULTI_SELECT,
|
|
39258
|
+
MULTI_SELECT_SIMPLE: InputType.MULTI_SELECT_SIMPLE,
|
|
39258
39259
|
RADIO: InputType.RADIO,
|
|
39259
39260
|
TOGGLE: InputType.TOGGLE,
|
|
39260
39261
|
CHECK: InputType.CHECK,
|
|
@@ -39455,6 +39456,17 @@ class SurveyResponseComponent {
|
|
|
39455
39456
|
this.i18n.lang();
|
|
39456
39457
|
return { variant: 'empty', title: this.t('sentTitle'), description: this.t('sentBody') };
|
|
39457
39458
|
});
|
|
39459
|
+
this.successPresentation = computed(() => {
|
|
39460
|
+
const cfg = this.typeConfig();
|
|
39461
|
+
if (!cfg?.presentation)
|
|
39462
|
+
return null;
|
|
39463
|
+
const title = cfg.presentation.successTitle?.trim() || this.t('sentTitle');
|
|
39464
|
+
const message = cfg.presentation.successMessage?.trim() || this.t('sentBody');
|
|
39465
|
+
const imageUrl = cfg.presentation.successImageUrl?.trim() || '';
|
|
39466
|
+
if (!cfg.presentation.successTitle && !cfg.presentation.successMessage && !imageUrl)
|
|
39467
|
+
return null;
|
|
39468
|
+
return { title, message, imageUrl };
|
|
39469
|
+
});
|
|
39458
39470
|
this.loadErrorState = computed(() => {
|
|
39459
39471
|
this.i18n.lang();
|
|
39460
39472
|
return { variant: 'error', title: this.t('loadErrorTitle'), description: this.t('loadErrorBody') };
|
|
@@ -39658,13 +39670,28 @@ class SurveyResponseComponent {
|
|
|
39658
39670
|
} @else if (alreadyAnswered()) {
|
|
39659
39671
|
<val-empty-state [props]="alreadyAnsweredState()" />
|
|
39660
39672
|
} @else if (sent()) {
|
|
39661
|
-
|
|
39673
|
+
@if (successPresentation(); as success) {
|
|
39674
|
+
<section class="survey-response survey-response__success" aria-live="polite">
|
|
39675
|
+
@if (success.imageUrl) {
|
|
39676
|
+
<img class="survey-response__success-image" [src]="success.imageUrl" [alt]="success.title" />
|
|
39677
|
+
}
|
|
39678
|
+
<val-display [props]="{ content: success.title, size: 'small', color: 'dark' }" />
|
|
39679
|
+
@if (success.message) {
|
|
39680
|
+
<val-title [props]="{ content: success.message, size: 'large', color: '', bold: false }" />
|
|
39681
|
+
}
|
|
39682
|
+
</section>
|
|
39683
|
+
} @else {
|
|
39684
|
+
<val-empty-state [props]="sentState()" />
|
|
39685
|
+
}
|
|
39662
39686
|
} @else {
|
|
39663
39687
|
@if (typeConfig(); as cfg) {
|
|
39664
39688
|
@if (!canRespond()) {
|
|
39665
39689
|
<val-empty-state [props]="loginRequiredState()" />
|
|
39666
39690
|
} @else {
|
|
39667
39691
|
<div class="survey-response">
|
|
39692
|
+
@if (cfg.presentation?.headerImageUrl) {
|
|
39693
|
+
<img class="survey-response__header-image" [src]="cfg.presentation?.headerImageUrl" [alt]="cfg.label" />
|
|
39694
|
+
}
|
|
39668
39695
|
<val-display [props]="{ content: cfg.label, size: 'small', color: 'dark' }" />
|
|
39669
39696
|
@if (cfg.subtitle) {
|
|
39670
39697
|
<val-title [props]="{ content: cfg.subtitle, size: 'large', color: '', bold: false }" />
|
|
@@ -39695,7 +39722,7 @@ class SurveyResponseComponent {
|
|
|
39695
39722
|
}
|
|
39696
39723
|
}
|
|
39697
39724
|
}
|
|
39698
|
-
`, isInline: true, styles: [":host{display:block}.survey-response{display:flex;flex-direction:column;gap:16px}.survey-response__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}.survey-response__hint{display:block;margin-top:4px;font-size:.8125rem;color:var(--ion-color-medium, #92949c)}.survey-response__loading{min-height:120px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: DisplayComponent, selector: "val-display", inputs: ["props"] }, { kind: "component", type: TitleComponent, selector: "val-title", inputs: ["props"] }, { kind: "component", type: TextInputComponent, selector: "val-text-input", inputs: ["preset", "props"] }, { kind: "component", type: EmptyStateComponent, selector: "val-empty-state", inputs: ["props"] }, { kind: "component", type: FormComponent, selector: "val-form", inputs: ["props"], outputs: ["onSubmit", "onValueChange", "onInvalid", "onSelectChange"] }] }); }
|
|
39725
|
+
`, isInline: true, styles: [":host{display:block}.survey-response{display:flex;flex-direction:column;gap:16px}.survey-response__header-image,.survey-response__success-image{display:block;width:100%;max-height:220px;object-fit:contain;border-radius:var(--val-radius-md, 12px)}.survey-response__success{align-items:center;text-align:center}.survey-response__success-image{max-width:320px}.survey-response__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}.survey-response__hint{display:block;margin-top:4px;font-size:.8125rem;color:var(--ion-color-medium, #92949c)}.survey-response__loading{min-height:120px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: DisplayComponent, selector: "val-display", inputs: ["props"] }, { kind: "component", type: TitleComponent, selector: "val-title", inputs: ["props"] }, { kind: "component", type: TextInputComponent, selector: "val-text-input", inputs: ["preset", "props"] }, { kind: "component", type: EmptyStateComponent, selector: "val-empty-state", inputs: ["props"] }, { kind: "component", type: FormComponent, selector: "val-form", inputs: ["props"], outputs: ["onSubmit", "onValueChange", "onInvalid", "onSelectChange"] }] }); }
|
|
39699
39726
|
}
|
|
39700
39727
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SurveyResponseComponent, decorators: [{
|
|
39701
39728
|
type: Component,
|
|
@@ -39723,13 +39750,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
39723
39750
|
} @else if (alreadyAnswered()) {
|
|
39724
39751
|
<val-empty-state [props]="alreadyAnsweredState()" />
|
|
39725
39752
|
} @else if (sent()) {
|
|
39726
|
-
|
|
39753
|
+
@if (successPresentation(); as success) {
|
|
39754
|
+
<section class="survey-response survey-response__success" aria-live="polite">
|
|
39755
|
+
@if (success.imageUrl) {
|
|
39756
|
+
<img class="survey-response__success-image" [src]="success.imageUrl" [alt]="success.title" />
|
|
39757
|
+
}
|
|
39758
|
+
<val-display [props]="{ content: success.title, size: 'small', color: 'dark' }" />
|
|
39759
|
+
@if (success.message) {
|
|
39760
|
+
<val-title [props]="{ content: success.message, size: 'large', color: '', bold: false }" />
|
|
39761
|
+
}
|
|
39762
|
+
</section>
|
|
39763
|
+
} @else {
|
|
39764
|
+
<val-empty-state [props]="sentState()" />
|
|
39765
|
+
}
|
|
39727
39766
|
} @else {
|
|
39728
39767
|
@if (typeConfig(); as cfg) {
|
|
39729
39768
|
@if (!canRespond()) {
|
|
39730
39769
|
<val-empty-state [props]="loginRequiredState()" />
|
|
39731
39770
|
} @else {
|
|
39732
39771
|
<div class="survey-response">
|
|
39772
|
+
@if (cfg.presentation?.headerImageUrl) {
|
|
39773
|
+
<img class="survey-response__header-image" [src]="cfg.presentation?.headerImageUrl" [alt]="cfg.label" />
|
|
39774
|
+
}
|
|
39733
39775
|
<val-display [props]="{ content: cfg.label, size: 'small', color: 'dark' }" />
|
|
39734
39776
|
@if (cfg.subtitle) {
|
|
39735
39777
|
<val-title [props]="{ content: cfg.subtitle, size: 'large', color: '', bold: false }" />
|
|
@@ -39760,7 +39802,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
39760
39802
|
}
|
|
39761
39803
|
}
|
|
39762
39804
|
}
|
|
39763
|
-
`, styles: [":host{display:block}.survey-response{display:flex;flex-direction:column;gap:16px}.survey-response__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}.survey-response__hint{display:block;margin-top:4px;font-size:.8125rem;color:var(--ion-color-medium, #92949c)}.survey-response__loading{min-height:120px}\n"] }]
|
|
39805
|
+
`, styles: [":host{display:block}.survey-response{display:flex;flex-direction:column;gap:16px}.survey-response__header-image,.survey-response__success-image{display:block;width:100%;max-height:220px;object-fit:contain;border-radius:var(--val-radius-md, 12px)}.survey-response__success{align-items:center;text-align:center}.survey-response__success-image{max-width:320px}.survey-response__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}.survey-response__hint{display:block;margin-top:4px;font-size:.8125rem;color:var(--ion-color-medium, #92949c)}.survey-response__loading{min-height:120px}\n"] }]
|
|
39764
39806
|
}], ctorParameters: () => [], propDecorators: { props: [{
|
|
39765
39807
|
type: Input
|
|
39766
39808
|
}], submitted: [{
|
|
@@ -40615,6 +40657,15 @@ const SURVEY_BUILDER_I18N = {
|
|
|
40615
40657
|
titlePlaceholder: 'Ej: ¿Qué te pareció el evento?',
|
|
40616
40658
|
subtitleLabel: 'Subtítulo',
|
|
40617
40659
|
subtitlePlaceholder: 'Ej: Ayúdanos a mejorar respondiendo estas preguntas',
|
|
40660
|
+
presentationLabel: 'Presentación',
|
|
40661
|
+
headerImageLabel: 'Imagen inicial',
|
|
40662
|
+
headerImagePlaceholder: 'URL de la imagen que abre la encuesta',
|
|
40663
|
+
successTitleLabel: 'Título de agradecimiento',
|
|
40664
|
+
successTitlePlaceholder: 'Ej: Gracias por responder',
|
|
40665
|
+
successMessageLabel: 'Mensaje de agradecimiento',
|
|
40666
|
+
successMessagePlaceholder: 'Ej: Tu respuesta quedó registrada',
|
|
40667
|
+
successImageLabel: 'Imagen de cierre',
|
|
40668
|
+
successImagePlaceholder: 'URL de la imagen que se muestra al terminar',
|
|
40618
40669
|
questionsLabel: 'Preguntas',
|
|
40619
40670
|
questionLabelPlaceholder: 'Escribe la pregunta',
|
|
40620
40671
|
addQuestion: 'Agregar pregunta',
|
|
@@ -40639,6 +40690,15 @@ const SURVEY_BUILDER_I18N = {
|
|
|
40639
40690
|
titlePlaceholder: 'E.g: How was the event?',
|
|
40640
40691
|
subtitleLabel: 'Subtitle',
|
|
40641
40692
|
subtitlePlaceholder: 'E.g: Help us improve by answering these questions',
|
|
40693
|
+
presentationLabel: 'Presentation',
|
|
40694
|
+
headerImageLabel: 'Opening image',
|
|
40695
|
+
headerImagePlaceholder: 'Image URL shown at the start of the survey',
|
|
40696
|
+
successTitleLabel: 'Thank-you title',
|
|
40697
|
+
successTitlePlaceholder: 'E.g: Thanks for answering',
|
|
40698
|
+
successMessageLabel: 'Thank-you message',
|
|
40699
|
+
successMessagePlaceholder: 'E.g: Your response was recorded',
|
|
40700
|
+
successImageLabel: 'Closing image',
|
|
40701
|
+
successImagePlaceholder: 'Image URL shown after submit',
|
|
40642
40702
|
questionsLabel: 'Questions',
|
|
40643
40703
|
questionLabelPlaceholder: 'Write the question',
|
|
40644
40704
|
addQuestion: 'Add question',
|
|
@@ -40698,6 +40758,10 @@ class SurveyBuilderComponent {
|
|
|
40698
40758
|
this.errors = inject(ValtechErrorService);
|
|
40699
40759
|
this.titleControl = new FormControl('', { nonNullable: true });
|
|
40700
40760
|
this.subtitleControl = new FormControl('', { nonNullable: true });
|
|
40761
|
+
this.headerImageControl = new FormControl('', { nonNullable: true });
|
|
40762
|
+
this.successTitleControl = new FormControl('', { nonNullable: true });
|
|
40763
|
+
this.successMessageControl = new FormControl('', { nonNullable: true });
|
|
40764
|
+
this.successImageControl = new FormControl('', { nonNullable: true });
|
|
40701
40765
|
this.questions = signal([]);
|
|
40702
40766
|
this.editingId = signal('');
|
|
40703
40767
|
this.validationError = signal('');
|
|
@@ -40715,14 +40779,14 @@ class SurveyBuilderComponent {
|
|
|
40715
40779
|
async ngOnInit() {
|
|
40716
40780
|
// Sembrado directo: la app ya tenía la encuesta, no hace falta leerla.
|
|
40717
40781
|
if (this.props.initial) {
|
|
40718
|
-
this.hydrate(this.props.initial.label, this.props.initial.subtitle, this.props.initial.questions);
|
|
40782
|
+
this.hydrate(this.props.initial.label, this.props.initial.subtitle, this.props.initial.questions, this.props.initial.presentation);
|
|
40719
40783
|
return;
|
|
40720
40784
|
}
|
|
40721
40785
|
if (!this.props.typeId)
|
|
40722
40786
|
return;
|
|
40723
40787
|
try {
|
|
40724
40788
|
const cfg = await firstValueFrom(this.requests.getRequestType(this.props.typeId));
|
|
40725
|
-
this.hydrate(cfg.label, cfg.subtitle ?? '', cfg.fieldSchema);
|
|
40789
|
+
this.hydrate(cfg.label, cfg.subtitle ?? '', cfg.fieldSchema, cfg.presentation);
|
|
40726
40790
|
}
|
|
40727
40791
|
catch (err) {
|
|
40728
40792
|
this.errors.handle(err, {
|
|
@@ -40870,9 +40934,10 @@ class SurveyBuilderComponent {
|
|
|
40870
40934
|
}, index));
|
|
40871
40935
|
});
|
|
40872
40936
|
const subtitle = this.subtitleControl.value.trim();
|
|
40937
|
+
const presentation = this.presentationPayload();
|
|
40873
40938
|
// La app guarda: acá solo se valida y se entrega lo escrito.
|
|
40874
40939
|
if (this.props.persist === false) {
|
|
40875
|
-
this.draft.emit({ label: title, subtitle, questions: fieldSchema });
|
|
40940
|
+
this.draft.emit({ label: title, subtitle, presentation, questions: fieldSchema });
|
|
40876
40941
|
return;
|
|
40877
40942
|
}
|
|
40878
40943
|
this.saving.set(true);
|
|
@@ -40885,6 +40950,7 @@ class SurveyBuilderComponent {
|
|
|
40885
40950
|
const payload = {
|
|
40886
40951
|
label: title,
|
|
40887
40952
|
subtitle,
|
|
40953
|
+
presentation,
|
|
40888
40954
|
entityRef: this.props.entityRef,
|
|
40889
40955
|
skipReview: true,
|
|
40890
40956
|
skipSubmitterIdentity: true,
|
|
@@ -40909,11 +40975,24 @@ class SurveyBuilderComponent {
|
|
|
40909
40975
|
});
|
|
40910
40976
|
}
|
|
40911
40977
|
}
|
|
40912
|
-
hydrate(label, subtitle, questions) {
|
|
40978
|
+
hydrate(label, subtitle, questions, presentation) {
|
|
40913
40979
|
this.titleControl.setValue(label ?? '');
|
|
40914
40980
|
this.subtitleControl.setValue(subtitle ?? '');
|
|
40981
|
+
this.headerImageControl.setValue(presentation?.headerImageUrl ?? '');
|
|
40982
|
+
this.successTitleControl.setValue(presentation?.successTitle ?? '');
|
|
40983
|
+
this.successMessageControl.setValue(presentation?.successMessage ?? '');
|
|
40984
|
+
this.successImageControl.setValue(presentation?.successImageUrl ?? '');
|
|
40915
40985
|
this.questions.set([...(questions ?? [])].sort((a, b) => a.order - b.order).map(f => this.rowFromField(f)));
|
|
40916
40986
|
}
|
|
40987
|
+
presentationPayload() {
|
|
40988
|
+
const presentation = {
|
|
40989
|
+
headerImageUrl: this.headerImageControl.value.trim(),
|
|
40990
|
+
successTitle: this.successTitleControl.value.trim(),
|
|
40991
|
+
successMessage: this.successMessageControl.value.trim(),
|
|
40992
|
+
successImageUrl: this.successImageControl.value.trim(),
|
|
40993
|
+
};
|
|
40994
|
+
return Object.values(presentation).some(Boolean) ? presentation : undefined;
|
|
40995
|
+
}
|
|
40917
40996
|
rowFromField(f) {
|
|
40918
40997
|
return {
|
|
40919
40998
|
id: `row-${rowUid++}`,
|
|
@@ -40936,6 +41015,22 @@ class SurveyBuilderComponent {
|
|
|
40936
41015
|
<val-text-input [props]="{ control: subtitleControl, placeholder: t('subtitlePlaceholder') }" />
|
|
40937
41016
|
</val-form-field>
|
|
40938
41017
|
|
|
41018
|
+
<div class="survey-builder__presentation">
|
|
41019
|
+
<span class="survey-builder__questions-label">{{ t('presentationLabel') }}</span>
|
|
41020
|
+
<val-form-field [label]="t('headerImageLabel')">
|
|
41021
|
+
<val-text-input [props]="{ control: headerImageControl, placeholder: t('headerImagePlaceholder') }" />
|
|
41022
|
+
</val-form-field>
|
|
41023
|
+
<val-form-field [label]="t('successTitleLabel')">
|
|
41024
|
+
<val-text-input [props]="{ control: successTitleControl, placeholder: t('successTitlePlaceholder') }" />
|
|
41025
|
+
</val-form-field>
|
|
41026
|
+
<val-form-field [label]="t('successMessageLabel')">
|
|
41027
|
+
<val-text-input [props]="{ control: successMessageControl, placeholder: t('successMessagePlaceholder') }" />
|
|
41028
|
+
</val-form-field>
|
|
41029
|
+
<val-form-field [label]="t('successImageLabel')">
|
|
41030
|
+
<val-text-input [props]="{ control: successImageControl, placeholder: t('successImagePlaceholder') }" />
|
|
41031
|
+
</val-form-field>
|
|
41032
|
+
</div>
|
|
41033
|
+
|
|
40939
41034
|
<div class="survey-builder__questions">
|
|
40940
41035
|
<span class="survey-builder__questions-label">{{ t('questionsLabel') }}</span>
|
|
40941
41036
|
|
|
@@ -41035,7 +41130,7 @@ class SurveyBuilderComponent {
|
|
|
41035
41130
|
(onClick)="save()"
|
|
41036
41131
|
/>
|
|
41037
41132
|
</div>
|
|
41038
|
-
`, isInline: true, styles: [":host{display:block}.survey-builder{display:flex;flex-direction:column;gap:16px}.survey-builder__questions{display:flex;flex-direction:column;gap:12px}.survey-builder__questions-label{font-size:.8125rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ion-color-medium, #92949c)}.survey-builder__empty{margin:0;font-size:.875rem;color:var(--ion-color-medium, #92949c)}.survey-builder__row{display:flex;flex-direction:column;gap:12px;padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__row-head{display:flex;flex-direction:column;gap:8px}.survey-builder__row-text{display:flex;flex-direction:column;gap:2px;min-width:0}.survey-builder__row-text strong{color:var(--ion-text-color, #000);font-size:.9375rem}.survey-builder__row-text span{color:var(--ion-color-medium, #92949c);font-size:.8125rem}.survey-builder__row-actions{display:flex;gap:4px;flex-wrap:wrap}.survey-builder__row-editor{display:flex;flex-direction:column;gap:12px;padding-top:12px;border-top:1px solid var(--ion-border-color, rgba(0, 0, 0, .1))}.survey-builder__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}@media (min-width: 576px){.survey-builder__row-head{flex-direction:row;align-items:flex-start;justify-content:space-between}.survey-builder__row-text{flex:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: TextInputComponent, selector: "val-text-input", inputs: ["preset", "props"] }, { kind: "component", type: ButtonComponent, selector: "val-button", inputs: ["preset", "props"], outputs: ["onClick"] }, { kind: "component", type: FormFieldComponent, selector: "val-form-field", inputs: ["label"] }, { kind: "component", type: FieldSchemaEditorComponent, selector: "val-field-schema-editor", inputs: ["props"], outputs: ["save", "changed"] }] }); }
|
|
41133
|
+
`, isInline: true, styles: [":host{display:block}.survey-builder{display:flex;flex-direction:column;gap:16px}.survey-builder__questions{display:flex;flex-direction:column;gap:12px}.survey-builder__presentation{display:flex;flex-direction:column;gap:12px;padding-top:4px}.survey-builder__questions-label{font-size:.8125rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ion-color-medium, #92949c)}.survey-builder__empty{margin:0;font-size:.875rem;color:var(--ion-color-medium, #92949c)}.survey-builder__row{display:flex;flex-direction:column;gap:12px;padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__row-head{display:flex;flex-direction:column;gap:8px}.survey-builder__row-text{display:flex;flex-direction:column;gap:2px;min-width:0}.survey-builder__row-text strong{color:var(--ion-text-color, #000);font-size:.9375rem}.survey-builder__row-text span{color:var(--ion-color-medium, #92949c);font-size:.8125rem}.survey-builder__row-actions{display:flex;gap:4px;flex-wrap:wrap}.survey-builder__row-editor{display:flex;flex-direction:column;gap:12px;padding-top:12px;border-top:1px solid var(--ion-border-color, rgba(0, 0, 0, .1))}.survey-builder__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}@media (min-width: 576px){.survey-builder__row-head{flex-direction:row;align-items:flex-start;justify-content:space-between}.survey-builder__row-text{flex:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: TextInputComponent, selector: "val-text-input", inputs: ["preset", "props"] }, { kind: "component", type: ButtonComponent, selector: "val-button", inputs: ["preset", "props"], outputs: ["onClick"] }, { kind: "component", type: FormFieldComponent, selector: "val-form-field", inputs: ["label"] }, { kind: "component", type: FieldSchemaEditorComponent, selector: "val-field-schema-editor", inputs: ["props"], outputs: ["save", "changed"] }] }); }
|
|
41039
41134
|
}
|
|
41040
41135
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SurveyBuilderComponent, decorators: [{
|
|
41041
41136
|
type: Component,
|
|
@@ -41055,6 +41150,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
41055
41150
|
<val-text-input [props]="{ control: subtitleControl, placeholder: t('subtitlePlaceholder') }" />
|
|
41056
41151
|
</val-form-field>
|
|
41057
41152
|
|
|
41153
|
+
<div class="survey-builder__presentation">
|
|
41154
|
+
<span class="survey-builder__questions-label">{{ t('presentationLabel') }}</span>
|
|
41155
|
+
<val-form-field [label]="t('headerImageLabel')">
|
|
41156
|
+
<val-text-input [props]="{ control: headerImageControl, placeholder: t('headerImagePlaceholder') }" />
|
|
41157
|
+
</val-form-field>
|
|
41158
|
+
<val-form-field [label]="t('successTitleLabel')">
|
|
41159
|
+
<val-text-input [props]="{ control: successTitleControl, placeholder: t('successTitlePlaceholder') }" />
|
|
41160
|
+
</val-form-field>
|
|
41161
|
+
<val-form-field [label]="t('successMessageLabel')">
|
|
41162
|
+
<val-text-input [props]="{ control: successMessageControl, placeholder: t('successMessagePlaceholder') }" />
|
|
41163
|
+
</val-form-field>
|
|
41164
|
+
<val-form-field [label]="t('successImageLabel')">
|
|
41165
|
+
<val-text-input [props]="{ control: successImageControl, placeholder: t('successImagePlaceholder') }" />
|
|
41166
|
+
</val-form-field>
|
|
41167
|
+
</div>
|
|
41168
|
+
|
|
41058
41169
|
<div class="survey-builder__questions">
|
|
41059
41170
|
<span class="survey-builder__questions-label">{{ t('questionsLabel') }}</span>
|
|
41060
41171
|
|
|
@@ -41154,7 +41265,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
41154
41265
|
(onClick)="save()"
|
|
41155
41266
|
/>
|
|
41156
41267
|
</div>
|
|
41157
|
-
`, styles: [":host{display:block}.survey-builder{display:flex;flex-direction:column;gap:16px}.survey-builder__questions{display:flex;flex-direction:column;gap:12px}.survey-builder__questions-label{font-size:.8125rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ion-color-medium, #92949c)}.survey-builder__empty{margin:0;font-size:.875rem;color:var(--ion-color-medium, #92949c)}.survey-builder__row{display:flex;flex-direction:column;gap:12px;padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__row-head{display:flex;flex-direction:column;gap:8px}.survey-builder__row-text{display:flex;flex-direction:column;gap:2px;min-width:0}.survey-builder__row-text strong{color:var(--ion-text-color, #000);font-size:.9375rem}.survey-builder__row-text span{color:var(--ion-color-medium, #92949c);font-size:.8125rem}.survey-builder__row-actions{display:flex;gap:4px;flex-wrap:wrap}.survey-builder__row-editor{display:flex;flex-direction:column;gap:12px;padding-top:12px;border-top:1px solid var(--ion-border-color, rgba(0, 0, 0, .1))}.survey-builder__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}@media (min-width: 576px){.survey-builder__row-head{flex-direction:row;align-items:flex-start;justify-content:space-between}.survey-builder__row-text{flex:1}}\n"] }]
|
|
41268
|
+
`, styles: [":host{display:block}.survey-builder{display:flex;flex-direction:column;gap:16px}.survey-builder__questions{display:flex;flex-direction:column;gap:12px}.survey-builder__presentation{display:flex;flex-direction:column;gap:12px;padding-top:4px}.survey-builder__questions-label{font-size:.8125rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ion-color-medium, #92949c)}.survey-builder__empty{margin:0;font-size:.875rem;color:var(--ion-color-medium, #92949c)}.survey-builder__row{display:flex;flex-direction:column;gap:12px;padding:12px;border:1px solid var(--ion-border-color, rgba(0, 0, 0, .1));border-radius:var(--val-radius-md, 12px);background:var(--ion-card-background, var(--ion-background-color, #fff))}.survey-builder__row-head{display:flex;flex-direction:column;gap:8px}.survey-builder__row-text{display:flex;flex-direction:column;gap:2px;min-width:0}.survey-builder__row-text strong{color:var(--ion-text-color, #000);font-size:.9375rem}.survey-builder__row-text span{color:var(--ion-color-medium, #92949c);font-size:.8125rem}.survey-builder__row-actions{display:flex;gap:4px;flex-wrap:wrap}.survey-builder__row-editor{display:flex;flex-direction:column;gap:12px;padding-top:12px;border-top:1px solid var(--ion-border-color, rgba(0, 0, 0, .1))}.survey-builder__error{margin:0;color:var(--ion-color-danger);font-size:.875rem;font-weight:700}@media (min-width: 576px){.survey-builder__row-head{flex-direction:row;align-items:flex-start;justify-content:space-between}.survey-builder__row-text{flex:1}}\n"] }]
|
|
41158
41269
|
}], ctorParameters: () => [], propDecorators: { props: [{
|
|
41159
41270
|
type: Input
|
|
41160
41271
|
}], saved: [{
|