ctt-puro 0.45.4 → 0.45.6
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/puro-events-form/puro-events-form.component.mjs +19 -10
- package/esm2022/lib/services/mapper/mapper.service.mjs +20 -5
- package/fesm2022/ctt-puro.mjs +35 -11
- package/fesm2022/ctt-puro.mjs.map +1 -1
- package/lib/components/puro-events-form/puro-events-form.component.d.ts +3 -3
- package/package.json +1 -1
package/fesm2022/ctt-puro.mjs
CHANGED
|
@@ -3025,8 +3025,8 @@ class PuroEventsFormComponent {
|
|
|
3025
3025
|
controls['conditions'] = [false, Validators.requiredTrue];
|
|
3026
3026
|
if (this.others)
|
|
3027
3027
|
controls['others'] = [false];
|
|
3028
|
-
if (this.neDropdown)
|
|
3029
|
-
|
|
3028
|
+
// if (this.neDropdown)
|
|
3029
|
+
// controls['neDropdown'] = ['', Validators.required];
|
|
3030
3030
|
if (this.othersDropdown)
|
|
3031
3031
|
controls['othersDropdown'] = ['', Validators.required];
|
|
3032
3032
|
if (this.prefix)
|
|
@@ -3051,6 +3051,11 @@ class PuroEventsFormComponent {
|
|
|
3051
3051
|
'',
|
|
3052
3052
|
this.companyNameInput.validators || [],
|
|
3053
3053
|
];
|
|
3054
|
+
if (this.typeEventInput?.name)
|
|
3055
|
+
controls[this.typeEventInput.name] = [
|
|
3056
|
+
'',
|
|
3057
|
+
this.typeEventInput.validators || [],
|
|
3058
|
+
];
|
|
3054
3059
|
if (this.emailInput)
|
|
3055
3060
|
controls['email'] = [
|
|
3056
3061
|
'',
|
|
@@ -3107,6 +3112,7 @@ class PuroEventsFormComponent {
|
|
|
3107
3112
|
this.surnameInput,
|
|
3108
3113
|
this.phoneInput,
|
|
3109
3114
|
this.companyNameInput,
|
|
3115
|
+
this.typeEventInput,
|
|
3110
3116
|
this.dateInput,
|
|
3111
3117
|
this.npInput,
|
|
3112
3118
|
this.fHourInput,
|
|
@@ -3132,10 +3138,12 @@ class PuroEventsFormComponent {
|
|
|
3132
3138
|
}
|
|
3133
3139
|
inputChange(event, input) {
|
|
3134
3140
|
const el = event.target;
|
|
3141
|
+
// SOLO limpiar teléfono si es type="tel"
|
|
3135
3142
|
if (input.type === 'tel') {
|
|
3136
|
-
el.value = el.value.replace(/[
|
|
3143
|
+
el.value = el.value.replace(/[^\d+]/g, '');
|
|
3137
3144
|
}
|
|
3138
|
-
|
|
3145
|
+
// Mantener espacios dentro del valor
|
|
3146
|
+
const value = el.value;
|
|
3139
3147
|
input.value = value;
|
|
3140
3148
|
if (input.name) {
|
|
3141
3149
|
const ctrl = this.form.get(input.name);
|
|
@@ -3161,6 +3169,7 @@ class PuroEventsFormComponent {
|
|
|
3161
3169
|
this.surnameInput,
|
|
3162
3170
|
this.phoneInput,
|
|
3163
3171
|
this.companyNameInput,
|
|
3172
|
+
this.typeEventInput,
|
|
3164
3173
|
this.dateInput,
|
|
3165
3174
|
this.npInput,
|
|
3166
3175
|
this.fHourInput,
|
|
@@ -3189,7 +3198,7 @@ class PuroEventsFormComponent {
|
|
|
3189
3198
|
};
|
|
3190
3199
|
}
|
|
3191
3200
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PuroEventsFormComponent, deps: [{ token: i1$3.FormBuilder }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3192
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: PuroEventsFormComponent, isStandalone: true, selector: "lib-puro-events-form", inputs: { title: "title", description: "description", ciTitle: "ciTitle", dTitle: "dTitle", howTitle: "howTitle", neDropdown: "neDropdown", othersDropdown: "othersDropdown", nameInput: "nameInput", surnameInput: "surnameInput", prefix: "prefix", phoneInput: "phoneInput", emailInput: "emailInput", companyNameInput: "companyNameInput", howTextarea: "howTextarea", infoTextarea: "infoTextarea", npInput: "npInput", dateInput: "dateInput", sHourInput: "sHourInput", fHourInput: "fHourInput", others: "others", requiredLabel: "requiredLabel", img: "img", conditionsLink: "conditionsLink", applyButton: "applyButton", tags: "tags", textColors: "textColors" }, outputs: { submitFormValue: "submitFormValue" }, ngImport: i0, template: "<section class=\"eventsForm generalMargin\">\n <div class=\"eventsForm__inner\">\n\n @if (title) {\n <lib-puro-dynamic-heading\n [tag]=\"tags?.title || 'span'\"\n cssClass=\"eventsForm__title corp-color\"\n [color]=\"textColors?.title\"\n [content]=\"title\"\n ></lib-puro-dynamic-heading>\n }\n\n <!-- Imagen -->\n <div class=\"eventsForm__graphic\">\n <div class=\"eventsForm__graphicInner\">\n @if (img) {\n <img\n [ngSrc]=\"img.src\"\n [alt]=\"img.alt\"\n width=\"467\"\n height=\"551\"\n class=\"eventsForm__graphicInner--img\"\n decoding=\"async\"\n />\n }\n </div>\n </div>\n\n <div class=\"eventsForm__content\">\n\n @if (title) {\n <lib-puro-dynamic-heading\n [tag]=\"tags?.title || 'span'\"\n cssClass=\"eventsForm__title corp-color\"\n [color]=\"textColors?.title\"\n [content]=\"title\"\n ></lib-puro-dynamic-heading>\n }\n\n @if (description) {\n <div class=\"eventsForm__paragraph\">{{ description }}</div>\n }\n\n @if (formReady$()) {\n\n <form [formGroup]=\"form\" class=\"form\" (ngSubmit)=\"submitForm()\" scriptLoader [dataLoaded]=\"true\">\n\n <!-- SECTION 1 -->\n <div class=\"eventsForm__section\">\n @if (ciTitle) {\n <span class=\"eventsForm__section--title\">{{ ciTitle }}</span>\n }\n\n <!-- Nombre + Apellidos -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (nameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"nameInput.placeholder\"\n [formControlName]=\"nameInput.name!\"\n (blur)=\"validateInput(nameInput)\"\n (input)=\"inputChange($event, nameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!nameInput.valid()) {\n <span class=\"form-error\">{{ nameInput.error }}</span>\n }\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (surnameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"surnameInput.placeholder\"\n [formControlName]=\"surnameInput.name!\"\n (blur)=\"validateInput(surnameInput)\"\n (input)=\"inputChange($event, surnameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!surnameInput.valid()) {\n <span class=\"form-error\">{{ surnameInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Prefijo + Tel\u00E9fono -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (prefix) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\" formControlName=\"prefix\">\n @if (prefix.placeholder) {\n <option value=\"\">\n {{ prefix.placeholder }}\n </option>\n }\n @for (item of prefix.options || []; track $index) {\n <option [value]=\"item.code\">{{ item.name }}</option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (phoneInput) {\n <div class=\"form__group withIcon\">\n <input type=\"tel\"\n class=\"form__control\"\n [placeholder]=\"phoneInput.placeholder\"\n formControlName=\"phone\"\n (blur)=\"validateInput(phoneInput)\"\n (input)=\"inputChange($event, phoneInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"17\" height=\"17\"><use href=\"#phone\"></use></svg>\n </span>\n </div>\n @if (!phoneInput.valid()) {\n <span class=\"form-error\">{{ phoneInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Email -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (emailInput) {\n <div class=\"form__group withIcon\">\n <input type=\"email\"\n class=\"form__control\"\n [placeholder]=\"emailInput.placeholder\"\n formControlName=\"email\"\n (blur)=\"validateInput(emailInput)\"\n (input)=\"inputChange($event, emailInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"17\" height=\"17\"><use href=\"#email\"></use></svg>\n </span>\n </div>\n @if (!emailInput.valid()) {\n <span class=\"form-error\">{{ emailInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Empresa -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (companyNameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"companyNameInput.placeholder\"\n [formControlName]=\"companyNameInput.name!\"\n (blur)=\"validateInput(companyNameInput)\"\n (input)=\"inputChange($event, companyNameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <i class=\"icon-99\"></i>\n </span>\n </div>\n @if (!companyNameInput.valid()) {\n <span class=\"form-error\">{{ companyNameInput.error }}</span>\n }\n }\n </div>\n </div>\n\n </div>\n\n <!-- SECTION 2 -->\n <div class=\"eventsForm__section\">\n @if (dTitle) {\n <span class=\"eventsForm__section--title\">{{ dTitle }}</span>\n }\n\n <!-- Dropdown N\u00BA personas -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (neDropdown) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\" formControlName=\"neDropdown\">\n <option value=\"\">{{ neDropdown.placeholder }}</option>\n @for (option of neDropdown.options; track $index) {\n <option [value]=\"option.code\">\n {{ option.name }}\n </option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n }\n </div>\n </div>\n\n <!-- N\u00BA personas + Fecha -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (npInput) {\n <div class=\"form__group withIcon\">\n <input type=\"number\"\n class=\"form__control\"\n [placeholder]=\"npInput.placeholder\"\n [formControlName]=\"npInput.name!\"\n (blur)=\"validateInput(npInput)\"\n (input)=\"inputChange($event, npInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!npInput.valid()) {\n <span class=\"form-error\">{{ npInput.error }}</span>\n }\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (dateInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"dateInput.placeholder\"\n [formControlName]=\"dateInput.name!\"\n />\n <span class=\"icon-right corp-color\">\n <i class=\"icon-89\"></i>\n </span>\n </div>\n @if (!dateInput.valid()) {\n <span class=\"form-error\">{{ dateInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Horas -->\n <div class=\"eventsForm__row\">\n\n <!-- Start Hour -->\n <div class=\"eventsForm__col\" style=\"position: relative\">\n @if (sHourInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control timepicker-trigger\"\n readonly\n autocomplete=\"off\"\n [placeholder]=\"sHourInput.placeholder\"\n [formControlName]=\"sHourInput.name!\"\n (click)=\"openTimepicker('sHourInput', $event)\"\n />\n <span class=\"icon-right corp-color timepicker-trigger\"\n (click)=\"openTimepicker('sHourInput', $event)\">\n <i class=\"icon-100\"></i>\n </span>\n </div>\n\n @if (!sHourInput.valid()) {\n <span class=\"form-error\">{{ sHourInput.error }}</span>\n }\n\n <ul class=\"puro-timepicker\"\n *ngIf=\"activeTimepicker === 'sHourInput'\">\n <li *ngFor=\"let h of hours\"\n (click)=\"selectHour('sHourInput', h)\">\n {{ h }}\n </li>\n </ul>\n }\n </div>\n\n <!-- End Hour -->\n <div class=\"eventsForm__col\" style=\"position: relative\">\n @if (fHourInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control timepicker-trigger\"\n readonly\n autocomplete=\"off\"\n [placeholder]=\"fHourInput.placeholder\"\n [formControlName]=\"fHourInput.name!\"\n (click)=\"openTimepicker('fHourInput', $event)\"\n />\n <span class=\"icon-right corp-color timepicker-trigger\"\n (click)=\"openTimepicker('fHourInput', $event)\">\n <i class=\"icon-100\"></i>\n </span>\n </div>\n\n @if (!fHourInput.valid()) {\n <span class=\"form-error\">{{ fHourInput.error }}</span>\n }\n\n <ul class=\"puro-timepicker\"\n *ngIf=\"activeTimepicker === 'fHourInput'\">\n <li *ngFor=\"let h of hours\"\n (click)=\"selectHour('fHourInput', h)\">\n {{ h }}\n </li>\n </ul>\n }\n </div>\n </div>\n\n <!-- Mensaje info -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (infoTextarea) {\n <div class=\"form__group no-dot\">\n <textarea class=\"form__control\"\n [placeholder]=\"infoTextarea.placeholder\"\n [formControlName]=\"infoTextarea.name!\">\n </textarea>\n </div>\n }\n </div>\n </div>\n\n </div>\n\n <!-- SECTION 3 -->\n <div class=\"eventsForm__section\">\n @if (howTitle) {\n <span class=\"eventsForm__section--title\">{{ howTitle }}</span>\n }\n\n <!-- Dropdown -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (othersDropdown) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\"\n formControlName=\"othersDropdown\">\n <option value=\"\">\n {{ othersDropdown.placeholder }}\n </option>\n @for (option of othersDropdown.options; track $index) {\n <option [value]=\"option.code\">\n {{ option.name }}\n </option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n }\n </div>\n </div>\n\n <!-- Textarea -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (howTextarea) {\n <div class=\"form__group no-dot\">\n <textarea class=\"form__control\"\n [placeholder]=\"howTextarea.placeholder\"\n [formControlName]=\"howTextarea.name!\">\n </textarea>\n </div>\n }\n </div>\n </div>\n\n <!-- Checkboxes -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n <div class=\"block-checkbox\">\n\n @if (requiredLabel) {\n <span class=\"required-label\">{{ requiredLabel }}</span>\n }\n\n @if (conditionsLink) {\n <label class=\"form__checkbox\">\n <input type=\"checkbox\"\n class=\"checkbox\"\n formControlName=\"conditions\"\n />\n <span class=\"box\">\n <svg width=\"9\" height=\"7\"><use href=\"#checkbox-tick\"></use></svg>\n </span>\n <span [innerHTML]=\"conditionsLink\"></span>\n </label>\n }\n\n @if (others) {\n <label class=\"form__checkbox\">\n <input type=\"checkbox\"\n class=\"checkbox\"\n formControlName=\"others\"\n />\n <span class=\"box\">\n <svg width=\"9\" height=\"7\"><use href=\"#checkbox-tick\"></use></svg>\n </span>\n <span>{{ others }}</span>\n </label>\n }\n\n </div>\n </div>\n </div>\n\n <!-- Bot\u00F3n -->\n <div class=\"btn__group\">\n @if (applyButton) {\n <button\n type=\"submit\"\n class=\"btn btn__primary--outline btn__events-form\"\n [attr.aria-label]=\"applyButton.label\"\n [disabled]=\"form.invalid\"\n >\n <span>{{ applyButton.label }}</span>\n </button>\n }\n </div>\n\n </div>\n </form>\n\n }\n </div>\n\n </div>\n</section>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: PuroDynamicHeadingComponent, selector: "lib-puro-dynamic-heading", inputs: ["tag", "wrapper", "cssClass", "content", "color"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "directive", type: PuroScriptDirective, selector: "[scriptLoader]", inputs: ["dataLoaded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3201
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: PuroEventsFormComponent, isStandalone: true, selector: "lib-puro-events-form", inputs: { title: "title", description: "description", ciTitle: "ciTitle", dTitle: "dTitle", howTitle: "howTitle", typeEventInput: "typeEventInput", othersDropdown: "othersDropdown", nameInput: "nameInput", surnameInput: "surnameInput", prefix: "prefix", phoneInput: "phoneInput", emailInput: "emailInput", companyNameInput: "companyNameInput", howTextarea: "howTextarea", infoTextarea: "infoTextarea", npInput: "npInput", dateInput: "dateInput", sHourInput: "sHourInput", fHourInput: "fHourInput", others: "others", requiredLabel: "requiredLabel", img: "img", conditionsLink: "conditionsLink", applyButton: "applyButton", tags: "tags", textColors: "textColors" }, outputs: { submitFormValue: "submitFormValue" }, ngImport: i0, template: "<section class=\"eventsForm generalMargin\">\n <div class=\"eventsForm__inner\">\n\n @if (title) {\n <lib-puro-dynamic-heading\n [tag]=\"tags?.title || 'span'\"\n cssClass=\"eventsForm__title corp-color\"\n [color]=\"textColors?.title\"\n [content]=\"title\"\n ></lib-puro-dynamic-heading>\n }\n\n <!-- Imagen -->\n <div class=\"eventsForm__graphic\">\n <div class=\"eventsForm__graphicInner\">\n @if (img) {\n <img\n [ngSrc]=\"img.src\"\n [alt]=\"img.alt\"\n width=\"467\"\n height=\"551\"\n class=\"eventsForm__graphicInner--img\"\n decoding=\"async\"\n />\n }\n </div>\n </div>\n\n <div class=\"eventsForm__content\">\n\n @if (title) {\n <lib-puro-dynamic-heading\n [tag]=\"tags?.title || 'span'\"\n cssClass=\"eventsForm__title corp-color\"\n [color]=\"textColors?.title\"\n [content]=\"title\"\n ></lib-puro-dynamic-heading>\n }\n\n @if (description) {\n <div class=\"eventsForm__paragraph\">{{ description }}</div>\n }\n\n @if (formReady$()) {\n\n <form [formGroup]=\"form\" class=\"form\" (ngSubmit)=\"submitForm()\" scriptLoader [dataLoaded]=\"true\">\n\n <!-- SECTION 1 -->\n <div class=\"eventsForm__section\">\n @if (ciTitle) {\n <span class=\"eventsForm__section--title\">{{ ciTitle }}</span>\n }\n\n <!-- Nombre + Apellidos -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (nameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"nameInput.placeholder\"\n [formControlName]=\"nameInput.name!\"\n (blur)=\"validateInput(nameInput)\"\n (input)=\"inputChange($event, nameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!nameInput.valid()) {\n <span class=\"form-error\">{{ nameInput.error }}</span>\n }\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (surnameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"surnameInput.placeholder\"\n [formControlName]=\"surnameInput.name!\"\n (blur)=\"validateInput(surnameInput)\"\n (input)=\"inputChange($event, surnameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!surnameInput.valid()) {\n <span class=\"form-error\">{{ surnameInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Prefijo + Tel\u00E9fono -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (prefix) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\" formControlName=\"prefix\">\n @if (prefix.placeholder) {\n <option value=\"\">\n {{ prefix.placeholder }}\n </option>\n }\n @for (item of prefix.options || []; track $index) {\n <option [value]=\"item.code\">{{ item.name }}</option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (phoneInput) {\n <div class=\"form__group withIcon\">\n <input type=\"tel\"\n class=\"form__control\"\n [placeholder]=\"phoneInput.placeholder\"\n formControlName=\"phone\"\n (blur)=\"validateInput(phoneInput)\"\n (input)=\"inputChange($event, phoneInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"17\" height=\"17\"><use href=\"#phone\"></use></svg>\n </span>\n </div>\n @if (!phoneInput.valid()) {\n <span class=\"form-error\">{{ phoneInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Email -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (emailInput) {\n <div class=\"form__group withIcon\">\n <input type=\"email\"\n class=\"form__control\"\n [placeholder]=\"emailInput.placeholder\"\n formControlName=\"email\"\n (blur)=\"validateInput(emailInput)\"\n (input)=\"inputChange($event, emailInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"17\" height=\"17\"><use href=\"#email\"></use></svg>\n </span>\n </div>\n @if (!emailInput.valid()) {\n <span class=\"form-error\">{{ emailInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Empresa -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (companyNameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"companyNameInput.placeholder\"\n [formControlName]=\"companyNameInput.name!\"\n (blur)=\"validateInput(companyNameInput)\"\n (input)=\"inputChange($event, companyNameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <i class=\"icon-99\"></i>\n </span>\n </div>\n @if (!companyNameInput.valid()) {\n <span class=\"form-error\">{{ companyNameInput.error }}</span>\n }\n }\n </div>\n </div>\n\n </div>\n\n <!-- SECTION 2 -->\n <div class=\"eventsForm__section\">\n @if (dTitle) {\n <span class=\"eventsForm__section--title\">{{ dTitle }}</span>\n }\n\n <!-- Dropdown N\u00BA personas -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n <!-- @if (neDropdown) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\" formControlName=\"neDropdown\">\n <option value=\"\">{{ neDropdown.placeholder }}</option>\n @for (option of neDropdown.options; track $index) {\n <option [value]=\"option.code\">\n {{ option.name }}\n </option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n } -->\n @if (typeEventInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"typeEventInput.placeholder\"\n [formControlName]=\"typeEventInput.name!\"\n (blur)=\"validateInput(typeEventInput)\"\n (input)=\"inputChange($event, typeEventInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"22\" height=\"22\"><use href=\"#events-type\"></use></svg>\n </span>\n </div>\n <!-- @if (!typeEventInput.valid()) {\n <span class=\"form-error\">{{ typeEventInput.error }}</span>\n } -->\n }\n </div>\n </div>\n\n <!-- N\u00BA personas + Fecha -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (npInput) {\n <div class=\"form__group withIcon\">\n <input type=\"number\"\n class=\"form__control\"\n [placeholder]=\"npInput.placeholder\"\n [formControlName]=\"npInput.name!\"\n (blur)=\"validateInput(npInput)\"\n (input)=\"inputChange($event, npInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!npInput.valid()) {\n <span class=\"form-error\">{{ npInput.error }}</span>\n }\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (dateInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"dateInput.placeholder\"\n [formControlName]=\"dateInput.name!\"\n />\n <span class=\"icon-right corp-color\">\n <i class=\"icon-89\"></i>\n </span>\n </div>\n @if (!dateInput.valid()) {\n <span class=\"form-error\">{{ dateInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Horas -->\n <div class=\"eventsForm__row\">\n\n <!-- Start Hour -->\n <div class=\"eventsForm__col\" style=\"position: relative\">\n @if (sHourInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control timepicker-trigger\"\n readonly\n autocomplete=\"off\"\n [placeholder]=\"sHourInput.placeholder\"\n [formControlName]=\"sHourInput.name!\"\n (click)=\"openTimepicker('sHourInput', $event)\"\n />\n <span class=\"icon-right corp-color timepicker-trigger\"\n (click)=\"openTimepicker('sHourInput', $event)\">\n <i class=\"icon-100\"></i>\n </span>\n </div>\n\n @if (!sHourInput.valid()) {\n <span class=\"form-error\">{{ sHourInput.error }}</span>\n }\n\n <ul class=\"puro-timepicker\"\n *ngIf=\"activeTimepicker === 'sHourInput'\">\n <li *ngFor=\"let h of hours\"\n (click)=\"selectHour('sHourInput', h)\">\n {{ h }}\n </li>\n </ul>\n }\n </div>\n\n <!-- End Hour -->\n <div class=\"eventsForm__col\" style=\"position: relative\">\n @if (fHourInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control timepicker-trigger\"\n readonly\n autocomplete=\"off\"\n [placeholder]=\"fHourInput.placeholder\"\n [formControlName]=\"fHourInput.name!\"\n (click)=\"openTimepicker('fHourInput', $event)\"\n />\n <span class=\"icon-right corp-color timepicker-trigger\"\n (click)=\"openTimepicker('fHourInput', $event)\">\n <i class=\"icon-100\"></i>\n </span>\n </div>\n\n @if (!fHourInput.valid()) {\n <span class=\"form-error\">{{ fHourInput.error }}</span>\n }\n\n <ul class=\"puro-timepicker\"\n *ngIf=\"activeTimepicker === 'fHourInput'\">\n <li *ngFor=\"let h of hours\"\n (click)=\"selectHour('fHourInput', h)\">\n {{ h }}\n </li>\n </ul>\n }\n </div>\n </div>\n\n <!-- Mensaje info -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (infoTextarea) {\n <div class=\"form__group no-dot\">\n <textarea class=\"form__control\"\n [placeholder]=\"infoTextarea.placeholder\"\n [formControlName]=\"infoTextarea.name!\">\n </textarea>\n </div>\n }\n </div>\n </div>\n\n </div>\n\n <!-- SECTION 3 -->\n <div class=\"eventsForm__section\">\n @if (howTitle) {\n <span class=\"eventsForm__section--title\">{{ howTitle }}</span>\n }\n\n <!-- Dropdown -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (othersDropdown) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\"\n formControlName=\"othersDropdown\">\n <option value=\"\">\n {{ othersDropdown.placeholder }}\n </option>\n @for (option of othersDropdown.options; track $index) {\n <option [value]=\"option.code\">\n {{ option.name }}\n </option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n }\n </div>\n </div>\n\n <!-- Textarea -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (howTextarea) {\n <div class=\"form__group no-dot\">\n <textarea class=\"form__control\"\n [placeholder]=\"howTextarea.placeholder\"\n [formControlName]=\"howTextarea.name!\">\n </textarea>\n </div>\n }\n </div>\n </div>\n\n <!-- Checkboxes -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n <div class=\"block-checkbox\">\n\n @if (requiredLabel) {\n <span class=\"required-label\">{{ requiredLabel }}</span>\n }\n\n @if (conditionsLink) {\n <label class=\"form__checkbox\">\n <input type=\"checkbox\"\n class=\"checkbox\"\n formControlName=\"conditions\"\n />\n <span class=\"box\">\n <svg width=\"9\" height=\"7\"><use href=\"#checkbox-tick\"></use></svg>\n </span>\n <span [innerHTML]=\"conditionsLink\"></span>\n </label>\n }\n\n @if (others) {\n <label class=\"form__checkbox\">\n <input type=\"checkbox\"\n class=\"checkbox\"\n formControlName=\"others\"\n />\n <span class=\"box\">\n <svg width=\"9\" height=\"7\"><use href=\"#checkbox-tick\"></use></svg>\n </span>\n <span>{{ others }}</span>\n </label>\n }\n\n </div>\n </div>\n </div>\n\n <!-- Bot\u00F3n -->\n <div class=\"btn__group\">\n @if (applyButton) {\n <button\n type=\"submit\"\n class=\"btn btn__primary--outline btn__events-form\"\n [attr.aria-label]=\"applyButton.label\"\n [disabled]=\"form.invalid\"\n >\n <span>{{ applyButton.label }}</span>\n </button>\n }\n </div>\n\n </div>\n </form>\n\n }\n </div>\n\n </div>\n</section>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1$3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: PuroDynamicHeadingComponent, selector: "lib-puro-dynamic-heading", inputs: ["tag", "wrapper", "cssClass", "content", "color"] }, { kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "directive", type: PuroScriptDirective, selector: "[scriptLoader]", inputs: ["dataLoaded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3193
3202
|
}
|
|
3194
3203
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PuroEventsFormComponent, decorators: [{
|
|
3195
3204
|
type: Component,
|
|
@@ -3201,7 +3210,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
3201
3210
|
NgOptimizedImage,
|
|
3202
3211
|
PuroLinkTypeDirective,
|
|
3203
3212
|
PuroScriptDirective,
|
|
3204
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"eventsForm generalMargin\">\n <div class=\"eventsForm__inner\">\n\n @if (title) {\n <lib-puro-dynamic-heading\n [tag]=\"tags?.title || 'span'\"\n cssClass=\"eventsForm__title corp-color\"\n [color]=\"textColors?.title\"\n [content]=\"title\"\n ></lib-puro-dynamic-heading>\n }\n\n <!-- Imagen -->\n <div class=\"eventsForm__graphic\">\n <div class=\"eventsForm__graphicInner\">\n @if (img) {\n <img\n [ngSrc]=\"img.src\"\n [alt]=\"img.alt\"\n width=\"467\"\n height=\"551\"\n class=\"eventsForm__graphicInner--img\"\n decoding=\"async\"\n />\n }\n </div>\n </div>\n\n <div class=\"eventsForm__content\">\n\n @if (title) {\n <lib-puro-dynamic-heading\n [tag]=\"tags?.title || 'span'\"\n cssClass=\"eventsForm__title corp-color\"\n [color]=\"textColors?.title\"\n [content]=\"title\"\n ></lib-puro-dynamic-heading>\n }\n\n @if (description) {\n <div class=\"eventsForm__paragraph\">{{ description }}</div>\n }\n\n @if (formReady$()) {\n\n <form [formGroup]=\"form\" class=\"form\" (ngSubmit)=\"submitForm()\" scriptLoader [dataLoaded]=\"true\">\n\n <!-- SECTION 1 -->\n <div class=\"eventsForm__section\">\n @if (ciTitle) {\n <span class=\"eventsForm__section--title\">{{ ciTitle }}</span>\n }\n\n <!-- Nombre + Apellidos -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (nameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"nameInput.placeholder\"\n [formControlName]=\"nameInput.name!\"\n (blur)=\"validateInput(nameInput)\"\n (input)=\"inputChange($event, nameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!nameInput.valid()) {\n <span class=\"form-error\">{{ nameInput.error }}</span>\n }\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (surnameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"surnameInput.placeholder\"\n [formControlName]=\"surnameInput.name!\"\n (blur)=\"validateInput(surnameInput)\"\n (input)=\"inputChange($event, surnameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!surnameInput.valid()) {\n <span class=\"form-error\">{{ surnameInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Prefijo + Tel\u00E9fono -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (prefix) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\" formControlName=\"prefix\">\n @if (prefix.placeholder) {\n <option value=\"\">\n {{ prefix.placeholder }}\n </option>\n }\n @for (item of prefix.options || []; track $index) {\n <option [value]=\"item.code\">{{ item.name }}</option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (phoneInput) {\n <div class=\"form__group withIcon\">\n <input type=\"tel\"\n class=\"form__control\"\n [placeholder]=\"phoneInput.placeholder\"\n formControlName=\"phone\"\n (blur)=\"validateInput(phoneInput)\"\n (input)=\"inputChange($event, phoneInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"17\" height=\"17\"><use href=\"#phone\"></use></svg>\n </span>\n </div>\n @if (!phoneInput.valid()) {\n <span class=\"form-error\">{{ phoneInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Email -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (emailInput) {\n <div class=\"form__group withIcon\">\n <input type=\"email\"\n class=\"form__control\"\n [placeholder]=\"emailInput.placeholder\"\n formControlName=\"email\"\n (blur)=\"validateInput(emailInput)\"\n (input)=\"inputChange($event, emailInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"17\" height=\"17\"><use href=\"#email\"></use></svg>\n </span>\n </div>\n @if (!emailInput.valid()) {\n <span class=\"form-error\">{{ emailInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Empresa -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (companyNameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"companyNameInput.placeholder\"\n [formControlName]=\"companyNameInput.name!\"\n (blur)=\"validateInput(companyNameInput)\"\n (input)=\"inputChange($event, companyNameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <i class=\"icon-99\"></i>\n </span>\n </div>\n @if (!companyNameInput.valid()) {\n <span class=\"form-error\">{{ companyNameInput.error }}</span>\n }\n }\n </div>\n </div>\n\n </div>\n\n <!-- SECTION 2 -->\n <div class=\"eventsForm__section\">\n @if (dTitle) {\n <span class=\"eventsForm__section--title\">{{ dTitle }}</span>\n }\n\n <!-- Dropdown N\u00BA personas -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (neDropdown) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\" formControlName=\"neDropdown\">\n <option value=\"\">{{ neDropdown.placeholder }}</option>\n @for (option of neDropdown.options; track $index) {\n <option [value]=\"option.code\">\n {{ option.name }}\n </option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n }\n </div>\n </div>\n\n <!-- N\u00BA personas + Fecha -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (npInput) {\n <div class=\"form__group withIcon\">\n <input type=\"number\"\n class=\"form__control\"\n [placeholder]=\"npInput.placeholder\"\n [formControlName]=\"npInput.name!\"\n (blur)=\"validateInput(npInput)\"\n (input)=\"inputChange($event, npInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!npInput.valid()) {\n <span class=\"form-error\">{{ npInput.error }}</span>\n }\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (dateInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"dateInput.placeholder\"\n [formControlName]=\"dateInput.name!\"\n />\n <span class=\"icon-right corp-color\">\n <i class=\"icon-89\"></i>\n </span>\n </div>\n @if (!dateInput.valid()) {\n <span class=\"form-error\">{{ dateInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Horas -->\n <div class=\"eventsForm__row\">\n\n <!-- Start Hour -->\n <div class=\"eventsForm__col\" style=\"position: relative\">\n @if (sHourInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control timepicker-trigger\"\n readonly\n autocomplete=\"off\"\n [placeholder]=\"sHourInput.placeholder\"\n [formControlName]=\"sHourInput.name!\"\n (click)=\"openTimepicker('sHourInput', $event)\"\n />\n <span class=\"icon-right corp-color timepicker-trigger\"\n (click)=\"openTimepicker('sHourInput', $event)\">\n <i class=\"icon-100\"></i>\n </span>\n </div>\n\n @if (!sHourInput.valid()) {\n <span class=\"form-error\">{{ sHourInput.error }}</span>\n }\n\n <ul class=\"puro-timepicker\"\n *ngIf=\"activeTimepicker === 'sHourInput'\">\n <li *ngFor=\"let h of hours\"\n (click)=\"selectHour('sHourInput', h)\">\n {{ h }}\n </li>\n </ul>\n }\n </div>\n\n <!-- End Hour -->\n <div class=\"eventsForm__col\" style=\"position: relative\">\n @if (fHourInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control timepicker-trigger\"\n readonly\n autocomplete=\"off\"\n [placeholder]=\"fHourInput.placeholder\"\n [formControlName]=\"fHourInput.name!\"\n (click)=\"openTimepicker('fHourInput', $event)\"\n />\n <span class=\"icon-right corp-color timepicker-trigger\"\n (click)=\"openTimepicker('fHourInput', $event)\">\n <i class=\"icon-100\"></i>\n </span>\n </div>\n\n @if (!fHourInput.valid()) {\n <span class=\"form-error\">{{ fHourInput.error }}</span>\n }\n\n <ul class=\"puro-timepicker\"\n *ngIf=\"activeTimepicker === 'fHourInput'\">\n <li *ngFor=\"let h of hours\"\n (click)=\"selectHour('fHourInput', h)\">\n {{ h }}\n </li>\n </ul>\n }\n </div>\n </div>\n\n <!-- Mensaje info -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (infoTextarea) {\n <div class=\"form__group no-dot\">\n <textarea class=\"form__control\"\n [placeholder]=\"infoTextarea.placeholder\"\n [formControlName]=\"infoTextarea.name!\">\n </textarea>\n </div>\n }\n </div>\n </div>\n\n </div>\n\n <!-- SECTION 3 -->\n <div class=\"eventsForm__section\">\n @if (howTitle) {\n <span class=\"eventsForm__section--title\">{{ howTitle }}</span>\n }\n\n <!-- Dropdown -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (othersDropdown) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\"\n formControlName=\"othersDropdown\">\n <option value=\"\">\n {{ othersDropdown.placeholder }}\n </option>\n @for (option of othersDropdown.options; track $index) {\n <option [value]=\"option.code\">\n {{ option.name }}\n </option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n }\n </div>\n </div>\n\n <!-- Textarea -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (howTextarea) {\n <div class=\"form__group no-dot\">\n <textarea class=\"form__control\"\n [placeholder]=\"howTextarea.placeholder\"\n [formControlName]=\"howTextarea.name!\">\n </textarea>\n </div>\n }\n </div>\n </div>\n\n <!-- Checkboxes -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n <div class=\"block-checkbox\">\n\n @if (requiredLabel) {\n <span class=\"required-label\">{{ requiredLabel }}</span>\n }\n\n @if (conditionsLink) {\n <label class=\"form__checkbox\">\n <input type=\"checkbox\"\n class=\"checkbox\"\n formControlName=\"conditions\"\n />\n <span class=\"box\">\n <svg width=\"9\" height=\"7\"><use href=\"#checkbox-tick\"></use></svg>\n </span>\n <span [innerHTML]=\"conditionsLink\"></span>\n </label>\n }\n\n @if (others) {\n <label class=\"form__checkbox\">\n <input type=\"checkbox\"\n class=\"checkbox\"\n formControlName=\"others\"\n />\n <span class=\"box\">\n <svg width=\"9\" height=\"7\"><use href=\"#checkbox-tick\"></use></svg>\n </span>\n <span>{{ others }}</span>\n </label>\n }\n\n </div>\n </div>\n </div>\n\n <!-- Bot\u00F3n -->\n <div class=\"btn__group\">\n @if (applyButton) {\n <button\n type=\"submit\"\n class=\"btn btn__primary--outline btn__events-form\"\n [attr.aria-label]=\"applyButton.label\"\n [disabled]=\"form.invalid\"\n >\n <span>{{ applyButton.label }}</span>\n </button>\n }\n </div>\n\n </div>\n </form>\n\n }\n </div>\n\n </div>\n</section>\n" }]
|
|
3213
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"eventsForm generalMargin\">\n <div class=\"eventsForm__inner\">\n\n @if (title) {\n <lib-puro-dynamic-heading\n [tag]=\"tags?.title || 'span'\"\n cssClass=\"eventsForm__title corp-color\"\n [color]=\"textColors?.title\"\n [content]=\"title\"\n ></lib-puro-dynamic-heading>\n }\n\n <!-- Imagen -->\n <div class=\"eventsForm__graphic\">\n <div class=\"eventsForm__graphicInner\">\n @if (img) {\n <img\n [ngSrc]=\"img.src\"\n [alt]=\"img.alt\"\n width=\"467\"\n height=\"551\"\n class=\"eventsForm__graphicInner--img\"\n decoding=\"async\"\n />\n }\n </div>\n </div>\n\n <div class=\"eventsForm__content\">\n\n @if (title) {\n <lib-puro-dynamic-heading\n [tag]=\"tags?.title || 'span'\"\n cssClass=\"eventsForm__title corp-color\"\n [color]=\"textColors?.title\"\n [content]=\"title\"\n ></lib-puro-dynamic-heading>\n }\n\n @if (description) {\n <div class=\"eventsForm__paragraph\">{{ description }}</div>\n }\n\n @if (formReady$()) {\n\n <form [formGroup]=\"form\" class=\"form\" (ngSubmit)=\"submitForm()\" scriptLoader [dataLoaded]=\"true\">\n\n <!-- SECTION 1 -->\n <div class=\"eventsForm__section\">\n @if (ciTitle) {\n <span class=\"eventsForm__section--title\">{{ ciTitle }}</span>\n }\n\n <!-- Nombre + Apellidos -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (nameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"nameInput.placeholder\"\n [formControlName]=\"nameInput.name!\"\n (blur)=\"validateInput(nameInput)\"\n (input)=\"inputChange($event, nameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!nameInput.valid()) {\n <span class=\"form-error\">{{ nameInput.error }}</span>\n }\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (surnameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"surnameInput.placeholder\"\n [formControlName]=\"surnameInput.name!\"\n (blur)=\"validateInput(surnameInput)\"\n (input)=\"inputChange($event, surnameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!surnameInput.valid()) {\n <span class=\"form-error\">{{ surnameInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Prefijo + Tel\u00E9fono -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (prefix) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\" formControlName=\"prefix\">\n @if (prefix.placeholder) {\n <option value=\"\">\n {{ prefix.placeholder }}\n </option>\n }\n @for (item of prefix.options || []; track $index) {\n <option [value]=\"item.code\">{{ item.name }}</option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (phoneInput) {\n <div class=\"form__group withIcon\">\n <input type=\"tel\"\n class=\"form__control\"\n [placeholder]=\"phoneInput.placeholder\"\n formControlName=\"phone\"\n (blur)=\"validateInput(phoneInput)\"\n (input)=\"inputChange($event, phoneInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"17\" height=\"17\"><use href=\"#phone\"></use></svg>\n </span>\n </div>\n @if (!phoneInput.valid()) {\n <span class=\"form-error\">{{ phoneInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Email -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (emailInput) {\n <div class=\"form__group withIcon\">\n <input type=\"email\"\n class=\"form__control\"\n [placeholder]=\"emailInput.placeholder\"\n formControlName=\"email\"\n (blur)=\"validateInput(emailInput)\"\n (input)=\"inputChange($event, emailInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"17\" height=\"17\"><use href=\"#email\"></use></svg>\n </span>\n </div>\n @if (!emailInput.valid()) {\n <span class=\"form-error\">{{ emailInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Empresa -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (companyNameInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"companyNameInput.placeholder\"\n [formControlName]=\"companyNameInput.name!\"\n (blur)=\"validateInput(companyNameInput)\"\n (input)=\"inputChange($event, companyNameInput)\"\n />\n <span class=\"icon-right corp-color\">\n <i class=\"icon-99\"></i>\n </span>\n </div>\n @if (!companyNameInput.valid()) {\n <span class=\"form-error\">{{ companyNameInput.error }}</span>\n }\n }\n </div>\n </div>\n\n </div>\n\n <!-- SECTION 2 -->\n <div class=\"eventsForm__section\">\n @if (dTitle) {\n <span class=\"eventsForm__section--title\">{{ dTitle }}</span>\n }\n\n <!-- Dropdown N\u00BA personas -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n <!-- @if (neDropdown) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\" formControlName=\"neDropdown\">\n <option value=\"\">{{ neDropdown.placeholder }}</option>\n @for (option of neDropdown.options; track $index) {\n <option [value]=\"option.code\">\n {{ option.name }}\n </option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n } -->\n @if (typeEventInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"typeEventInput.placeholder\"\n [formControlName]=\"typeEventInput.name!\"\n (blur)=\"validateInput(typeEventInput)\"\n (input)=\"inputChange($event, typeEventInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"22\" height=\"22\"><use href=\"#events-type\"></use></svg>\n </span>\n </div>\n <!-- @if (!typeEventInput.valid()) {\n <span class=\"form-error\">{{ typeEventInput.error }}</span>\n } -->\n }\n </div>\n </div>\n\n <!-- N\u00BA personas + Fecha -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (npInput) {\n <div class=\"form__group withIcon\">\n <input type=\"number\"\n class=\"form__control\"\n [placeholder]=\"npInput.placeholder\"\n [formControlName]=\"npInput.name!\"\n (blur)=\"validateInput(npInput)\"\n (input)=\"inputChange($event, npInput)\"\n />\n <span class=\"icon-right corp-color\">\n <svg width=\"18\" height=\"20\"><use href=\"#user\"></use></svg>\n </span>\n </div>\n @if (!npInput.valid()) {\n <span class=\"form-error\">{{ npInput.error }}</span>\n }\n }\n </div>\n\n <div class=\"eventsForm__col\">\n @if (dateInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control\"\n [placeholder]=\"dateInput.placeholder\"\n [formControlName]=\"dateInput.name!\"\n />\n <span class=\"icon-right corp-color\">\n <i class=\"icon-89\"></i>\n </span>\n </div>\n @if (!dateInput.valid()) {\n <span class=\"form-error\">{{ dateInput.error }}</span>\n }\n }\n </div>\n </div>\n\n <!-- Horas -->\n <div class=\"eventsForm__row\">\n\n <!-- Start Hour -->\n <div class=\"eventsForm__col\" style=\"position: relative\">\n @if (sHourInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control timepicker-trigger\"\n readonly\n autocomplete=\"off\"\n [placeholder]=\"sHourInput.placeholder\"\n [formControlName]=\"sHourInput.name!\"\n (click)=\"openTimepicker('sHourInput', $event)\"\n />\n <span class=\"icon-right corp-color timepicker-trigger\"\n (click)=\"openTimepicker('sHourInput', $event)\">\n <i class=\"icon-100\"></i>\n </span>\n </div>\n\n @if (!sHourInput.valid()) {\n <span class=\"form-error\">{{ sHourInput.error }}</span>\n }\n\n <ul class=\"puro-timepicker\"\n *ngIf=\"activeTimepicker === 'sHourInput'\">\n <li *ngFor=\"let h of hours\"\n (click)=\"selectHour('sHourInput', h)\">\n {{ h }}\n </li>\n </ul>\n }\n </div>\n\n <!-- End Hour -->\n <div class=\"eventsForm__col\" style=\"position: relative\">\n @if (fHourInput) {\n <div class=\"form__group withIcon\">\n <input type=\"text\"\n class=\"form__control timepicker-trigger\"\n readonly\n autocomplete=\"off\"\n [placeholder]=\"fHourInput.placeholder\"\n [formControlName]=\"fHourInput.name!\"\n (click)=\"openTimepicker('fHourInput', $event)\"\n />\n <span class=\"icon-right corp-color timepicker-trigger\"\n (click)=\"openTimepicker('fHourInput', $event)\">\n <i class=\"icon-100\"></i>\n </span>\n </div>\n\n @if (!fHourInput.valid()) {\n <span class=\"form-error\">{{ fHourInput.error }}</span>\n }\n\n <ul class=\"puro-timepicker\"\n *ngIf=\"activeTimepicker === 'fHourInput'\">\n <li *ngFor=\"let h of hours\"\n (click)=\"selectHour('fHourInput', h)\">\n {{ h }}\n </li>\n </ul>\n }\n </div>\n </div>\n\n <!-- Mensaje info -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (infoTextarea) {\n <div class=\"form__group no-dot\">\n <textarea class=\"form__control\"\n [placeholder]=\"infoTextarea.placeholder\"\n [formControlName]=\"infoTextarea.name!\">\n </textarea>\n </div>\n }\n </div>\n </div>\n\n </div>\n\n <!-- SECTION 3 -->\n <div class=\"eventsForm__section\">\n @if (howTitle) {\n <span class=\"eventsForm__section--title\">{{ howTitle }}</span>\n }\n\n <!-- Dropdown -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (othersDropdown) {\n <div class=\"form__group withIcon\">\n <select class=\"form__control\"\n formControlName=\"othersDropdown\">\n <option value=\"\">\n {{ othersDropdown.placeholder }}\n </option>\n @for (option of othersDropdown.options; track $index) {\n <option [value]=\"option.code\">\n {{ option.name }}\n </option>\n }\n </select>\n <span class=\"icon-right corp-color\">\n <svg width=\"15\" height=\"8\"><use href=\"#select-arrow\"></use></svg>\n </span>\n </div>\n }\n </div>\n </div>\n\n <!-- Textarea -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n @if (howTextarea) {\n <div class=\"form__group no-dot\">\n <textarea class=\"form__control\"\n [placeholder]=\"howTextarea.placeholder\"\n [formControlName]=\"howTextarea.name!\">\n </textarea>\n </div>\n }\n </div>\n </div>\n\n <!-- Checkboxes -->\n <div class=\"eventsForm__row\">\n <div class=\"eventsForm__col\">\n <div class=\"block-checkbox\">\n\n @if (requiredLabel) {\n <span class=\"required-label\">{{ requiredLabel }}</span>\n }\n\n @if (conditionsLink) {\n <label class=\"form__checkbox\">\n <input type=\"checkbox\"\n class=\"checkbox\"\n formControlName=\"conditions\"\n />\n <span class=\"box\">\n <svg width=\"9\" height=\"7\"><use href=\"#checkbox-tick\"></use></svg>\n </span>\n <span [innerHTML]=\"conditionsLink\"></span>\n </label>\n }\n\n @if (others) {\n <label class=\"form__checkbox\">\n <input type=\"checkbox\"\n class=\"checkbox\"\n formControlName=\"others\"\n />\n <span class=\"box\">\n <svg width=\"9\" height=\"7\"><use href=\"#checkbox-tick\"></use></svg>\n </span>\n <span>{{ others }}</span>\n </label>\n }\n\n </div>\n </div>\n </div>\n\n <!-- Bot\u00F3n -->\n <div class=\"btn__group\">\n @if (applyButton) {\n <button\n type=\"submit\"\n class=\"btn btn__primary--outline btn__events-form\"\n [attr.aria-label]=\"applyButton.label\"\n [disabled]=\"form.invalid\"\n >\n <span>{{ applyButton.label }}</span>\n </button>\n }\n </div>\n\n </div>\n </form>\n\n }\n </div>\n\n </div>\n</section>\n" }]
|
|
3205
3214
|
}], ctorParameters: () => [{ type: i1$3.FormBuilder }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { title: [{
|
|
3206
3215
|
type: Input
|
|
3207
3216
|
}], description: [{
|
|
@@ -3212,7 +3221,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
3212
3221
|
type: Input
|
|
3213
3222
|
}], howTitle: [{
|
|
3214
3223
|
type: Input
|
|
3215
|
-
}],
|
|
3224
|
+
}], typeEventInput: [{
|
|
3216
3225
|
type: Input
|
|
3217
3226
|
}], othersDropdown: [{
|
|
3218
3227
|
type: Input
|
|
@@ -5290,10 +5299,16 @@ class MapperService {
|
|
|
5290
5299
|
},
|
|
5291
5300
|
center: {
|
|
5292
5301
|
placeholder: props?.texts?.centerPlaceholder,
|
|
5293
|
-
options:
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5302
|
+
options: [
|
|
5303
|
+
{
|
|
5304
|
+
code: 0,
|
|
5305
|
+
name: props?.texts?.allCenters,
|
|
5306
|
+
},
|
|
5307
|
+
...(props?.hotels?.map((center) => ({
|
|
5308
|
+
code: center?.id,
|
|
5309
|
+
name: center?.texts?.name,
|
|
5310
|
+
})) ?? []),
|
|
5311
|
+
],
|
|
5297
5312
|
},
|
|
5298
5313
|
resident: {
|
|
5299
5314
|
placeholder: props?.texts?.residentPlaceholder,
|
|
@@ -6088,6 +6103,15 @@ class MapperService {
|
|
|
6088
6103
|
validators: [Validators.required],
|
|
6089
6104
|
valid: signal(true),
|
|
6090
6105
|
},
|
|
6106
|
+
typeEventInput: {
|
|
6107
|
+
name: this.sanitize(props?.texts?.neDropdown),
|
|
6108
|
+
placeholder: props?.texts?.neDropdown,
|
|
6109
|
+
value: '',
|
|
6110
|
+
type: 'text',
|
|
6111
|
+
error: props?.texts?.nameError,
|
|
6112
|
+
validators: [Validators.required],
|
|
6113
|
+
valid: signal(true),
|
|
6114
|
+
},
|
|
6091
6115
|
};
|
|
6092
6116
|
}
|
|
6093
6117
|
//TODO: Check back props
|