ng-easycommerce-v18 0.3.20-beta.1 → 0.3.21-beta.1
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/README.md +2 -16
- package/esm2022/lib/classes/filters/attributes-filter.mjs +4 -74
- package/esm2022/lib/classes/filters/category-filter.mjs +26 -105
- package/esm2022/lib/classes/filters/filter-factory.mjs +3 -7
- package/esm2022/lib/classes/filters/price_range-filter.mjs +3 -3
- package/esm2022/lib/constants/api.constants.service.mjs +15 -19
- package/esm2022/lib/constants/core.constants.service.mjs +5 -16
- package/esm2022/lib/ec-components/abstractions-components/menu-ec.component.mjs +1 -17
- package/esm2022/lib/ec-components/auth-ec/login-form-ec/login-form-ec.component.mjs +16 -26
- package/esm2022/lib/ec-components/auth-ec/password-reset-ec/password-reset-ec.component.mjs +21 -25
- package/esm2022/lib/ec-components/blocks-ec/block-products-ec/block-products-ec.component.mjs +16 -4
- package/esm2022/lib/ec-components/collection-ec/collection-ec.component.mjs +17 -41
- package/esm2022/lib/ec-components/filters-ec/filters-ec.component.mjs +14 -72
- package/esm2022/lib/ec-components/header-ec/header-ec.component.mjs +25 -41
- package/esm2022/lib/ec-components/price-range-filter/price-range-filter.component.mjs +2 -13
- package/esm2022/lib/ec-components/product-detail-ec/product-detail-ec.component.mjs +7 -12
- package/esm2022/lib/ec-components/stores-ec/stores-ec.component.mjs +9 -18
- package/esm2022/lib/ec-components/widgets-ec/decidir-ec/decidir-ec.component.mjs +6 -12
- package/esm2022/lib/ec-components/widgets-ec/magnizoom-ec/magnizoom-ec.component.mjs +4 -6
- package/esm2022/lib/ec-components/widgets-ec/redsys-catch-ec/redsys-catch-ec.component.mjs +17 -7
- package/esm2022/lib/ec-services/analytics/google-analytics.service.mjs +4 -4
- package/esm2022/lib/ec-services/analytics/gtm.service.mjs +6 -10
- package/esm2022/lib/ec-services/analytics/metricool-pixel.service.mjs +18 -17
- package/esm2022/lib/ec-services/checkout.service.mjs +2 -4
- package/esm2022/lib/ec-services/filters.service.mjs +18 -124
- package/esm2022/lib/ec-services/index.mjs +1 -3
- package/esm2022/lib/ec-services/pagination.service.mjs +22 -70
- package/esm2022/lib/ec-services/products.service.mjs +3 -5
- package/esm2022/lib/interceptors/index.mjs +1 -2
- package/esm2022/lib/interfaces/environment.mjs +1 -1
- package/esm2022/lib/interfaces/filter.mjs +1 -1
- package/esm2022/lib/interfaces/index.mjs +1 -2
- package/esm2022/lib/interfaces/options.mjs +1 -1
- package/esm2022/lib/providers/index.mjs +1 -2
- package/fesm2022/ng-easycommerce-v18.mjs +316 -1186
- package/fesm2022/ng-easycommerce-v18.mjs.map +1 -1
- package/lib/classes/filters/attributes-filter.d.ts +0 -24
- package/lib/classes/filters/category-filter.d.ts +3 -30
- package/lib/constants/api.constants.service.d.ts +0 -1
- package/lib/constants/core.constants.service.d.ts +0 -7
- package/lib/ec-components/abstractions-components/menu-ec.component.d.ts +0 -12
- package/lib/ec-components/auth-ec/login-form-ec/login-form-ec.component.d.ts +0 -2
- package/lib/ec-components/collection-ec/collection-ec.component.d.ts +4 -5
- package/lib/ec-components/filters-ec/filters-ec.component.d.ts +4 -25
- package/lib/ec-components/price-range-filter/price-range-filter.component.d.ts +0 -2
- package/lib/ec-services/analytics/gtm.service.d.ts +1 -1
- package/lib/ec-services/filters.service.d.ts +1 -18
- package/lib/ec-services/index.d.ts +0 -2
- package/lib/ec-services/pagination.service.d.ts +5 -21
- package/lib/ec-services/products.service.d.ts +1 -1
- package/lib/interceptors/index.d.ts +0 -1
- package/lib/interfaces/environment.d.ts +0 -1
- package/lib/interfaces/filter.d.ts +0 -1
- package/lib/interfaces/index.d.ts +0 -1
- package/lib/interfaces/options.d.ts +0 -2
- package/lib/providers/index.d.ts +0 -1
- package/package.json +1 -1
- package/esm2022/lib/ec-services/base-api.service.mjs +0 -148
- package/esm2022/lib/ec-services/runtime-config.service.mjs +0 -190
- package/esm2022/lib/interceptors/runtime-config.interceptor.mjs +0 -41
- package/esm2022/lib/interfaces/runtime-config.mjs +0 -2
- package/esm2022/lib/providers/provideRuntimeConfig.mjs +0 -42
- package/lib/ec-services/base-api.service.d.ts +0 -64
- package/lib/ec-services/runtime-config.service.d.ts +0 -63
- package/lib/interceptors/runtime-config.interceptor.d.ts +0 -7
- package/lib/interfaces/runtime-config.d.ts +0 -22
- package/lib/providers/provideRuntimeConfig.d.ts +0 -13
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, makeEnvironmentProviders,
|
|
3
|
-
import * as i1
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import * as i1 from '@angular/common/http';
|
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, inject, Injectable, PLATFORM_ID, RendererFactory2, afterNextRender, signal, EnvironmentInjector, runInInjectionContext, Component, ChangeDetectorRef, HostListener, CUSTOM_ELEMENTS_SCHEMA, Input, Pipe, Injector, EventEmitter, Output, forwardRef, afterRender, ViewChild, Inject, computed, Renderer2, ChangeDetectionStrategy, Directive } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { DOCUMENT, isPlatformBrowser, AsyncPipe, CommonModule, TitleCasePipe, JsonPipe, UpperCasePipe, Location } from '@angular/common';
|
|
5
|
+
import { take, BehaviorSubject, shareReplay, map, catchError, of, filter, ReplaySubject, firstValueFrom, concatMap, throwError, switchMap, combineLatest } from 'rxjs';
|
|
7
6
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
8
|
-
import
|
|
9
|
-
import * as i1$2 from '@ngx-translate/core';
|
|
7
|
+
import * as i1$1 from '@ngx-translate/core';
|
|
10
8
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
11
9
|
import { CookieService } from 'ngx-cookie-service';
|
|
12
10
|
import * as i2 from '@angular/router';
|
|
@@ -15,16 +13,17 @@ import { signalStore, withState, withMethods, patchState } from '@ngrx/signals';
|
|
|
15
13
|
import { ToastrService } from 'ngx-toastr';
|
|
16
14
|
import moment from 'moment';
|
|
17
15
|
import { StorageMap } from '@ngx-pwa/local-storage';
|
|
18
|
-
import * as i1$
|
|
16
|
+
import * as i1$3 from '@angular/forms';
|
|
19
17
|
import { Validators, FormsModule, FormBuilder, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
|
|
20
18
|
import { register } from 'swiper/element/bundle';
|
|
21
19
|
import { register as register$1 } from 'swiper/element';
|
|
22
|
-
import * as i1$
|
|
20
|
+
import * as i1$4 from '@angular/platform-browser';
|
|
23
21
|
import { DomSanitizer, Meta, Title } from '@angular/platform-browser';
|
|
24
|
-
import * as i1$
|
|
22
|
+
import * as i1$2 from 'ng-recaptcha-2';
|
|
25
23
|
import { RecaptchaModule } from 'ng-recaptcha-2';
|
|
26
24
|
import { InfiniteScrollDirective } from 'ngx-infinite-scroll';
|
|
27
25
|
import * as he from 'he';
|
|
26
|
+
import { filter as filter$1, skipWhile } from 'rxjs/operators';
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
29
|
* Token para el provider de enviroment
|
|
@@ -44,230 +43,6 @@ const provideEnvironment = (environment) => {
|
|
|
44
43
|
]);
|
|
45
44
|
};
|
|
46
45
|
|
|
47
|
-
class RuntimeConfigService {
|
|
48
|
-
platformId;
|
|
49
|
-
http;
|
|
50
|
-
configSubject = new BehaviorSubject(null);
|
|
51
|
-
config$ = this.configSubject.asObservable();
|
|
52
|
-
_config = null;
|
|
53
|
-
_loadPromise = null;
|
|
54
|
-
_isLoaded = false;
|
|
55
|
-
constructor(platformId, http) {
|
|
56
|
-
this.platformId = platformId;
|
|
57
|
-
this.http = http;
|
|
58
|
-
// En SSR o browser, intentar cargar inmediatamente desde window si está disponible
|
|
59
|
-
if (typeof window !== 'undefined' && window.__RUNTIME_CONFIG__ && !this._isLoaded) {
|
|
60
|
-
this._config = window.__RUNTIME_CONFIG__;
|
|
61
|
-
this._isLoaded = true;
|
|
62
|
-
this.configSubject.next(this._config);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Inicialización única - llamada por APP_INITIALIZER
|
|
67
|
-
* Garantiza que la configuración se carga solo una vez al inicio
|
|
68
|
-
*/
|
|
69
|
-
initialize() {
|
|
70
|
-
if (this._isLoaded && this._config) {
|
|
71
|
-
return Promise.resolve(this._config);
|
|
72
|
-
}
|
|
73
|
-
return new Promise((resolve, reject) => {
|
|
74
|
-
this.loadConfig().subscribe({
|
|
75
|
-
next: (config) => {
|
|
76
|
-
this._isLoaded = true;
|
|
77
|
-
resolve(config);
|
|
78
|
-
},
|
|
79
|
-
error: (error) => {
|
|
80
|
-
reject(error);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Carga la configuración en runtime (optimizada para una sola carga)
|
|
87
|
-
* - En SSR: Lee desde el objeto window inyectado por el servidor
|
|
88
|
-
* - En Browser: Hace petición HTTP a /runtime-config.json (solo si no está en window)
|
|
89
|
-
*/
|
|
90
|
-
loadConfig() {
|
|
91
|
-
// Si ya tenemos la config cargada, la devolvemos inmediatamente
|
|
92
|
-
if (this._isLoaded && this._config) {
|
|
93
|
-
return of(this._config);
|
|
94
|
-
}
|
|
95
|
-
// Si ya hay una carga en progreso, reutilizamos esa petición
|
|
96
|
-
if (this._loadPromise) {
|
|
97
|
-
return this._loadPromise;
|
|
98
|
-
}
|
|
99
|
-
if (isPlatformBrowser(this.platformId)) {
|
|
100
|
-
// En el navegador, primero intentamos obtener la config desde window
|
|
101
|
-
if (typeof window !== 'undefined' && window.__RUNTIME_CONFIG__ && !this._isLoaded) {
|
|
102
|
-
this._config = window.__RUNTIME_CONFIG__;
|
|
103
|
-
this._isLoaded = true;
|
|
104
|
-
this.configSubject.next(this._config);
|
|
105
|
-
return of(this._config);
|
|
106
|
-
}
|
|
107
|
-
// Si no está en window, hacemos petición HTTP (solo una vez)
|
|
108
|
-
this._loadPromise = this.http.get('/runtime-config.json').pipe(tap(config => {
|
|
109
|
-
this._config = config;
|
|
110
|
-
this._isLoaded = true;
|
|
111
|
-
this.configSubject.next(config);
|
|
112
|
-
// Guardamos en window para siguientes accesos
|
|
113
|
-
if (typeof window !== 'undefined') {
|
|
114
|
-
window.__RUNTIME_CONFIG__ = config;
|
|
115
|
-
}
|
|
116
|
-
}), shareReplay(1), // Cache la respuesta para múltiples suscripciones
|
|
117
|
-
catchError(error => {
|
|
118
|
-
console.error('Error loading runtime config:', error);
|
|
119
|
-
// Fallback config si falla la carga
|
|
120
|
-
const fallbackConfig = {
|
|
121
|
-
apiUrl: 'https://elden-preprod.backend.easycommerce.com.ar/',
|
|
122
|
-
appEnv: 'preprod',
|
|
123
|
-
production: false,
|
|
124
|
-
locale: 'es_AR',
|
|
125
|
-
channel: 'minorista'
|
|
126
|
-
};
|
|
127
|
-
this._config = fallbackConfig;
|
|
128
|
-
this._isLoaded = true;
|
|
129
|
-
this.configSubject.next(fallbackConfig);
|
|
130
|
-
return of(fallbackConfig);
|
|
131
|
-
}));
|
|
132
|
-
return this._loadPromise;
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
// En SSR, leemos desde window que fue inyectado por el servidor
|
|
136
|
-
if (typeof window !== 'undefined' && window.__RUNTIME_CONFIG__ && !this._isLoaded) {
|
|
137
|
-
this._config = window.__RUNTIME_CONFIG__;
|
|
138
|
-
this._isLoaded = true;
|
|
139
|
-
this.configSubject.next(this._config);
|
|
140
|
-
return of(this._config);
|
|
141
|
-
}
|
|
142
|
-
// Fallback para SSR si no hay config inyectada
|
|
143
|
-
// En el servidor, las variables de entorno se configuran desde el server.ts
|
|
144
|
-
const fallbackConfig = {
|
|
145
|
-
apiUrl: 'https://elden-preprod.backend.easycommerce.com.ar/',
|
|
146
|
-
appEnv: 'preprod',
|
|
147
|
-
production: false,
|
|
148
|
-
locale: 'es_AR',
|
|
149
|
-
channel: 'minorista'
|
|
150
|
-
};
|
|
151
|
-
this._config = fallbackConfig;
|
|
152
|
-
this._isLoaded = true;
|
|
153
|
-
this.configSubject.next(fallbackConfig);
|
|
154
|
-
return of(fallbackConfig);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Obtiene la configuración actual (síncrono)
|
|
159
|
-
*/
|
|
160
|
-
getConfig() {
|
|
161
|
-
return this._config;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Obtiene la API URL actual
|
|
165
|
-
*/
|
|
166
|
-
getApiUrl() {
|
|
167
|
-
return this._config?.apiUrl || 'https://elden-preprod.backend.easycommerce.com.ar/';
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Obtiene la Frontend URL actual
|
|
171
|
-
*/
|
|
172
|
-
getFrontendUrl() {
|
|
173
|
-
return this._config?.frontendUrl;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Obtiene el entorno actual
|
|
177
|
-
*/
|
|
178
|
-
getAppEnv() {
|
|
179
|
-
return this._config?.appEnv || 'development';
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Verifica si estamos en producción
|
|
183
|
-
*/
|
|
184
|
-
isProduction() {
|
|
185
|
-
return this._config?.production || false;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Obtiene el locale actual
|
|
189
|
-
*/
|
|
190
|
-
getLocale() {
|
|
191
|
-
return this._config?.locale || 'es_AR';
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Obtiene el canal actual
|
|
195
|
-
*/
|
|
196
|
-
getChannel() {
|
|
197
|
-
return this._config?.channel || 'minorista';
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Método helper para construir URLs de API
|
|
201
|
-
*/
|
|
202
|
-
buildApiUrl(endpoint) {
|
|
203
|
-
const apiUrl = this.getApiUrl();
|
|
204
|
-
const cleanEndpoint = endpoint.startsWith('/') ? endpoint.slice(1) : endpoint;
|
|
205
|
-
return `${apiUrl}${cleanEndpoint}`;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Método helper para construir URLs del frontend
|
|
209
|
-
*/
|
|
210
|
-
buildFrontendUrl(path) {
|
|
211
|
-
const frontendUrl = this.getFrontendUrl();
|
|
212
|
-
if (!frontendUrl) {
|
|
213
|
-
return path;
|
|
214
|
-
}
|
|
215
|
-
const cleanPath = path.startsWith('/') ? path.slice(1) : path;
|
|
216
|
-
return `${frontendUrl}${cleanPath}`;
|
|
217
|
-
}
|
|
218
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RuntimeConfigService, deps: [{ token: PLATFORM_ID }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
219
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RuntimeConfigService, providedIn: 'root' });
|
|
220
|
-
}
|
|
221
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RuntimeConfigService, decorators: [{
|
|
222
|
-
type: Injectable,
|
|
223
|
-
args: [{
|
|
224
|
-
providedIn: 'root'
|
|
225
|
-
}]
|
|
226
|
-
}], ctorParameters: () => [{ type: Object, decorators: [{
|
|
227
|
-
type: Inject,
|
|
228
|
-
args: [PLATFORM_ID]
|
|
229
|
-
}] }, { type: i1.HttpClient }] });
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Factory function para APP_INITIALIZER (OPTIMIZADA)
|
|
233
|
-
* Carga la configuración runtime UNA SOLA VEZ antes de que Angular bootstrap la aplicación
|
|
234
|
-
* Evita múltiples cargas y mejora el rendimiento
|
|
235
|
-
*/
|
|
236
|
-
function initializeRuntimeConfig(runtimeConfigService) {
|
|
237
|
-
return () => {
|
|
238
|
-
console.log('🚀 Inicializando Runtime Config...');
|
|
239
|
-
return runtimeConfigService.initialize()
|
|
240
|
-
.then((config) => {
|
|
241
|
-
console.log('✅ Runtime config inicializado correctamente:', {
|
|
242
|
-
apiUrl: config.apiUrl,
|
|
243
|
-
appEnv: config.appEnv,
|
|
244
|
-
production: config.production
|
|
245
|
-
});
|
|
246
|
-
return config;
|
|
247
|
-
})
|
|
248
|
-
.catch((error) => {
|
|
249
|
-
console.error('❌ Error al inicializar runtime config:', error);
|
|
250
|
-
// Aún en caso de error, continuamos para no bloquear la app
|
|
251
|
-
return null;
|
|
252
|
-
});
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Función que configura el RuntimeConfigService y su inicialización
|
|
257
|
-
* Debe ser usado en app.config.ts junto con provideEnvironment
|
|
258
|
-
*/
|
|
259
|
-
function provideRuntimeConfig() {
|
|
260
|
-
return makeEnvironmentProviders([
|
|
261
|
-
RuntimeConfigService,
|
|
262
|
-
{
|
|
263
|
-
provide: APP_INITIALIZER,
|
|
264
|
-
useFactory: initializeRuntimeConfig,
|
|
265
|
-
deps: [RuntimeConfigService],
|
|
266
|
-
multi: true
|
|
267
|
-
}
|
|
268
|
-
]);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
46
|
/**
|
|
272
47
|
* Servicio que provee de datos que estan relacionado con las peticiones a la API
|
|
273
48
|
* @export
|
|
@@ -276,7 +51,6 @@ function provideRuntimeConfig() {
|
|
|
276
51
|
class ApiConstantsService {
|
|
277
52
|
_localStorage = inject(LocalStorageService);
|
|
278
53
|
_translate = inject(TranslateService);
|
|
279
|
-
_runtimeConfig = inject(RuntimeConfigService);
|
|
280
54
|
/**
|
|
281
55
|
* Contiene los datos provisto por el frontend en el archivo environment.ts
|
|
282
56
|
*/
|
|
@@ -285,10 +59,13 @@ class ApiConstantsService {
|
|
|
285
59
|
* Canal actual del frontend
|
|
286
60
|
*/
|
|
287
61
|
get CHANNEL() {
|
|
288
|
-
//
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
62
|
+
// Verificar si estamos en el navegador (no en SSR)
|
|
63
|
+
if (typeof window !== 'undefined') {
|
|
64
|
+
// Primero intenta leer de window.__env (configurado por Docker)
|
|
65
|
+
const windowEnv = window.__env;
|
|
66
|
+
if (windowEnv?.channel) {
|
|
67
|
+
return windowEnv.channel;
|
|
68
|
+
}
|
|
292
69
|
}
|
|
293
70
|
// Fallback al environment
|
|
294
71
|
return this._channel;
|
|
@@ -310,25 +87,20 @@ class ApiConstantsService {
|
|
|
310
87
|
*/
|
|
311
88
|
CMS_URL = 'cms/';
|
|
312
89
|
constructor() {
|
|
313
|
-
// Inicializar con valores por defecto del environment
|
|
314
90
|
this._channel = this.environment.channel;
|
|
315
91
|
this.LOCALE = this.environment.locale;
|
|
316
|
-
// Actualizar con runtime config cuando esté disponible
|
|
317
|
-
this._runtimeConfig.config$.subscribe(config => {
|
|
318
|
-
if (config) {
|
|
319
|
-
this._channel = config.channel;
|
|
320
|
-
this.LOCALE = config.locale;
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
92
|
}
|
|
324
93
|
/**
|
|
325
94
|
* URL del backend para realizar las peticiones
|
|
326
95
|
*/
|
|
327
96
|
get API_URL() {
|
|
328
|
-
//
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
97
|
+
// Verificar si estamos en el navegador (no en SSR)
|
|
98
|
+
if (typeof window !== 'undefined') {
|
|
99
|
+
// Primero intenta leer de window.__env (configurado por Docker)
|
|
100
|
+
const windowEnv = window.__env;
|
|
101
|
+
if (windowEnv?.apiUrl) {
|
|
102
|
+
return windowEnv.apiUrl;
|
|
103
|
+
}
|
|
332
104
|
}
|
|
333
105
|
// Fallback al environment (para SSR y como backup)
|
|
334
106
|
return this.environment.apiUrl ?? '';
|
|
@@ -465,13 +237,8 @@ class CoreConstantsService {
|
|
|
465
237
|
* Guarda la variable window del web browser.
|
|
466
238
|
*/
|
|
467
239
|
window;
|
|
468
|
-
/**
|
|
469
|
-
* Tipo de ruta actual (ej: 'categories', 'attributes', etc).
|
|
470
|
-
* Lo usamos para que PaginationService sepa qué filtro esperar.
|
|
471
|
-
*/
|
|
472
|
-
currentRouteType = null;
|
|
473
240
|
constructor() {
|
|
474
|
-
if (isPlatformBrowser(this.platformId)
|
|
241
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
475
242
|
this.window = window;
|
|
476
243
|
}
|
|
477
244
|
}
|
|
@@ -510,7 +277,7 @@ class CoreConstantsService {
|
|
|
510
277
|
*/
|
|
511
278
|
get FRONTEND_URL() {
|
|
512
279
|
// Verificar si estamos en el navegador
|
|
513
|
-
if (isPlatformBrowser(this.platformId)
|
|
280
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
514
281
|
// Primero intenta leer de window.__env (configurado por Docker/CI)
|
|
515
282
|
const windowEnv = this.window?.__env;
|
|
516
283
|
if (windowEnv?.frontendUrl) {
|
|
@@ -531,7 +298,7 @@ class CoreConstantsService {
|
|
|
531
298
|
}
|
|
532
299
|
}
|
|
533
300
|
// Para SSR, intentar construir desde el document si está disponible
|
|
534
|
-
if (
|
|
301
|
+
if (this.document?.location) {
|
|
535
302
|
return `${this.document.location.protocol}//${this.document.location.host}`;
|
|
536
303
|
}
|
|
537
304
|
// Intentar obtener desde environment
|
|
@@ -611,7 +378,7 @@ class CoreConstantsService {
|
|
|
611
378
|
* Retorna `true` si la vista es mobile, `false` caso contrario.
|
|
612
379
|
* @returns {boolean}
|
|
613
380
|
*/
|
|
614
|
-
mobileScreen = () =>
|
|
381
|
+
mobileScreen = () => this.window && this.window?.innerWidth < 750 || false;
|
|
615
382
|
/**
|
|
616
383
|
* Contiene los valores para la moneda actual
|
|
617
384
|
*/
|
|
@@ -747,12 +514,6 @@ class CoreConstantsService {
|
|
|
747
514
|
return this.apiConstants.CHANNEL;
|
|
748
515
|
}
|
|
749
516
|
form_sender = false;
|
|
750
|
-
setCurrentRouteType(type) {
|
|
751
|
-
this.currentRouteType = type;
|
|
752
|
-
}
|
|
753
|
-
getCurrentRouteType() {
|
|
754
|
-
return this.currentRouteType;
|
|
755
|
-
}
|
|
756
517
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CoreConstantsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
757
518
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CoreConstantsService, providedIn: 'root' });
|
|
758
519
|
}
|
|
@@ -828,11 +589,11 @@ class OptionsService {
|
|
|
828
589
|
*/
|
|
829
590
|
getCategories() {
|
|
830
591
|
if (this.categoriesSubject.getValue().length === 0) {
|
|
831
|
-
this.connection.get(this.taxonsApi()).pipe(shareReplay
|
|
592
|
+
this.connection.get(this.taxonsApi()).pipe(shareReplay(1), map((response) => {
|
|
832
593
|
const categories = this.appendPaths(true, response);
|
|
833
594
|
this.categoriesSubject.next(categories);
|
|
834
595
|
return categories;
|
|
835
|
-
}), catchError
|
|
596
|
+
}), catchError((error) => {
|
|
836
597
|
console.log(`Error: ${error}`);
|
|
837
598
|
this.categoriesSubject.next([]);
|
|
838
599
|
return of([]);
|
|
@@ -846,7 +607,7 @@ class OptionsService {
|
|
|
846
607
|
*/
|
|
847
608
|
getSections() {
|
|
848
609
|
if (this.sectionsSubject.getValue().length === 0) {
|
|
849
|
-
this.connection.get(this.sectionsApi()).pipe(shareReplay
|
|
610
|
+
this.connection.get(this.sectionsApi()).pipe(shareReplay(1), map((response) => {
|
|
850
611
|
let sections = response.filter((section) => section.code != 'home');
|
|
851
612
|
sections = sections.map((section) => this.appendSection(section));
|
|
852
613
|
this.sectionsSubject.next(sections);
|
|
@@ -862,7 +623,7 @@ class OptionsService {
|
|
|
862
623
|
*/
|
|
863
624
|
getAttributes(params) {
|
|
864
625
|
if (this.attributesSubject.getValue().length === 0) {
|
|
865
|
-
this.connection.get(this.attributesApi(params)).pipe(shareReplay
|
|
626
|
+
this.connection.get(this.attributesApi(params)).pipe(shareReplay(1), map((response) => {
|
|
866
627
|
const attributes = this.appendPaths(false, (response.attributes[0] || response));
|
|
867
628
|
this.attributesSubject.next(attributes);
|
|
868
629
|
return attributes;
|
|
@@ -1032,7 +793,7 @@ class OptionsService {
|
|
|
1032
793
|
}
|
|
1033
794
|
return result;
|
|
1034
795
|
};
|
|
1035
|
-
getSectionContentByLink = (link) => this.connection.getHTML(this.pageContentByCodeApi(link)).pipe(map(html => html.split('</head>')[html.split('</head>').length - 1]), catchError
|
|
796
|
+
getSectionContentByLink = (link) => this.connection.getHTML(this.pageContentByCodeApi(link)).pipe(map(html => html.split('</head>')[html.split('</head>').length - 1]), catchError(e => of(false)));
|
|
1036
797
|
getFAQ() {
|
|
1037
798
|
return this.connection.get(this.faqsApi()).pipe(map(response => {
|
|
1038
799
|
let result = [];
|
|
@@ -1094,10 +855,10 @@ class ParametersService {
|
|
|
1094
855
|
*/
|
|
1095
856
|
getParameters() {
|
|
1096
857
|
if (this.parametersSubject.getValue() === null) {
|
|
1097
|
-
this.connection.get(this.getAllParametersAPI()).pipe(shareReplay
|
|
858
|
+
this.connection.get(this.getAllParametersAPI()).pipe(shareReplay(1), map((response) => {
|
|
1098
859
|
this.parametersSubject.next(response);
|
|
1099
860
|
return response;
|
|
1100
|
-
}), catchError
|
|
861
|
+
}), catchError((error) => {
|
|
1101
862
|
console.log(`Error: ${error}`);
|
|
1102
863
|
this.parametersSubject.next([]);
|
|
1103
864
|
return of([]);
|
|
@@ -1158,7 +919,7 @@ class BlocksRepositoryService {
|
|
|
1158
919
|
*/
|
|
1159
920
|
getBlocks(section) {
|
|
1160
921
|
//if(this.blocksSubject.getValue() != null){
|
|
1161
|
-
this.connection.get(this.blocksAPI(section)).pipe(shareReplay
|
|
922
|
+
this.connection.get(this.blocksAPI(section)).pipe(shareReplay(1), map((response) => {
|
|
1162
923
|
//console.log(response)
|
|
1163
924
|
this.blocksSubject.next(response.items);
|
|
1164
925
|
return response;
|
|
@@ -1470,7 +1231,7 @@ class GoogleAnalyticsService {
|
|
|
1470
1231
|
* @param gtm_id id provisto por Google Tag Manager.
|
|
1471
1232
|
*/
|
|
1472
1233
|
initialize(gtm_id) {
|
|
1473
|
-
if (
|
|
1234
|
+
if (!document.getElementById('google_tag_manager')) {
|
|
1474
1235
|
console.log('hay elemento');
|
|
1475
1236
|
const declaration = this.renderer.createElement('script');
|
|
1476
1237
|
declaration.async = true;
|
|
@@ -1478,8 +1239,8 @@ class GoogleAnalyticsService {
|
|
|
1478
1239
|
declaration.src = `https://www.googletagmanager.com/gtag/js?id=${gtm_id}`;
|
|
1479
1240
|
const initialization = this.renderer.createElement('script');
|
|
1480
1241
|
initialization.text = `window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '${gtm_id}')`;
|
|
1481
|
-
this.renderer.appendChild(this.document
|
|
1482
|
-
this.renderer.appendChild(this.document
|
|
1242
|
+
this.renderer.appendChild(this.document?.head, initialization);
|
|
1243
|
+
this.renderer.appendChild(this.document?.head, declaration);
|
|
1483
1244
|
this.enabled = true;
|
|
1484
1245
|
}
|
|
1485
1246
|
setTimeout(() => this.startListeningPageViews(gtm_id), 1000);
|
|
@@ -1739,7 +1500,6 @@ class GTMService {
|
|
|
1739
1500
|
window;
|
|
1740
1501
|
rendererFactory = inject(RendererFactory2);
|
|
1741
1502
|
document = null;
|
|
1742
|
-
platformId = inject(PLATFORM_ID);
|
|
1743
1503
|
/**
|
|
1744
1504
|
* Servicio de ruteo de angular.
|
|
1745
1505
|
*/
|
|
@@ -1748,7 +1508,7 @@ class GTMService {
|
|
|
1748
1508
|
* Configuración de Google Tag Manager.
|
|
1749
1509
|
*/
|
|
1750
1510
|
config = { id: null };
|
|
1751
|
-
|
|
1511
|
+
platformId = inject(PLATFORM_ID);
|
|
1752
1512
|
constructor() {
|
|
1753
1513
|
this.renderer = this.rendererFactory.createRenderer(null, null);
|
|
1754
1514
|
if (isPlatformBrowser(this.platformId)) {
|
|
@@ -1781,15 +1541,12 @@ class GTMService {
|
|
|
1781
1541
|
*/
|
|
1782
1542
|
addGtmToDom() {
|
|
1783
1543
|
return new Promise((resolve, reject) => {
|
|
1784
|
-
if (!isPlatformBrowser(this.platformId) || !this.document) {
|
|
1785
|
-
// No manipular el DOM en SSR
|
|
1786
|
-
return resolve(false);
|
|
1787
|
-
}
|
|
1788
1544
|
if (this.isLoaded) {
|
|
1789
1545
|
return resolve(this.isLoaded);
|
|
1790
1546
|
}
|
|
1547
|
+
//const doc = this.browserGlobals.documentRef();
|
|
1791
1548
|
this.pushOnDataLayer({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
|
|
1792
|
-
const gtmScript = this.document.createElement('script');
|
|
1549
|
+
const gtmScript = this.document?.createElement('script'); //doc.createElement('script');
|
|
1793
1550
|
if (gtmScript) {
|
|
1794
1551
|
gtmScript.id = 'GTMscript';
|
|
1795
1552
|
gtmScript.async = true;
|
|
@@ -1800,7 +1557,7 @@ class GTMService {
|
|
|
1800
1557
|
gtmScript.addEventListener('error', () => {
|
|
1801
1558
|
return reject(false);
|
|
1802
1559
|
});
|
|
1803
|
-
this.document
|
|
1560
|
+
this.document?.head.insertBefore(gtmScript, this.document.head.firstChild);
|
|
1804
1561
|
}
|
|
1805
1562
|
});
|
|
1806
1563
|
}
|
|
@@ -1817,7 +1574,7 @@ class GTMService {
|
|
|
1817
1574
|
initialize(config) {
|
|
1818
1575
|
this.config = config || this.config;
|
|
1819
1576
|
this.addGtmToDom().then(() => {
|
|
1820
|
-
this.router.events.forEach(
|
|
1577
|
+
this.router.events.forEach(item => {
|
|
1821
1578
|
if (item instanceof NavigationEnd) {
|
|
1822
1579
|
const gtmTag = {
|
|
1823
1580
|
event: 'page',
|
|
@@ -2191,6 +1948,9 @@ class MetricoolPixelService {
|
|
|
2191
1948
|
*/
|
|
2192
1949
|
renderer;
|
|
2193
1950
|
constructor() {
|
|
1951
|
+
if (isPlatformBrowser(this.platformId)) {
|
|
1952
|
+
this.document = document;
|
|
1953
|
+
}
|
|
2194
1954
|
this.renderer = this.rendererFactory.createRenderer(null, null);
|
|
2195
1955
|
}
|
|
2196
1956
|
/**
|
|
@@ -2198,22 +1958,20 @@ class MetricoolPixelService {
|
|
|
2198
1958
|
* @param pixel_hash hash provisto por Metricool Pixel.
|
|
2199
1959
|
*/
|
|
2200
1960
|
initialize = (pixel_hash) => {
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
c.
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
this.renderer.appendChild(this.document.body, new_analityc_script);
|
|
2216
|
-
}
|
|
1961
|
+
let new_analityc_script = this.renderer.createElement('script');
|
|
1962
|
+
new_analityc_script.type = 'text/javascript';
|
|
1963
|
+
new_analityc_script.text = `
|
|
1964
|
+
function loadScript(a) {
|
|
1965
|
+
var b = document.getElementsByTagName("head")[0], c = document.createElement("script");
|
|
1966
|
+
c.type = "text/javascript",
|
|
1967
|
+
c.src = "https://tracker.metricool.com/resources/be.js",
|
|
1968
|
+
c.onreadystatechange = a,
|
|
1969
|
+
c.onload = a, b.appendChild(c)
|
|
1970
|
+
} loadScript(function () {
|
|
1971
|
+
beTracker.t({ hash: "${pixel_hash}" })
|
|
1972
|
+
});
|
|
1973
|
+
`;
|
|
1974
|
+
this.renderer.appendChild(this.document?.body, new_analityc_script);
|
|
2217
1975
|
};
|
|
2218
1976
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetricoolPixelService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2219
1977
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MetricoolPixelService, providedIn: 'root' });
|
|
@@ -2343,7 +2101,7 @@ class ChannelService {
|
|
|
2343
2101
|
* @returns Observable con el canal.
|
|
2344
2102
|
*/
|
|
2345
2103
|
getChannel = () => {
|
|
2346
|
-
this.connection.get(this.channelApi()).pipe(shareReplay
|
|
2104
|
+
this.connection.get(this.channelApi()).pipe(shareReplay(1), map((response) => {
|
|
2347
2105
|
this.setChannelInfo(response);
|
|
2348
2106
|
this.channelSubject.next(response);
|
|
2349
2107
|
this.channelType = response.type;
|
|
@@ -2783,7 +2541,7 @@ class FormService {
|
|
|
2783
2541
|
* @returns
|
|
2784
2542
|
*/
|
|
2785
2543
|
getCountriesData() {
|
|
2786
|
-
this.connection.get(this.countriesApi()).pipe(shareReplay
|
|
2544
|
+
this.connection.get(this.countriesApi()).pipe(shareReplay(1), map((response) => {
|
|
2787
2545
|
//console.log(response);
|
|
2788
2546
|
const data = response._embedded.items;
|
|
2789
2547
|
this.countriesSubject.next(data);
|
|
@@ -2969,24 +2727,17 @@ class Filter {
|
|
|
2969
2727
|
};
|
|
2970
2728
|
}
|
|
2971
2729
|
|
|
2972
|
-
/**
|
|
2973
|
-
* CategoryFilter
|
|
2974
|
-
* - Gestiona el filtro de categorías.
|
|
2975
|
-
* - Mantiene la estructura de categorías (parents/children) y permite:
|
|
2976
|
-
* * Inicializar desde OptionsService.
|
|
2977
|
-
* * Marcar elementos según slug o query param.
|
|
2978
|
-
* * Generar porción de query string (&category=...).
|
|
2979
|
-
*/
|
|
2980
2730
|
class CategoryFilter extends Filter {
|
|
2731
|
+
initialValues;
|
|
2981
2732
|
_optionsService = inject(OptionsService);
|
|
2982
|
-
_filtersService = inject(FiltersService);
|
|
2983
2733
|
data = [];
|
|
2984
2734
|
multi = false;
|
|
2985
|
-
constructor(
|
|
2735
|
+
constructor(initialValues) {
|
|
2986
2736
|
super();
|
|
2737
|
+
this.initialValues = initialValues;
|
|
2987
2738
|
this._optionsService.getCategories().subscribe(res => {
|
|
2988
|
-
|
|
2989
|
-
this.
|
|
2739
|
+
//console.log(res);
|
|
2740
|
+
this.setContent(res, initialValues);
|
|
2990
2741
|
});
|
|
2991
2742
|
}
|
|
2992
2743
|
type() {
|
|
@@ -2998,122 +2749,44 @@ class CategoryFilter extends Filter {
|
|
|
2998
2749
|
this.data = categories;
|
|
2999
2750
|
}
|
|
3000
2751
|
getContent() {
|
|
3001
|
-
|
|
2752
|
+
throw new Error("Method not implemented.");
|
|
3002
2753
|
}
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
});
|
|
3019
|
-
};
|
|
3020
|
-
walk(this.data);
|
|
3021
|
-
if (selectedCodes.length > 0) {
|
|
3022
|
-
return `&category=${encodeURIComponent(selectedCodes[0])}`;
|
|
3023
|
-
}
|
|
3024
|
-
return '';
|
|
2754
|
+
toUrlParams(actual_url = '', sublist) {
|
|
2755
|
+
let elements = sublist || this.data;
|
|
2756
|
+
elements.forEach((element) => {
|
|
2757
|
+
if (element.type == 'sub' && !element.selected) {
|
|
2758
|
+
const result = this.toUrlParams('', element.children);
|
|
2759
|
+
!actual_url.includes(result) ? actual_url += result : null;
|
|
2760
|
+
}
|
|
2761
|
+
else if (element.selected) {
|
|
2762
|
+
if (actual_url == '')
|
|
2763
|
+
actual_url = '&category=' + element.value;
|
|
2764
|
+
else
|
|
2765
|
+
actual_url = element.value;
|
|
2766
|
+
}
|
|
2767
|
+
});
|
|
2768
|
+
return actual_url;
|
|
3025
2769
|
}
|
|
3026
2770
|
createElement(filter, original, initialValue) {
|
|
3027
2771
|
if (filter.type == 'sub') {
|
|
3028
2772
|
filter.multi = false;
|
|
3029
2773
|
filter.shape = 'text';
|
|
3030
2774
|
filter.value = original.code;
|
|
3031
|
-
filter.selected = (initialValue &&
|
|
3032
|
-
this.removeAccents(original.slug?.toLowerCase()) ===
|
|
3033
|
-
this.removeAccents(String(initialValue).toLowerCase()));
|
|
2775
|
+
filter.selected = (initialValue && this.removeAccents(original.slug?.toLowerCase()) == this.removeAccents(initialValue?.toLowerCase()));
|
|
3034
2776
|
filter.children = filter.children.map((child, i) => this.createElement(child, original.children[i], initialValue));
|
|
3035
2777
|
}
|
|
3036
2778
|
else {
|
|
3037
2779
|
filter.value = original.code;
|
|
3038
|
-
filter.selected = (initialValue &&
|
|
3039
|
-
this.removeAccents(original.slug?.toLowerCase()) ===
|
|
3040
|
-
this.removeAccents(String(initialValue).toLowerCase()));
|
|
2780
|
+
filter.selected = (initialValue && this.removeAccents(original.slug?.toLowerCase()) == this.removeAccents(initialValue?.toLowerCase()));
|
|
3041
2781
|
}
|
|
3042
2782
|
return filter;
|
|
3043
2783
|
}
|
|
3044
|
-
/**
|
|
3045
|
-
* setFromSlug
|
|
3046
|
-
* - Marca como selected los nodos cuyo slug/path/name coincide con el slug proporcionado.
|
|
3047
|
-
* - Utiliza removeAccents para comparar sin tildes y en minúsculas.
|
|
3048
|
-
* - No retorna valor, solo modifica this.data.
|
|
3049
|
-
*/
|
|
3050
|
-
setFromSlug(slug) {
|
|
3051
|
-
const target = this.removeAccents(String(slug).toLowerCase());
|
|
3052
|
-
const walk = (nodes) => {
|
|
3053
|
-
nodes.forEach(n => {
|
|
3054
|
-
// ADDED: iniciar sin selección explícita (asegura estado consistente)
|
|
3055
|
-
n.selected = false;
|
|
3056
|
-
const candidates = [
|
|
3057
|
-
n.slug,
|
|
3058
|
-
n.path && String(n.path).split('/').filter(Boolean).pop(),
|
|
3059
|
-
n.name
|
|
3060
|
-
]
|
|
3061
|
-
.filter(Boolean)
|
|
3062
|
-
.map((s) => this.removeAccents(s.toLowerCase()));
|
|
3063
|
-
if (candidates.includes(target)) {
|
|
3064
|
-
n.selected = true;
|
|
3065
|
-
}
|
|
3066
|
-
if (Array.isArray(n.children) && n.children.length) {
|
|
3067
|
-
walk(n.children);
|
|
3068
|
-
}
|
|
3069
|
-
});
|
|
3070
|
-
};
|
|
3071
|
-
walk(this.data);
|
|
3072
|
-
}
|
|
3073
|
-
/**
|
|
3074
|
-
* hydrateFromQuery
|
|
3075
|
-
* - Marca la categoría según el parámetro de query 'category' si existe.
|
|
3076
|
-
* - Busca el code exacto en la estructura y marca el nodo correspondiente.
|
|
3077
|
-
* - Loggea si se encontró o no la categoría.
|
|
3078
|
-
*/
|
|
3079
|
-
hydrateFromQuery(query) {
|
|
3080
|
-
const raw = query?.['category'];
|
|
3081
|
-
if (!raw)
|
|
3082
|
-
return;
|
|
3083
|
-
const code = String(raw).trim();
|
|
3084
|
-
if (!code)
|
|
3085
|
-
return;
|
|
3086
|
-
const mark = (nodes) => {
|
|
3087
|
-
let found = false;
|
|
3088
|
-
nodes.forEach(n => {
|
|
3089
|
-
if (n.code === code) {
|
|
3090
|
-
n.selected = true;
|
|
3091
|
-
found = true;
|
|
3092
|
-
}
|
|
3093
|
-
else {
|
|
3094
|
-
n.selected = false;
|
|
3095
|
-
}
|
|
3096
|
-
if (Array.isArray(n.children) && n.children.length) {
|
|
3097
|
-
if (mark(n.children))
|
|
3098
|
-
found = true;
|
|
3099
|
-
}
|
|
3100
|
-
});
|
|
3101
|
-
return found;
|
|
3102
|
-
};
|
|
3103
|
-
const ok = mark(this.data);
|
|
3104
|
-
}
|
|
3105
2784
|
}
|
|
3106
2785
|
|
|
3107
|
-
/**
|
|
3108
|
-
* AttributesFilter
|
|
3109
|
-
* - Gestiona el filtro de atributos (estructura de padres/children).
|
|
3110
|
-
* - Soporta hidratación desde query params y aplicación de códigos seleccionados.
|
|
3111
|
-
*/
|
|
3112
2786
|
class AttributesFilter extends Filter {
|
|
3113
2787
|
_optionsService = inject(OptionsService);
|
|
3114
2788
|
data = [];
|
|
3115
2789
|
multi = false;
|
|
3116
|
-
_codesFromQuery = null;
|
|
3117
2790
|
constructor(initialValue, options) {
|
|
3118
2791
|
super();
|
|
3119
2792
|
if (options) {
|
|
@@ -3121,6 +2794,7 @@ class AttributesFilter extends Filter {
|
|
|
3121
2794
|
}
|
|
3122
2795
|
else {
|
|
3123
2796
|
this._optionsService.getAttributes().subscribe(res => {
|
|
2797
|
+
//console.log(res);
|
|
3124
2798
|
this.setContent(res, initialValue);
|
|
3125
2799
|
});
|
|
3126
2800
|
}
|
|
@@ -3130,18 +2804,10 @@ class AttributesFilter extends Filter {
|
|
|
3130
2804
|
const attributes = this._optionsService.generateMenu(options);
|
|
3131
2805
|
attributes.forEach((filter) => filter = this.createElement(filter, options, initialValue));
|
|
3132
2806
|
this.data = attributes;
|
|
3133
|
-
// Si ya teníamos códigos de la URL guardados, aplicarlos ahora
|
|
3134
|
-
if (this._codesFromQuery && this._codesFromQuery.length) {
|
|
3135
|
-
// ADDED: Aplicar códigos guardados tras cargar la data.
|
|
3136
|
-
this.applyCodes(this._codesFromQuery);
|
|
3137
|
-
}
|
|
3138
2807
|
}
|
|
3139
2808
|
getContent() {
|
|
3140
2809
|
return this.data;
|
|
3141
2810
|
}
|
|
3142
|
-
/**
|
|
3143
|
-
* ADDED: toUrlParams construye la porción de query string que representa las selecciones de atributos.
|
|
3144
|
-
*/
|
|
3145
2811
|
toUrlParams(actual_url = '&attributeCodes=', sublist, already) {
|
|
3146
2812
|
let elements = sublist || this.data;
|
|
3147
2813
|
let aux_url = '';
|
|
@@ -3163,14 +2829,12 @@ class AttributesFilter extends Filter {
|
|
|
3163
2829
|
}
|
|
3164
2830
|
}
|
|
3165
2831
|
});
|
|
2832
|
+
//console.log(actual_url + aux_url);
|
|
3166
2833
|
return actual_url + aux_url;
|
|
3167
2834
|
}
|
|
3168
2835
|
;
|
|
3169
2836
|
cleanResult(text) { return text.replace('&attributeCodes=', ''); }
|
|
3170
2837
|
;
|
|
3171
|
-
/**
|
|
3172
|
-
* ADDED: createElement transforma cada nodo original en FilterElement y marca selección inicial si corresponde.
|
|
3173
|
-
*/
|
|
3174
2838
|
createElement(filter, original, initialValue) {
|
|
3175
2839
|
if (filter.type == 'sub') {
|
|
3176
2840
|
filter.multi = false;
|
|
@@ -3183,65 +2847,10 @@ class AttributesFilter extends Filter {
|
|
|
3183
2847
|
else {
|
|
3184
2848
|
filter.value = original.code;
|
|
3185
2849
|
filter.multi = false;
|
|
3186
|
-
filter.selected = (initialValue &&
|
|
3187
|
-
this.removeAccents(original.slug?.toLowerCase()) === this.removeAccents(initialValue?.toLowerCase()));
|
|
2850
|
+
filter.selected = (initialValue && this.removeAccents(original.slug?.toLowerCase()) == this.removeAccents(initialValue?.toLowerCase()));
|
|
3188
2851
|
}
|
|
3189
2852
|
return filter;
|
|
3190
2853
|
}
|
|
3191
|
-
/** hidratar desde la URL */
|
|
3192
|
-
hydrateFromQuery(params) {
|
|
3193
|
-
const raw = params['attributeCodes'];
|
|
3194
|
-
if (!raw) {
|
|
3195
|
-
// nada en la URL → limpió filtro
|
|
3196
|
-
this._codesFromQuery = null;
|
|
3197
|
-
this.clearSelection();
|
|
3198
|
-
return;
|
|
3199
|
-
}
|
|
3200
|
-
const codes = String(raw)
|
|
3201
|
-
.split('<and>')
|
|
3202
|
-
.map(c => c.trim())
|
|
3203
|
-
.filter(Boolean);
|
|
3204
|
-
if (!codes.length) {
|
|
3205
|
-
this._codesFromQuery = null;
|
|
3206
|
-
this.clearSelection();
|
|
3207
|
-
return;
|
|
3208
|
-
}
|
|
3209
|
-
this._codesFromQuery = codes;
|
|
3210
|
-
// Si ya tengo data cargada, aplico ahora;
|
|
3211
|
-
// si no, se aplicará en setContent().
|
|
3212
|
-
if (this.data && this.data.length) {
|
|
3213
|
-
// ADDED: Aplicar códigos inmediatamente porque la data ya está disponible.
|
|
3214
|
-
this.applyCodes(codes);
|
|
3215
|
-
}
|
|
3216
|
-
}
|
|
3217
|
-
/**
|
|
3218
|
-
* ADDED: applyCodes recorre la estructura y marca selected=true en los children cuyo código está en 'codes'.
|
|
3219
|
-
* Además marca el parent como seleccionado si alguno de sus hijos lo está.
|
|
3220
|
-
*/
|
|
3221
|
-
applyCodes(codes) {
|
|
3222
|
-
this.data?.forEach((parent) => {
|
|
3223
|
-
parent.selected = false;
|
|
3224
|
-
(parent.children || []).forEach((child) => {
|
|
3225
|
-
const code = child.code || child.value;
|
|
3226
|
-
const isSelected = codes.includes(code);
|
|
3227
|
-
child.selected = isSelected;
|
|
3228
|
-
if (isSelected) {
|
|
3229
|
-
parent.selected = true;
|
|
3230
|
-
}
|
|
3231
|
-
});
|
|
3232
|
-
});
|
|
3233
|
-
}
|
|
3234
|
-
/**
|
|
3235
|
-
* ADDED: clearSelection desmarca todos los parents y children (restablece el filtro).
|
|
3236
|
-
*/
|
|
3237
|
-
clearSelection() {
|
|
3238
|
-
this.data?.forEach((parent) => {
|
|
3239
|
-
parent.selected = false;
|
|
3240
|
-
(parent.children || []).forEach((child) => {
|
|
3241
|
-
child.selected = false;
|
|
3242
|
-
});
|
|
3243
|
-
});
|
|
3244
|
-
}
|
|
3245
2854
|
}
|
|
3246
2855
|
|
|
3247
2856
|
class DynamicsFilter extends Filter {
|
|
@@ -3402,8 +3011,8 @@ class PriceRangeFilter extends Filter {
|
|
|
3402
3011
|
if (options.minPrice != null && options.maxPrice != null) {
|
|
3403
3012
|
this.minPrice = options.minPrice;
|
|
3404
3013
|
this.maxPrice = options.maxPrice;
|
|
3405
|
-
this.currentMinPrice = options.currentMinPrice ??
|
|
3406
|
-
this.currentMaxPrice = options.currentMaxPrice ??
|
|
3014
|
+
this.currentMinPrice = options.currentMinPrice ?? this.minPrice;
|
|
3015
|
+
this.currentMaxPrice = options.currentMaxPrice ?? this.maxPrice;
|
|
3407
3016
|
this._loaded = true;
|
|
3408
3017
|
}
|
|
3409
3018
|
};
|
|
@@ -3448,13 +3057,9 @@ class FilterFactory {
|
|
|
3448
3057
|
create(filterType, productsFilter) {
|
|
3449
3058
|
switch (filterType) {
|
|
3450
3059
|
case 'categories':
|
|
3451
|
-
return new CategoryFilter(productsFilter
|
|
3452
|
-
? productsFilter.value
|
|
3453
|
-
: null);
|
|
3060
|
+
return new CategoryFilter(productsFilter ? (productsFilter.type == 'categories' && productsFilter.value) : null);
|
|
3454
3061
|
case 'attributes':
|
|
3455
|
-
return new AttributesFilter(productsFilter
|
|
3456
|
-
? productsFilter.value
|
|
3457
|
-
: null);
|
|
3062
|
+
return new AttributesFilter(productsFilter ? (productsFilter.type == 'attributes' && productsFilter.value) : null);
|
|
3458
3063
|
case 'dynamics':
|
|
3459
3064
|
return new DynamicsFilter();
|
|
3460
3065
|
case 'sort':
|
|
@@ -3693,7 +3298,7 @@ class AuthService {
|
|
|
3693
3298
|
return 'ok';
|
|
3694
3299
|
}
|
|
3695
3300
|
return 'error';
|
|
3696
|
-
}), catchError
|
|
3301
|
+
}), catchError((error) => {
|
|
3697
3302
|
this._loggingInSubject.next(false);
|
|
3698
3303
|
return throwError(() => error); // <-- Propaga el error real
|
|
3699
3304
|
}));
|
|
@@ -4066,7 +3671,6 @@ class FiltersService {
|
|
|
4066
3671
|
limit: 0
|
|
4067
3672
|
};
|
|
4068
3673
|
_filtersInitialized = false;
|
|
4069
|
-
_lastRouteQuery = null;
|
|
4070
3674
|
constructor() {
|
|
4071
3675
|
//this._defaultFilters = this._consts.getDefaultFilters()
|
|
4072
3676
|
}
|
|
@@ -4087,20 +3691,10 @@ class FiltersService {
|
|
|
4087
3691
|
let extra_params = '';
|
|
4088
3692
|
this._filtersSubject.value.forEach(filter => {
|
|
4089
3693
|
const extra = filter.toUrlParams();
|
|
4090
|
-
|
|
4091
|
-
extra_params += extra;
|
|
4092
|
-
}
|
|
3694
|
+
extra.split('=')[1] != '' ? extra_params += extra : null;
|
|
4093
3695
|
});
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
// aunque el AttributesFilter todavía no haya terminado de hidratarse.
|
|
4097
|
-
const attributeCodesFromRoute = this._lastRouteQuery?.['attributeCodes'];
|
|
4098
|
-
if (attributeCodesFromRoute && !extra_params.includes('attributeCodes=')) {
|
|
4099
|
-
extra_params += `&attributeCodes=${attributeCodesFromRoute}`;
|
|
4100
|
-
}
|
|
4101
|
-
if (search_value) {
|
|
4102
|
-
extra_params += '&criteria[search][type]=contains&criteria[search][value]=' + search_value;
|
|
4103
|
-
}
|
|
3696
|
+
if (search_value)
|
|
3697
|
+
extra_params += ('&criteria[search][type]=contains&criteria[search][value]=' + search_value);
|
|
4104
3698
|
return this.productsFilterApi(extra_params);
|
|
4105
3699
|
}
|
|
4106
3700
|
isUpdated(paginationSettings) {
|
|
@@ -4116,7 +3710,7 @@ class FiltersService {
|
|
|
4116
3710
|
this._paginationSettings = paginationSettings;
|
|
4117
3711
|
return change;
|
|
4118
3712
|
}
|
|
4119
|
-
setFilters(paginationSettings, search_value
|
|
3713
|
+
setFilters(paginationSettings, search_value) {
|
|
4120
3714
|
this._paginationSettings = paginationSettings;
|
|
4121
3715
|
let final_filters = [];
|
|
4122
3716
|
let filtersToProcess = this._optionsFilters?.includes('all')
|
|
@@ -4129,30 +3723,15 @@ class FiltersService {
|
|
|
4129
3723
|
if (filter) {
|
|
4130
3724
|
final_filters.push(filter);
|
|
4131
3725
|
}
|
|
3726
|
+
else {
|
|
3727
|
+
// console.warn(`❌ Failed to create filter for type: ${filterType}`);
|
|
3728
|
+
}
|
|
4132
3729
|
});
|
|
4133
3730
|
});
|
|
4134
3731
|
this._defaultFilters?.forEach(filterDefault => {
|
|
4135
3732
|
let filter = final_filters.find(filter => filter.type() == filterDefault.filter_type);
|
|
4136
3733
|
filter && filterDefault.codes.forEach(value => filter.setSelected(value));
|
|
4137
3734
|
});
|
|
4138
|
-
// hidratar price_range desde la URL
|
|
4139
|
-
if (routeQueryParams) {
|
|
4140
|
-
const pr = final_filters.find(f => f.type() === 'price_range');
|
|
4141
|
-
if (pr) {
|
|
4142
|
-
const rawMin = routeQueryParams['price_min'];
|
|
4143
|
-
const rawMax = routeQueryParams['price_max'];
|
|
4144
|
-
const min = rawMin != null ? Number(rawMin) : null;
|
|
4145
|
-
const max = rawMax != null ? Number(rawMax) : null;
|
|
4146
|
-
if ((min != null && !Number.isNaN(min)) || (max != null && !Number.isNaN(max))) {
|
|
4147
|
-
if (min != null && !Number.isNaN(min)) {
|
|
4148
|
-
pr.currentMinPrice = min;
|
|
4149
|
-
}
|
|
4150
|
-
if (max != null && !Number.isNaN(max)) {
|
|
4151
|
-
pr.currentMaxPrice = max;
|
|
4152
|
-
}
|
|
4153
|
-
}
|
|
4154
|
-
}
|
|
4155
|
-
}
|
|
4156
3735
|
this._filtersSubject.next(final_filters);
|
|
4157
3736
|
}
|
|
4158
3737
|
getFilters(paginationSettings) {
|
|
@@ -4167,7 +3746,9 @@ class FiltersService {
|
|
|
4167
3746
|
runInInjectionContext(this.environmentInjector, () => {
|
|
4168
3747
|
const filterFactory = new FilterFactory();
|
|
4169
3748
|
filtersToProcess?.forEach(filterType => {
|
|
3749
|
+
// console.log('Creating filter for type:', filterType);
|
|
4170
3750
|
const filter = filterFactory.create(filterType, settings);
|
|
3751
|
+
// console.log('Created filter:', filter);
|
|
4171
3752
|
if (filter) {
|
|
4172
3753
|
final_filters.push(filter);
|
|
4173
3754
|
}
|
|
@@ -4192,6 +3773,7 @@ class FiltersService {
|
|
|
4192
3773
|
if (filterObj.type() !== 'price_range') {
|
|
4193
3774
|
let index = final_filters.findIndex(filter => filter.type() == filterObj.type());
|
|
4194
3775
|
final_filters[index].setSelected(filterElem, filterElem.value || filterElem.code);
|
|
3776
|
+
console.log(index, final_filters);
|
|
4195
3777
|
}
|
|
4196
3778
|
this._filtersSubject.next(final_filters);
|
|
4197
3779
|
// }
|
|
@@ -4201,6 +3783,13 @@ class FiltersService {
|
|
|
4201
3783
|
runInInjectionContext(this.environmentInjector, () => {
|
|
4202
3784
|
const filterFactory = new FilterFactory();
|
|
4203
3785
|
const filter = [];
|
|
3786
|
+
/* claves.forEach((key:any) => {
|
|
3787
|
+
filter.push(filterFactory.create(key))
|
|
3788
|
+
paginationFilters[key].forEach((value:any) => {
|
|
3789
|
+
console.log(filter[0].createElement(value,paginationFilters[key]));
|
|
3790
|
+
})
|
|
3791
|
+
|
|
3792
|
+
}) */
|
|
4204
3793
|
this._filtersSubject.value.forEach((value) => {
|
|
4205
3794
|
if (value.type() == "attributes") {
|
|
4206
3795
|
//value.data = [];
|
|
@@ -4220,95 +3809,6 @@ class FiltersService {
|
|
|
4220
3809
|
pr.setSelected(min, max);
|
|
4221
3810
|
this._filtersSubject.next([...filters]);
|
|
4222
3811
|
}
|
|
4223
|
-
/**
|
|
4224
|
-
* Fuerza a emitir de nuevo los filtros actuales.
|
|
4225
|
-
* Útil cuando un filtro async (categorías, atributos) termina de cargarse
|
|
4226
|
-
* y necesitamos que PaginationService vuelva a armar la URL.
|
|
4227
|
-
*/
|
|
4228
|
-
refreshFilters() {
|
|
4229
|
-
const current = this._filtersSubject.value;
|
|
4230
|
-
// Emitimos una copia para que los subscribers detecten el cambio
|
|
4231
|
-
this._filtersSubject.next([...current]);
|
|
4232
|
-
}
|
|
4233
|
-
/**
|
|
4234
|
-
* Punto central donde se hidratan los filtros a partir de la URL:
|
|
4235
|
-
* - Lee type/value de la ruta (ej. /collection/categories/:value).
|
|
4236
|
-
* - Lee query params (category, price_min, price_max, attributeCodes, search, etc.).
|
|
4237
|
-
* - Crea instancias de filtros y les delega la hidratación específica.
|
|
4238
|
-
*
|
|
4239
|
-
* Este método se llama tanto en SSR como en navegador.
|
|
4240
|
-
*/
|
|
4241
|
-
hydrateFromRoute(paginationSettings, routeParams, routeQuery) {
|
|
4242
|
-
// hidratar search desde la URL ===
|
|
4243
|
-
const searchFromUrl = routeQuery?.['search'];
|
|
4244
|
-
if (typeof searchFromUrl === 'string' && searchFromUrl.trim() !== '') {
|
|
4245
|
-
// Guardamos el valor para que otros componentes (Header, Collection) lo reutilicen
|
|
4246
|
-
this._consts.searchValue = searchFromUrl.trim();
|
|
4247
|
-
}
|
|
4248
|
-
else {
|
|
4249
|
-
// Si no viene `search` en la URL, limpiamos el estado global para no arrastrar búsquedas viejas
|
|
4250
|
-
this._consts.searchValue = '';
|
|
4251
|
-
}
|
|
4252
|
-
// Guardamos la última query completa para usarla en generateFinalApi (parche attributeCodes)
|
|
4253
|
-
this._lastRouteQuery = routeQuery;
|
|
4254
|
-
// Guardamos las settings actuales (type, value, limit, etc.)
|
|
4255
|
-
this._paginationSettings = paginationSettings;
|
|
4256
|
-
// Creamos los filtros base (attributes, categories, dynamics, sort, price_range, etc.)
|
|
4257
|
-
let final_filters = [];
|
|
4258
|
-
let filtersToProcess = this._optionsFilters?.includes('all')
|
|
4259
|
-
? ['attributes', 'categories', 'dynamics', 'sort', 'price_range']
|
|
4260
|
-
: this._optionsFilters;
|
|
4261
|
-
runInInjectionContext(this.environmentInjector, () => {
|
|
4262
|
-
const filterFactory = new FilterFactory();
|
|
4263
|
-
filtersToProcess?.forEach(filterType => {
|
|
4264
|
-
const filter = filterFactory.create(filterType, paginationSettings);
|
|
4265
|
-
if (filter) {
|
|
4266
|
-
final_filters.push(filter);
|
|
4267
|
-
}
|
|
4268
|
-
});
|
|
4269
|
-
});
|
|
4270
|
-
// Aplicamos defaultFilters si corresponde
|
|
4271
|
-
this._defaultFilters?.forEach(filterDefault => {
|
|
4272
|
-
const filter = final_filters.find(f => f.type() === filterDefault.filter_type);
|
|
4273
|
-
filter && filterDefault.codes.forEach(value => filter.setSelected(value));
|
|
4274
|
-
});
|
|
4275
|
-
// Hidratar filtros con slug y query params genéricos
|
|
4276
|
-
final_filters.forEach(f => {
|
|
4277
|
-
const anyFilter = f;
|
|
4278
|
-
// type/value en la URL: /collection/categories/:value
|
|
4279
|
-
const urlType = routeParams['type'];
|
|
4280
|
-
const urlValue = routeParams['value'];
|
|
4281
|
-
// Por ejemplo, el CategoryFilter implementa setFromSlug para marcar la categoría correcta
|
|
4282
|
-
if (urlType === 'categories' && urlValue && typeof anyFilter.setFromSlug === 'function') {
|
|
4283
|
-
anyFilter.setFromSlug(urlValue);
|
|
4284
|
-
}
|
|
4285
|
-
// query params genéricos: ?category=0101&price_min=...&price_max=...&attributeCodes=...
|
|
4286
|
-
// Cada filtro que lo soporte implementa hydrateFromQuery y decide qué leer.
|
|
4287
|
-
if (typeof anyFilter.hydrateFromQuery === 'function') {
|
|
4288
|
-
anyFilter.hydrateFromQuery(routeQuery);
|
|
4289
|
-
}
|
|
4290
|
-
});
|
|
4291
|
-
// Hidratar específicamente el PriceRangeFilter desde la URL
|
|
4292
|
-
const priceFilter = final_filters.find((f) => f instanceof PriceRangeFilter);
|
|
4293
|
-
if (priceFilter && routeQuery) {
|
|
4294
|
-
const minFromUrl = routeQuery['price_min'];
|
|
4295
|
-
const maxFromUrl = routeQuery['price_max'];
|
|
4296
|
-
if (minFromUrl != null || maxFromUrl != null) {
|
|
4297
|
-
const min = minFromUrl != null ? Number(minFromUrl) : priceFilter.minPrice;
|
|
4298
|
-
const max = maxFromUrl != null ? Number(maxFromUrl) : priceFilter.maxPrice;
|
|
4299
|
-
// usamos la API del filtro para setear el rango
|
|
4300
|
-
priceFilter.setSelected(min, max);
|
|
4301
|
-
}
|
|
4302
|
-
else {
|
|
4303
|
-
// si no hay nada en la URL, lo reseteamos
|
|
4304
|
-
priceFilter.reset();
|
|
4305
|
-
}
|
|
4306
|
-
}
|
|
4307
|
-
// Emitimos filtros ya hidratados para que PaginationService y Collection reaccionen
|
|
4308
|
-
this._filtersSubject.next(final_filters);
|
|
4309
|
-
// Marcamos que el sistema de filtros está listo (útil para mostrar spinners, etc.)
|
|
4310
|
-
this._readySubject.next(true);
|
|
4311
|
-
}
|
|
4312
3812
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FiltersService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4313
3813
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FiltersService, providedIn: 'root' });
|
|
4314
3814
|
}
|
|
@@ -4320,55 +3820,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
4320
3820
|
}], ctorParameters: () => [] });
|
|
4321
3821
|
|
|
4322
3822
|
/**
|
|
4323
|
-
* Servicio para manejar la paginación
|
|
4324
|
-
*
|
|
4325
|
-
* Se encarga de:
|
|
4326
|
-
* - Escuchar los cambios en los filtros (categorías, atributos, precio, búsqueda, etc.).
|
|
4327
|
-
* - Construir la URL al backend con esos filtros.
|
|
4328
|
-
* - Pedir los productos al endpoint de product-search.
|
|
4329
|
-
* - Exponer un observable con la última página de productos (`paginationData$`)
|
|
4330
|
-
* y otros helpers (precio mínimo/máximo, siguiente página, etc.).
|
|
3823
|
+
* Servicio para manejar la paginación de los productos.
|
|
3824
|
+
* @class PaginationService
|
|
4331
3825
|
*/
|
|
4332
3826
|
class PaginationService {
|
|
4333
3827
|
_connectionService = inject(ConnectionService);
|
|
4334
3828
|
_filtersService = inject(FiltersService);
|
|
4335
3829
|
_constants = inject(CoreConstantsService);
|
|
4336
|
-
|
|
4337
|
-
* Flujo principal: a partir de los filtros → arma URL → consulta backend → devuelve productos.
|
|
4338
|
-
*
|
|
4339
|
-
* Pasos:
|
|
4340
|
-
* 1) Espera a que `FiltersService` emita filtros válidos.
|
|
4341
|
-
* 2) Construye la URL final con `buildUrl()`.
|
|
4342
|
-
* 3) Evita repetir llamadas si la URL no cambió (`distinctUntilChanged`).
|
|
4343
|
-
* 4) Llama al backend con `getData(url)`.
|
|
4344
|
-
* 5) Comparte el último resultado con todos los suscriptores (`shareReplay(1)`).
|
|
4345
|
-
*/
|
|
4346
|
-
paginationData$ = this._filtersService.filters$.pipe(tap$1(filters => {
|
|
4347
|
-
}), filter(filters => {
|
|
4348
|
-
if (!filters || !filters.length)
|
|
4349
|
-
return false;
|
|
4350
|
-
const categoryFilter = filters.find(f => f.type() === 'categories');
|
|
4351
|
-
const hasCategorySelected = !!categoryFilter?.getSelectedList()?.length;
|
|
4352
|
-
const isCategoryRoute = this._constants.currentRouteType === 'categories';
|
|
4353
|
-
// Si estamos en ruta de categorías y todavía no se marcó ninguna,
|
|
4354
|
-
// esperamos a que el CategoryFilter se hidrate antes de disparar la llamada.
|
|
4355
|
-
if (isCategoryRoute && !hasCategorySelected) {
|
|
4356
|
-
return false;
|
|
4357
|
-
}
|
|
4358
|
-
return true;
|
|
4359
|
-
}),
|
|
4360
|
-
// 2) Convertimos filtros -> URL
|
|
4361
|
-
map(filters => {
|
|
3830
|
+
paginationData$ = this._filtersService.filters$.pipe(shareReplay(1), filter(filters => filters && filters.length > 0), switchMap((filters) => {
|
|
4362
3831
|
const url = this.buildUrl(filters);
|
|
4363
|
-
return url;
|
|
4364
|
-
})
|
|
4365
|
-
// 3) Solo seguimos si la URL cambió respecto de la emisión anterior
|
|
4366
|
-
distinctUntilChanged(),
|
|
4367
|
-
// 4) Llamamos al backend con la URL construida
|
|
4368
|
-
tap$1(url => {
|
|
4369
|
-
}), switchMap(url => this.getData(url)),
|
|
4370
|
-
// 5) Reutilizar resultado si alguien más se suscribe (evita repetir la petición)
|
|
4371
|
-
shareReplay$1(1));
|
|
3832
|
+
return this.getData(url);
|
|
3833
|
+
}));
|
|
4372
3834
|
_dataPagination = signal({
|
|
4373
3835
|
attributes: [],
|
|
4374
3836
|
category: [],
|
|
@@ -4437,8 +3899,7 @@ class PaginationService {
|
|
|
4437
3899
|
this._dataPagination.set({ ...response, called: true });
|
|
4438
3900
|
this._finished = (response.page == response.pages);
|
|
4439
3901
|
this._waiting = false;
|
|
4440
|
-
// Emitir los valores de price_min y price_max a través de priceRangeSubject
|
|
4441
|
-
// para que otros componentes (ej. filtro de precio) puedan mostrarlos.
|
|
3902
|
+
// Emitir los valores de price_min y price_max a través de priceRangeSubject
|
|
4442
3903
|
this.priceRangeSubject.next({
|
|
4443
3904
|
price_min: response.price_min,
|
|
4444
3905
|
price_max: response.price_max
|
|
@@ -4498,36 +3959,27 @@ class PaginationService {
|
|
|
4498
3959
|
* @returns
|
|
4499
3960
|
*/
|
|
4500
3961
|
buildUrl(filters) {
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
3962
|
+
if (this._constants.searchValue) {
|
|
3963
|
+
return this._filtersService.generateFinalApi(this._constants.searchValue);
|
|
3964
|
+
}
|
|
3965
|
+
else {
|
|
3966
|
+
return this._filtersService.generateFinalApi();
|
|
3967
|
+
}
|
|
4505
3968
|
}
|
|
4506
3969
|
/**
|
|
4507
|
-
* Devuelve un observable de los productos que
|
|
3970
|
+
* Devuelve un observable de los productos que devolvio la última página obtenida.
|
|
4508
3971
|
* @param url
|
|
4509
3972
|
* @returns
|
|
4510
3973
|
*/
|
|
4511
3974
|
getData(url) {
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
this._resetSubject.next(true);
|
|
4518
|
-
this._nextProductsSubject.next([]);
|
|
4519
|
-
}
|
|
4520
|
-
// Llamamos al backend con el page correcto
|
|
4521
|
-
return this._connectionService.get(url, { limit: 10, page }).pipe(tap$1((res) => {
|
|
4522
|
-
// Actualizar datos de paginación + price_min/price_max
|
|
3975
|
+
this._resetSubject.next(true);
|
|
3976
|
+
this._nextProductsSubject.next([]);
|
|
3977
|
+
this._connectionService.get(url, { limit: 10, page: 1 }).pipe(map(res => {
|
|
3978
|
+
//console.log(res)
|
|
3979
|
+
this._nextProductsSubject.next(res.items);
|
|
4523
3980
|
res.links ? this.updatePageData(res) : this.finish(res);
|
|
4524
|
-
})
|
|
4525
|
-
|
|
4526
|
-
// Mantener nextProducts$ sincronizado (por compatibilidad)
|
|
4527
|
-
this._nextProductsSubject.next(items);
|
|
4528
|
-
// Lo que ve paginationData$ (switchMap) son estos items
|
|
4529
|
-
return items;
|
|
4530
|
-
}));
|
|
3981
|
+
})).subscribe();
|
|
3982
|
+
return this.nextProducts$;
|
|
4531
3983
|
}
|
|
4532
3984
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PaginationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4533
3985
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PaginationService, providedIn: 'root' });
|
|
@@ -4592,11 +4044,9 @@ class ProductsService {
|
|
|
4592
4044
|
* @param paginationSettings
|
|
4593
4045
|
* @param searchValue
|
|
4594
4046
|
*/
|
|
4595
|
-
getProductsForFilter(paginationSettings, searchValue
|
|
4047
|
+
getProductsForFilter(paginationSettings, searchValue) {
|
|
4596
4048
|
searchValue ? this.searchValue.set(searchValue) : this.searchValue.set('');
|
|
4597
|
-
|
|
4598
|
-
this._filtersService.setFilters(paginationSettings, searchValue, routeQueryParams);
|
|
4599
|
-
}
|
|
4049
|
+
paginationSettings && this._filtersService.setFilters(paginationSettings);
|
|
4600
4050
|
}
|
|
4601
4051
|
/**
|
|
4602
4052
|
* Actualiza los productos con los de la siguiente pagina.
|
|
@@ -5830,9 +5280,7 @@ class CheckoutService {
|
|
|
5830
5280
|
this.complete().then(res => {
|
|
5831
5281
|
if (res.ok) {
|
|
5832
5282
|
this._router.navigate(['checkout/order_success']);
|
|
5833
|
-
|
|
5834
|
-
window.scrollTo(0, 0);
|
|
5835
|
-
}
|
|
5283
|
+
window.scrollTo(0, 0);
|
|
5836
5284
|
}
|
|
5837
5285
|
else {
|
|
5838
5286
|
this._toastService.show('operation-error');
|
|
@@ -6453,148 +5901,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
6453
5901
|
}]
|
|
6454
5902
|
}] });
|
|
6455
5903
|
|
|
6456
|
-
/**
|
|
6457
|
-
* Servicio base para realizar peticiones HTTP usando configuración dinámica
|
|
6458
|
-
* Todos los servicios de la aplicación deben extender este servicio o usar sus métodos
|
|
6459
|
-
*/
|
|
6460
|
-
class BaseApiService {
|
|
6461
|
-
http;
|
|
6462
|
-
runtimeConfigService;
|
|
6463
|
-
constructor(http, runtimeConfigService) {
|
|
6464
|
-
this.http = http;
|
|
6465
|
-
this.runtimeConfigService = runtimeConfigService;
|
|
6466
|
-
}
|
|
6467
|
-
/**
|
|
6468
|
-
* Construye una URL completa usando la API_URL del runtime
|
|
6469
|
-
*/
|
|
6470
|
-
buildApiUrl(endpoint) {
|
|
6471
|
-
return this.runtimeConfigService.buildApiUrl(endpoint);
|
|
6472
|
-
}
|
|
6473
|
-
/**
|
|
6474
|
-
* Obtiene headers comunes que incluyen información del runtime
|
|
6475
|
-
*/
|
|
6476
|
-
getCommonHeaders() {
|
|
6477
|
-
const config = this.runtimeConfigService.getConfig();
|
|
6478
|
-
let headers = new HttpHeaders({
|
|
6479
|
-
'Content-Type': 'application/json'
|
|
6480
|
-
});
|
|
6481
|
-
if (config) {
|
|
6482
|
-
headers = headers
|
|
6483
|
-
.set('X-Channel', config.channel)
|
|
6484
|
-
.set('X-Locale', config.locale)
|
|
6485
|
-
.set('X-Environment', config.appEnv);
|
|
6486
|
-
}
|
|
6487
|
-
return headers;
|
|
6488
|
-
}
|
|
6489
|
-
/**
|
|
6490
|
-
* Método GET genérico
|
|
6491
|
-
*/
|
|
6492
|
-
get(endpoint, options = {}) {
|
|
6493
|
-
const url = this.buildApiUrl(endpoint);
|
|
6494
|
-
const headers = this.mergeHeaders(options.headers);
|
|
6495
|
-
return this.http.get(url, {
|
|
6496
|
-
...options,
|
|
6497
|
-
headers
|
|
6498
|
-
});
|
|
6499
|
-
}
|
|
6500
|
-
/**
|
|
6501
|
-
* Método POST genérico
|
|
6502
|
-
*/
|
|
6503
|
-
post(endpoint, data, options = {}) {
|
|
6504
|
-
const url = this.buildApiUrl(endpoint);
|
|
6505
|
-
const headers = this.mergeHeaders(options.headers);
|
|
6506
|
-
return this.http.post(url, data, {
|
|
6507
|
-
...options,
|
|
6508
|
-
headers
|
|
6509
|
-
});
|
|
6510
|
-
}
|
|
6511
|
-
/**
|
|
6512
|
-
* Método PUT genérico
|
|
6513
|
-
*/
|
|
6514
|
-
put(endpoint, data, options = {}) {
|
|
6515
|
-
const url = this.buildApiUrl(endpoint);
|
|
6516
|
-
const headers = this.mergeHeaders(options.headers);
|
|
6517
|
-
return this.http.put(url, data, {
|
|
6518
|
-
...options,
|
|
6519
|
-
headers
|
|
6520
|
-
});
|
|
6521
|
-
}
|
|
6522
|
-
/**
|
|
6523
|
-
* Método PATCH genérico
|
|
6524
|
-
*/
|
|
6525
|
-
patch(endpoint, data, options = {}) {
|
|
6526
|
-
const url = this.buildApiUrl(endpoint);
|
|
6527
|
-
const headers = this.mergeHeaders(options.headers);
|
|
6528
|
-
return this.http.patch(url, data, {
|
|
6529
|
-
...options,
|
|
6530
|
-
headers
|
|
6531
|
-
});
|
|
6532
|
-
}
|
|
6533
|
-
/**
|
|
6534
|
-
* Método DELETE genérico
|
|
6535
|
-
*/
|
|
6536
|
-
delete(endpoint, options = {}) {
|
|
6537
|
-
const url = this.buildApiUrl(endpoint);
|
|
6538
|
-
const headers = this.mergeHeaders(options.headers);
|
|
6539
|
-
return this.http.delete(url, {
|
|
6540
|
-
...options,
|
|
6541
|
-
headers
|
|
6542
|
-
});
|
|
6543
|
-
}
|
|
6544
|
-
/**
|
|
6545
|
-
* Método para peticiones que necesitan esperar a que la config esté cargada
|
|
6546
|
-
*/
|
|
6547
|
-
getWithConfig(endpoint, options = {}) {
|
|
6548
|
-
return this.runtimeConfigService.config$.pipe(switchMap(config => {
|
|
6549
|
-
if (!config) {
|
|
6550
|
-
throw new Error('Runtime config not loaded');
|
|
6551
|
-
}
|
|
6552
|
-
return this.get(endpoint, options);
|
|
6553
|
-
}));
|
|
6554
|
-
}
|
|
6555
|
-
/**
|
|
6556
|
-
* Método para POST que necesitan esperar a que la config esté cargada
|
|
6557
|
-
*/
|
|
6558
|
-
postWithConfig(endpoint, data, options = {}) {
|
|
6559
|
-
return this.runtimeConfigService.config$.pipe(switchMap(config => {
|
|
6560
|
-
if (!config) {
|
|
6561
|
-
throw new Error('Runtime config not loaded');
|
|
6562
|
-
}
|
|
6563
|
-
return this.post(endpoint, data, options);
|
|
6564
|
-
}));
|
|
6565
|
-
}
|
|
6566
|
-
/**
|
|
6567
|
-
* Combina headers personalizados con los headers comunes
|
|
6568
|
-
*/
|
|
6569
|
-
mergeHeaders(customHeaders) {
|
|
6570
|
-
let headers = this.getCommonHeaders();
|
|
6571
|
-
if (customHeaders) {
|
|
6572
|
-
if (customHeaders instanceof HttpHeaders) {
|
|
6573
|
-
customHeaders.keys().forEach(key => {
|
|
6574
|
-
const values = customHeaders.getAll(key);
|
|
6575
|
-
if (values) {
|
|
6576
|
-
headers = headers.set(key, values);
|
|
6577
|
-
}
|
|
6578
|
-
});
|
|
6579
|
-
}
|
|
6580
|
-
else {
|
|
6581
|
-
Object.keys(customHeaders).forEach(key => {
|
|
6582
|
-
headers = headers.set(key, customHeaders[key]);
|
|
6583
|
-
});
|
|
6584
|
-
}
|
|
6585
|
-
}
|
|
6586
|
-
return headers;
|
|
6587
|
-
}
|
|
6588
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BaseApiService, deps: [{ token: i1.HttpClient }, { token: RuntimeConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6589
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BaseApiService, providedIn: 'root' });
|
|
6590
|
-
}
|
|
6591
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BaseApiService, decorators: [{
|
|
6592
|
-
type: Injectable,
|
|
6593
|
-
args: [{
|
|
6594
|
-
providedIn: 'root'
|
|
6595
|
-
}]
|
|
6596
|
-
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: RuntimeConfigService }] });
|
|
6597
|
-
|
|
6598
5904
|
/**
|
|
6599
5905
|
* Componente que sirve para abstraer la funcionalidad que comparten
|
|
6600
5906
|
* el menú y el footer.
|
|
@@ -6708,22 +6014,6 @@ class MenuEcComponent {
|
|
|
6708
6014
|
hasVisibleProperty(category) {
|
|
6709
6015
|
return category.isVisible === true;
|
|
6710
6016
|
}
|
|
6711
|
-
filterVisibleTree(list) {
|
|
6712
|
-
return (list ?? [])
|
|
6713
|
-
.filter((n) => n?.isVisible === true)
|
|
6714
|
-
.map(n => ({ ...n, children: this.filterVisibleTree(n.children) }));
|
|
6715
|
-
}
|
|
6716
|
-
// Exponé streams ya filtrados
|
|
6717
|
-
categoriesVisible$ = this.categories$.pipe(map((list) => this.filterVisibleTree(list)));
|
|
6718
|
-
sectionsVisible$ = this.sections$.pipe(map((list) => this.filterVisibleTree(list)));
|
|
6719
|
-
attributesVisible$ = this.attributes$.pipe(map((list) => this.filterVisibleTree(list)));
|
|
6720
|
-
// Helpers de conveniencia opcionales
|
|
6721
|
-
getVisibleChildren(node) {
|
|
6722
|
-
return this.filterVisibleTree(node?.children);
|
|
6723
|
-
}
|
|
6724
|
-
hasVisibleChildren(node) {
|
|
6725
|
-
return this.getVisibleChildren(node).length > 0;
|
|
6726
|
-
}
|
|
6727
6017
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MenuEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6728
6018
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MenuEcComponent, isStandalone: true, selector: "lib-footer-ec", ngImport: i0, template: '<p>Menu and Footer Helper Component</p>', isInline: true });
|
|
6729
6019
|
}
|
|
@@ -6881,8 +6171,10 @@ class HeaderEcComponent extends MenuEcComponent {
|
|
|
6881
6171
|
constructor() {
|
|
6882
6172
|
super();
|
|
6883
6173
|
this._channelService.channel$.subscribe(cfg => {
|
|
6174
|
+
// console.log('Channel configuration:', cfg);
|
|
6884
6175
|
this.showPricesOnlyToLoggedUsers = !!cfg.showPricesOnlyToLoggedUsers;
|
|
6885
6176
|
this.hidePrices = !!cfg.hidePrices;
|
|
6177
|
+
// console.log('hidePrices:', this.hidePrices);
|
|
6886
6178
|
});
|
|
6887
6179
|
}
|
|
6888
6180
|
coreConstantsService = inject(CoreConstantsService);
|
|
@@ -6890,7 +6182,6 @@ class HeaderEcComponent extends MenuEcComponent {
|
|
|
6890
6182
|
cdr = inject(ChangeDetectorRef); // Inyectamos ChangeDetectorRef para forzar la actualización
|
|
6891
6183
|
ngOnInit() {
|
|
6892
6184
|
this.channel = this.coreConstantsService.getChannel();
|
|
6893
|
-
this.searchValue = this.coreConstantsService.searchValue || '';
|
|
6894
6185
|
this.onWindowScroll();
|
|
6895
6186
|
this.detectRouteChange(); // Llamamos a la función que detecta el cambio de ruta
|
|
6896
6187
|
// Usar el Observable del AuthService
|
|
@@ -6927,21 +6218,17 @@ class HeaderEcComponent extends MenuEcComponent {
|
|
|
6927
6218
|
});
|
|
6928
6219
|
}
|
|
6929
6220
|
onWindowScroll() {
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
this.isScrolled = scrollTop > 80;
|
|
6933
|
-
}
|
|
6221
|
+
const scrollTop = window.scrollY;
|
|
6222
|
+
this.isScrolled = scrollTop > 80;
|
|
6934
6223
|
}
|
|
6935
6224
|
isHomeFunction() {
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
if (
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
headerElement.classList.remove('show-menu');
|
|
6944
|
-
}
|
|
6225
|
+
const headerElement = document.querySelector('header');
|
|
6226
|
+
if (headerElement) {
|
|
6227
|
+
if (this.router.url !== '/home') {
|
|
6228
|
+
headerElement.classList.add('show-menu');
|
|
6229
|
+
}
|
|
6230
|
+
else {
|
|
6231
|
+
headerElement.classList.remove('show-menu');
|
|
6945
6232
|
}
|
|
6946
6233
|
}
|
|
6947
6234
|
}
|
|
@@ -6965,38 +6252,27 @@ class HeaderEcComponent extends MenuEcComponent {
|
|
|
6965
6252
|
}
|
|
6966
6253
|
};
|
|
6967
6254
|
borrarInput(inputId) {
|
|
6968
|
-
if (
|
|
6969
|
-
|
|
6970
|
-
|
|
6255
|
+
if (inputId) {
|
|
6256
|
+
const input = document.getElementById(inputId);
|
|
6257
|
+
if (input) {
|
|
6258
|
+
input.value = '';
|
|
6259
|
+
}
|
|
6260
|
+
}
|
|
6261
|
+
else {
|
|
6262
|
+
const inputs = ['searchInput1'];
|
|
6263
|
+
inputs.forEach((id) => {
|
|
6264
|
+
const input = document.getElementById(id);
|
|
6971
6265
|
if (input) {
|
|
6972
6266
|
input.value = '';
|
|
6973
6267
|
}
|
|
6974
|
-
}
|
|
6975
|
-
else {
|
|
6976
|
-
const inputs = ['searchInput1'];
|
|
6977
|
-
inputs.forEach((id) => {
|
|
6978
|
-
const input = document.getElementById(id);
|
|
6979
|
-
if (input) {
|
|
6980
|
-
input.value = '';
|
|
6981
|
-
}
|
|
6982
|
-
});
|
|
6983
|
-
}
|
|
6268
|
+
});
|
|
6984
6269
|
}
|
|
6985
6270
|
this.searchValue = '';
|
|
6986
6271
|
this.coreConstantsService.searchValue = '';
|
|
6987
|
-
|
|
6988
|
-
// actualizamos la URL para quitar el query param `search` y resetear la paginación.
|
|
6989
|
-
this.router.navigate(['/collection'], {
|
|
6990
|
-
queryParams: {
|
|
6991
|
-
search: null,
|
|
6992
|
-
page: null
|
|
6993
|
-
},
|
|
6994
|
-
queryParamsHandling: 'merge'
|
|
6995
|
-
});
|
|
6272
|
+
this.getCollectionSearch();
|
|
6996
6273
|
}
|
|
6997
6274
|
setupMobileMenu() {
|
|
6998
|
-
|
|
6999
|
-
return;
|
|
6275
|
+
// console.log('setupMobileMenu called');
|
|
7000
6276
|
const menuMobile = document.querySelector('.menuMobile');
|
|
7001
6277
|
if (!(menuMobile instanceof HTMLElement))
|
|
7002
6278
|
return;
|
|
@@ -7031,8 +6307,6 @@ class HeaderEcComponent extends MenuEcComponent {
|
|
|
7031
6307
|
});
|
|
7032
6308
|
}
|
|
7033
6309
|
setupSearchInputs() {
|
|
7034
|
-
if (!isPlatformBrowser(this.platformId) || typeof document === 'undefined')
|
|
7035
|
-
return;
|
|
7036
6310
|
const inputs = ['searchInput1', 'searchInput2'];
|
|
7037
6311
|
inputs.forEach(id => {
|
|
7038
6312
|
const input = document.getElementById(id);
|
|
@@ -7301,7 +6575,7 @@ class BlockBannerFullEcComponent extends BlockEcComponent {
|
|
|
7301
6575
|
};
|
|
7302
6576
|
}
|
|
7303
6577
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BlockBannerFullEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7304
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BlockBannerFullEcComponent, isStandalone: true, selector: "app-block-banner-full-ec", inputs: { banners: "banners", meta: "meta", prevArrowImage: "prevArrowImage", nextArrowImage: "nextArrowImage", prevArrowText: "prevArrowText", nextArrowText: "nextArrowText", enableCustomNavigation: "enableCustomNavigation" }, usesInheritance: true, ngImport: i0, template: "@if(banners.length > 0) {\n <section [ngClass]=\"trimClassBlock(meta?.code)+' container-fluid px-0'\"\n [style.background-color]=\"meta.styles?.backgroundColor\"\n [style.background-image]=\"meta.styles?.backgroundImage ? 'url(' + mediaUrl + meta.styles?.backgroundImage +')' : 'inherit'\">\n\n @if (banners.length == 1) {\n <!-- si es formato fijo -->\n <div class=\"row justify-content-center\">\n @let banner = banners[0];\n @if(!banners.styles?.button?.text){\n <!-- banner sin boton -->\n <a [href]=\"banner.url\" >\n <div class=\"item col-12\">\n <img class=\"img-fluid\" [src]=\"mediaBannerUrl + getImage(banner)\" alt=\"\">\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n @if(banner.title){\n <h2 [class]=\"'item-title-full px-2 item-position-vertical-' + (banner.styles?.description?.position)\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#fff' \">\n {{banner.title}}\n </h2>\n }\n @if(banner.subtitle){\n <p [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n }\n </div>\n </div>\n </a>\n }@else {\n <!-- banner fijo con boton -->\n <div class=\"item col-12\">\n <img class=\"img-fluid\" [src]=\"mediaBannerUrl + getImage(banner)\" alt=\"\">\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n @if(banner.title){\n <h2 [class]=\"'item-title-full px-2 item-position-vertical-' + (banner.styles?.description?.position)\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \">\n {{banner.title}}\n </h2>\n }\n @if(banner.subtitle){\n <p \n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n <div [class]=\"'item-position-vertical-' + (banner.styles?.button?.position)\">\n @if(banner.styles?.button?.text){\n <a href=\"{{banner.url}}\"\n [class]=\"'item-button-full btn btn-light '\">\n {{banner.styles.button.text}}\n </a> \n }\n \n </div>\n }\n </div>\n </div>\n }\n </div>\n }@else {\n <!-- si es carrousel -->\n <!-- @if(swiperElement() != null){ -->\n <swiper-container init=\"false\" [id]=\"meta?.code\">\n @for (banner of banners; track $index) {\n <swiper-slide>\n <div class=\"item\">\n @if (!banner.styles?.button?.text) {\n <!-- banner sin boton -->\n @if(banner.url){\n <a [href]=\"banner.url\" class=\"\">\n <img [src]=\"mediaBannerUrl + getImage(banner)\" alt=\"\" class=\"img-fluid w-100\" />\n </a>\n }@else {\n <img [src]=\"mediaBannerUrl + getImage(banner)\" alt=\"\" class=\"img-fluid w-100\" />\n }\n }@else {\n <!-- banner con boton -->\n <img [src]=\"mediaBannerUrl + getImage(banner)\" alt=\"\" />\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n @if(banner.title){\n <h2 [class]=\"'item-title-full px-2 item-position-vertical-'+ (banner.styles?.description?.position)\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \">\n {{banner.title}}\n </h2>\n }\n @if(banner.subtitle){\n <p [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n }\n <div [class]=\"'item-position-vertical-' + (banner.styles?.button?.position)\">\n @if(banner.styles?.button?.text){\n <a href=\"{{banner.url}}\" [class]=\"'item-button-full btn btn-light'\">\n {{banner.styles.button.text}}\n </a>\n }\n </div>\n </div>\n }\n </div>\n </swiper-slide>\n }\n </swiper-container>\n <!-- } -->\n \n }\n </section>\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1
|
|
6578
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BlockBannerFullEcComponent, isStandalone: true, selector: "app-block-banner-full-ec", inputs: { banners: "banners", meta: "meta", prevArrowImage: "prevArrowImage", nextArrowImage: "nextArrowImage", prevArrowText: "prevArrowText", nextArrowText: "nextArrowText", enableCustomNavigation: "enableCustomNavigation" }, usesInheritance: true, ngImport: i0, template: "@if(banners.length > 0) {\n <section [ngClass]=\"trimClassBlock(meta?.code)+' container-fluid px-0'\"\n [style.background-color]=\"meta.styles?.backgroundColor\"\n [style.background-image]=\"meta.styles?.backgroundImage ? 'url(' + mediaUrl + meta.styles?.backgroundImage +')' : 'inherit'\">\n\n @if (banners.length == 1) {\n <!-- si es formato fijo -->\n <div class=\"row justify-content-center\">\n @let banner = banners[0];\n @if(!banners.styles?.button?.text){\n <!-- banner sin boton -->\n <a [href]=\"banner.url\" >\n <div class=\"item col-12\">\n <img class=\"img-fluid\" [src]=\"mediaBannerUrl + getImage(banner)\" alt=\"\">\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n @if(banner.title){\n <h2 [class]=\"'item-title-full px-2 item-position-vertical-' + (banner.styles?.description?.position)\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#fff' \">\n {{banner.title}}\n </h2>\n }\n @if(banner.subtitle){\n <p [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n }\n </div>\n </div>\n </a>\n }@else {\n <!-- banner fijo con boton -->\n <div class=\"item col-12\">\n <img class=\"img-fluid\" [src]=\"mediaBannerUrl + getImage(banner)\" alt=\"\">\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n @if(banner.title){\n <h2 [class]=\"'item-title-full px-2 item-position-vertical-' + (banner.styles?.description?.position)\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \">\n {{banner.title}}\n </h2>\n }\n @if(banner.subtitle){\n <p \n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n <div [class]=\"'item-position-vertical-' + (banner.styles?.button?.position)\">\n @if(banner.styles?.button?.text){\n <a href=\"{{banner.url}}\"\n [class]=\"'item-button-full btn btn-light '\">\n {{banner.styles.button.text}}\n </a> \n }\n \n </div>\n }\n </div>\n </div>\n }\n </div>\n }@else {\n <!-- si es carrousel -->\n <!-- @if(swiperElement() != null){ -->\n <swiper-container init=\"false\" [id]=\"meta?.code\">\n @for (banner of banners; track $index) {\n <swiper-slide>\n <div class=\"item\">\n @if (!banner.styles?.button?.text) {\n <!-- banner sin boton -->\n @if(banner.url){\n <a [href]=\"banner.url\" class=\"\">\n <img [src]=\"mediaBannerUrl + getImage(banner)\" alt=\"\" class=\"img-fluid w-100\" />\n </a>\n }@else {\n <img [src]=\"mediaBannerUrl + getImage(banner)\" alt=\"\" class=\"img-fluid w-100\" />\n }\n }@else {\n <!-- banner con boton -->\n <img [src]=\"mediaBannerUrl + getImage(banner)\" alt=\"\" />\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n @if(banner.title){\n <h2 [class]=\"'item-title-full px-2 item-position-vertical-'+ (banner.styles?.description?.position)\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \">\n {{banner.title}}\n </h2>\n }\n @if(banner.subtitle){\n <p [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n }\n <div [class]=\"'item-position-vertical-' + (banner.styles?.button?.position)\">\n @if(banner.styles?.button?.text){\n <a href=\"{{banner.url}}\" [class]=\"'item-button-full btn btn-light'\">\n {{banner.styles.button.text}}\n </a>\n }\n </div>\n </div>\n }\n </div>\n </swiper-slide>\n }\n </swiper-container>\n <!-- } -->\n \n }\n </section>\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
7305
6579
|
}
|
|
7306
6580
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BlockBannerFullEcComponent, decorators: [{
|
|
7307
6581
|
type: Component,
|
|
@@ -7412,7 +6686,7 @@ class BlockBannerBoxEcComponent extends BlockEcComponent {
|
|
|
7412
6686
|
}
|
|
7413
6687
|
boxesInlcudesCode = (box) => this.meta.code.toUpperCase().includes(box.toUpperCase());
|
|
7414
6688
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BlockBannerBoxEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7415
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BlockBannerBoxEcComponent, isStandalone: true, selector: "app-block-banner-box-ec", inputs: { banners: "banners", meta: "meta" }, usesInheritance: true, ngImport: i0, template: "@if(banners.length){\n <section [ngClass]=\"trimClassBlock(meta.code) + ' container'\" \n [style.background-color]=\"meta.styles?.backgroundColor\"\n [style.background-image]=\"meta.styles?.backgroundImage ? 'url(' + mediaUrl + meta.styles?.backgroundImage +')' : 'inherit'\">\n\n <div class=\"block-boxes\">\n @if(meta.name){\n <div class=\"row\">\n a\n <div class=\"col-12 mt-4\">\n <h2 class=\"font-weight-normal font-gd\">\n <span>{{meta.name}}</span>\n </h2>\n </div>\n </div> \n }\n \n @if(meta.styles && meta.styles.carrousel == false){\n <!-- Si es formato fijo -->\n <div class=\"banner-content\">\n <div class=\"row g-0\">\n @for (banner of banners; track $index) {\n <div [ngClass]=\"'item '+'col-md-6 '+'col-lg-'+(12/banners.length) \" [id]=\"$index\">\n <img class=\"img-fluid\" [src]=\" mediaBannerUrl+getImage(banner)\" alt=\"\" />\n <div class=\"position-absolute w-100 top-0 start-0 h-100\">\n <h2 [ngClass]=\"'item-title px-2 item-position-vertical-'+ (banner.styles?.description?.position)\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000'\">\n {{banner.title}}\n </h2>\n @if(banner.subtitle){\n <p [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n }\n </div>\n <div [class]=\"'item-position-vertical-' + (banner.styles?.button?.position)\">\n @if(banner.styles?.button?.text){\n <a href=\"{{banner.url}}\" [class]=\"'item-button btn btn-light'\">\n {{banner.styles.button.text}}\n </a>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }@else {\n <!-- Si es Carrousel -->\n <swiper-container init=\"false\" [id]=\"meta?.code\">\n @for (banner of banners; track $index) {\n <!-- Si es de Categorias -->\n @if (banner.taxons[0]) {\n <swiper-slide>\n\n <a class=\"banner-content carrousel item\" (click)='redirectRoute(banner.taxons[0].slug)' [routerLink]=\"['/collection/categories/', banner.taxons[0].slug]\" routerLinkActive=\"router-link-active\" style=\"text-decoration: none; cursor: pointer; background-color: white;\">\n <div class=\"image-container\">\n <img [src]=\"mediaBannerUrl+getImage(banner)\" alt=\"Banner Image\" class=\"banner-image\">\n </div>\n @if(banner.title){\n <h2 [class]=\"'box-text item-title-full px-2 item-position-vertical-'+ (banner.styles?.description?.position)\"\n style=\"color:#fff\">\n {{banner.title}}\n </h2>\n }\n @if(banner.taxons && banner.taxons.length){\n <h5 class=\"item-subtitle-full item-position-vertical-center text-center box-text\">\n {{banner.translations.es_AR.title}}\n </h5>\n }\n @if(banner.subtitle){\n <p [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'box-text px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n }\n </a>\n </swiper-slide>\n } @else {\n <swiper-slide>\n\n <a class=\"banner-content carrousel item\" style=\"cursor: pointer;\">\n <div class=\"image-container\">\n <img [src]=\"mediaBannerUrl+getImage(banner)\" alt=\"Banner Image\" class=\"banner-image\">\n </div>\n @if(banner.title){\n <h2 [class]=\"'box-text item-title-full px-2 item-position-vertical-'+ (banner.styles?.description?.position)\"\n style=\"color:#fff\">\n {{banner.title}}\n </h2>\n }\n @if(banner.taxons && banner.taxons.length){\n <h5 class=\"item-subtitle-full item-position-vertical-center text-center box-text\">\n {{banner.translations.es_AR.title}}\n </h5>\n }\n @if(banner.subtitle){\n <p [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'box-text px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n }\n </a>\n </swiper-slide>\n }\n \n }\n </swiper-container> \n }\n </div>\n\n </section>\n}", styles: ["@charset \"UTF-8\";.banner-container{text-align:center}.banner-image{display:block;margin:0 auto}.item-subtitle-full{margin-top:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1
|
|
6689
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BlockBannerBoxEcComponent, isStandalone: true, selector: "app-block-banner-box-ec", inputs: { banners: "banners", meta: "meta" }, usesInheritance: true, ngImport: i0, template: "@if(banners.length){\n <section [ngClass]=\"trimClassBlock(meta.code) + ' container'\" \n [style.background-color]=\"meta.styles?.backgroundColor\"\n [style.background-image]=\"meta.styles?.backgroundImage ? 'url(' + mediaUrl + meta.styles?.backgroundImage +')' : 'inherit'\">\n\n <div class=\"block-boxes\">\n @if(meta.name){\n <div class=\"row\">\n a\n <div class=\"col-12 mt-4\">\n <h2 class=\"font-weight-normal font-gd\">\n <span>{{meta.name}}</span>\n </h2>\n </div>\n </div> \n }\n \n @if(meta.styles && meta.styles.carrousel == false){\n <!-- Si es formato fijo -->\n <div class=\"banner-content\">\n <div class=\"row g-0\">\n @for (banner of banners; track $index) {\n <div [ngClass]=\"'item '+'col-md-6 '+'col-lg-'+(12/banners.length) \" [id]=\"$index\">\n <img class=\"img-fluid\" [src]=\" mediaBannerUrl+getImage(banner)\" alt=\"\" />\n <div class=\"position-absolute w-100 top-0 start-0 h-100\">\n <h2 [ngClass]=\"'item-title px-2 item-position-vertical-'+ (banner.styles?.description?.position)\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000'\">\n {{banner.title}}\n </h2>\n @if(banner.subtitle){\n <p [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n }\n </div>\n <div [class]=\"'item-position-vertical-' + (banner.styles?.button?.position)\">\n @if(banner.styles?.button?.text){\n <a href=\"{{banner.url}}\" [class]=\"'item-button btn btn-light'\">\n {{banner.styles.button.text}}\n </a>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }@else {\n <!-- Si es Carrousel -->\n <swiper-container init=\"false\" [id]=\"meta?.code\">\n @for (banner of banners; track $index) {\n <!-- Si es de Categorias -->\n @if (banner.taxons[0]) {\n <swiper-slide>\n\n <a class=\"banner-content carrousel item\" (click)='redirectRoute(banner.taxons[0].slug)' [routerLink]=\"['/collection/categories/', banner.taxons[0].slug]\" routerLinkActive=\"router-link-active\" style=\"text-decoration: none; cursor: pointer; background-color: white;\">\n <div class=\"image-container\">\n <img [src]=\"mediaBannerUrl+getImage(banner)\" alt=\"Banner Image\" class=\"banner-image\">\n </div>\n @if(banner.title){\n <h2 [class]=\"'box-text item-title-full px-2 item-position-vertical-'+ (banner.styles?.description?.position)\"\n style=\"color:#fff\">\n {{banner.title}}\n </h2>\n }\n @if(banner.taxons && banner.taxons.length){\n <h5 class=\"item-subtitle-full item-position-vertical-center text-center box-text\">\n {{banner.translations.es_AR.title}}\n </h5>\n }\n @if(banner.subtitle){\n <p [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'box-text px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n }\n </a>\n </swiper-slide>\n } @else {\n <swiper-slide>\n\n <a class=\"banner-content carrousel item\" style=\"cursor: pointer;\">\n <div class=\"image-container\">\n <img [src]=\"mediaBannerUrl+getImage(banner)\" alt=\"Banner Image\" class=\"banner-image\">\n </div>\n @if(banner.title){\n <h2 [class]=\"'box-text item-title-full px-2 item-position-vertical-'+ (banner.styles?.description?.position)\"\n style=\"color:#fff\">\n {{banner.title}}\n </h2>\n }\n @if(banner.taxons && banner.taxons.length){\n <h5 class=\"item-subtitle-full item-position-vertical-center text-center box-text\">\n {{banner.translations.es_AR.title}}\n </h5>\n }\n @if(banner.subtitle){\n <p [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'box-text px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n }\n </a>\n </swiper-slide>\n }\n \n }\n </swiper-container> \n }\n </div>\n\n </section>\n}", styles: ["@charset \"UTF-8\";.banner-container{text-align:center}.banner-image{display:block;margin:0 auto}.item-subtitle-full{margin-top:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
|
|
7416
6690
|
}
|
|
7417
6691
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BlockBannerBoxEcComponent, decorators: [{
|
|
7418
6692
|
type: Component,
|
|
@@ -7614,7 +6888,7 @@ class PriceEcComponent {
|
|
|
7614
6888
|
return !!value && value.split(' - ').length === 2;
|
|
7615
6889
|
}
|
|
7616
6890
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PriceEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7617
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PriceEcComponent, isStandalone: true, selector: "app-price-ec", inputs: { price: "price", saleprice: "saleprice", basePrice: "basePrice", taxeAmount: "taxeAmount", taxes: "taxes", priceSize: "priceSize", showTaxLegendOnly: "showTaxLegendOnly", disableTaxInfo: "disableTaxInfo", customPriceTemplate: "customPriceTemplate", customSalePriceTemplate: "customSalePriceTemplate", customSimplePriceTemplate: "customSimplePriceTemplate", customSimpleSalePriceTemplate: "customSimpleSalePriceTemplate", customTaxTemplate: "customTaxTemplate", customOnlyTaxLabelTemplate: "customOnlyTaxLabelTemplate" }, ngImport: i0, template: "@if(!hidePrices){\n@if (!showPricesOnlyToLoggedUsers || logged) {\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\n <ng-container *ngTemplateOutlet=\"customSalePriceTemplate || customPriceTemplate\">\n </ng-container>\n</ng-container>\n\n<ng-template #defaultPriceBlock>\n <div class=\"price\">\n <!-- Con precio de oferta -->\n <div *ngIf=\"saleprice; else onlyPriceBlock\" class=\"line-height-custom\">\n\n <!-- Precio original como rango o tachado simple -->\n <div *ngIf=\"hasRange(price); else simplePriceDel\" class=\"price-whithSaleprice\">\n <del class=\"\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </del>\n </div>\n\n <!-- Oferta como rango o simple -->\n <div *ngIf=\"hasRange(saleprice); else simpleSalePrice\" class=\"\">\n {{\n saleprice!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n saleprice!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </div>\n\n <!-- S\u00F3lo precio sin oferta -->\n <ng-template #onlyPriceBlock>\n <div *ngIf=\"hasRange(price); else simplePrice\" class=\"price-onlyPrice\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }} -\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price -->\n <ng-template #simplePrice>\n <ng-container *ngIf=\"customSimplePriceTemplate; else fallbackSimplePrice\">\n <ng-container *ngTemplateOutlet=\"customSimplePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n <ng-template #fallbackSimplePrice>\n <del> </del>\n <div class=\"price-simplePrice\">\n {{ price | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price-del -->\n <ng-template #simplePriceDel>\n <div class=\"price-simpleDel\">\n <del class=\"\">{{ price | ecCurrencySymbol }}</del>\n </div>\n </ng-template>\n\n <!-- Fallback simple saleprice -->\n <ng-template #simpleSalePrice>\n <ng-container *ngIf=\"customSimpleSalePriceTemplate; else fallbackSimpleSalePrice\">\n <ng-container *ngTemplateOutlet=\"customSimpleSalePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n <ng-template #fallbackSimpleSalePrice>\n <div class=\"price-simpleSaleprice\">\n {{ saleprice | ecCurrencySymbol }}\n </div>\n </ng-template>\n </div>\n</ng-template>\n\n<!-- Secci\u00F3n de impuestos -->\n<ng-container *ngIf=\"shouldShowTaxes\">\n <!-- S\u00F3lo leyenda -->\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabel\">\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultOnlyTaxLabel>\n <p class=\"taxes-title\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n </ng-template>\n </ng-container>\n\n <!-- Detalle impuestos -->\n <ng-template #detailedTaxBlock>\n <ng-container *ngIf=\"customTaxTemplate; else defaultTaxBlock\">\n <ng-container *ngTemplateOutlet=\"customTaxTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #defaultTaxBlock>\n <div class=\"taxes-section\">\n <p class=\"taxes-title\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n <ul class=\"taxes-list\">\n <li>\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\n </li>\n </ul>\n </div>\n</ng-template>\n}\n}", styles: [".price-sm{font-size:13px}.price{font-size:18px}.line-height-custom{line-height:1.2}.lnth{text-decoration:line-through;color:gray}.taxes-section{margin-top:.5rem;border-radius:.5rem;font-size:.95rem;color:#333;line-height:1.4;max-width:400px}.taxes-title{font-weight:500;margin-bottom:.2rem;font-size:.7rem;color:#222}.taxes-list{list-style:none;padding:0;margin:0}.taxes-list li{display:flex;justify-content:space-between;margin-bottom:.1rem;font-size:.65rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1
|
|
6891
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PriceEcComponent, isStandalone: true, selector: "app-price-ec", inputs: { price: "price", saleprice: "saleprice", basePrice: "basePrice", taxeAmount: "taxeAmount", taxes: "taxes", priceSize: "priceSize", showTaxLegendOnly: "showTaxLegendOnly", disableTaxInfo: "disableTaxInfo", customPriceTemplate: "customPriceTemplate", customSalePriceTemplate: "customSalePriceTemplate", customSimplePriceTemplate: "customSimplePriceTemplate", customSimpleSalePriceTemplate: "customSimpleSalePriceTemplate", customTaxTemplate: "customTaxTemplate", customOnlyTaxLabelTemplate: "customOnlyTaxLabelTemplate" }, ngImport: i0, template: "@if(!hidePrices){\n@if (!showPricesOnlyToLoggedUsers || logged) {\n<ng-container *ngIf=\"customSalePriceTemplate || customPriceTemplate; else defaultPriceBlock\">\n <ng-container *ngTemplateOutlet=\"customSalePriceTemplate || customPriceTemplate\">\n </ng-container>\n</ng-container>\n\n<ng-template #defaultPriceBlock>\n <div class=\"price\">\n <!-- Con precio de oferta -->\n <div *ngIf=\"saleprice; else onlyPriceBlock\" class=\"line-height-custom\">\n\n <!-- Precio original como rango o tachado simple -->\n <div *ngIf=\"hasRange(price); else simplePriceDel\" class=\"price-whithSaleprice\">\n <del class=\"\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </del>\n </div>\n\n <!-- Oferta como rango o simple -->\n <div *ngIf=\"hasRange(saleprice); else simpleSalePrice\" class=\"\">\n {{\n saleprice!.split(' - ')[0] | ecCurrencySymbol\n }}\n {{\n saleprice!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </div>\n\n <!-- S\u00F3lo precio sin oferta -->\n <ng-template #onlyPriceBlock>\n <div *ngIf=\"hasRange(price); else simplePrice\" class=\"price-onlyPrice\">\n {{\n price!.split(' - ')[0] | ecCurrencySymbol\n }} -\n {{\n price!.split(' - ')[1] | ecCurrencySymbol\n }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price -->\n <ng-template #simplePrice>\n <ng-container *ngIf=\"customSimplePriceTemplate; else fallbackSimplePrice\">\n <ng-container *ngTemplateOutlet=\"customSimplePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n <ng-template #fallbackSimplePrice>\n <del> </del>\n <div class=\"price-simplePrice\">\n {{ price | ecCurrencySymbol }}\n </div>\n </ng-template>\n\n <!-- Fallback simple price-del -->\n <ng-template #simplePriceDel>\n <div class=\"price-simpleDel\">\n <del class=\"\">{{ price | ecCurrencySymbol }}</del>\n </div>\n </ng-template>\n\n <!-- Fallback simple saleprice -->\n <ng-template #simpleSalePrice>\n <ng-container *ngIf=\"customSimpleSalePriceTemplate; else fallbackSimpleSalePrice\">\n <ng-container *ngTemplateOutlet=\"customSimpleSalePriceTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n <ng-template #fallbackSimpleSalePrice>\n <div class=\"price-simpleSaleprice\">\n {{ saleprice | ecCurrencySymbol }}\n </div>\n </ng-template>\n </div>\n</ng-template>\n\n<!-- Secci\u00F3n de impuestos -->\n<ng-container *ngIf=\"shouldShowTaxes\">\n <!-- S\u00F3lo leyenda -->\n <ng-container *ngIf=\"showTaxLegendOnly; else detailedTaxBlock\">\n <ng-container *ngIf=\"customOnlyTaxLabelTemplate; else defaultOnlyTaxLabel\">\n <ng-container *ngTemplateOutlet=\"customOnlyTaxLabelTemplate\"></ng-container>\n </ng-container>\n <ng-template #defaultOnlyTaxLabel>\n <p class=\"taxes-title\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n </ng-template>\n </ng-container>\n\n <!-- Detalle impuestos -->\n <ng-template #detailedTaxBlock>\n <ng-container *ngIf=\"customTaxTemplate; else defaultTaxBlock\">\n <ng-container *ngTemplateOutlet=\"customTaxTemplate\"></ng-container>\n </ng-container>\n </ng-template>\n</ng-container>\n\n<ng-template #defaultTaxBlock>\n <div class=\"taxes-section\">\n <p class=\"taxes-title\">\n {{ 'price-without-national-taxes' | translate }}:\n {{ basePrice! | ecCurrencySymbol }}\n </p>\n <ul class=\"taxes-list\">\n <li>\n {{ taxes.Name }}: {{ taxeAmount | ecCurrencySymbol }}\n </li>\n </ul>\n </div>\n</ng-template>\n}\n}", styles: [".price-sm{font-size:13px}.price{font-size:18px}.line-height-custom{line-height:1.2}.lnth{text-decoration:line-through;color:gray}.taxes-section{margin-top:.5rem;border-radius:.5rem;font-size:.95rem;color:#333;line-height:1.4;max-width:400px}.taxes-title{font-weight:500;margin-bottom:.2rem;font-size:.7rem;color:#222}.taxes-list{list-style:none;padding:0;margin:0}.taxes-list li{display:flex;justify-content:space-between;margin-bottom:.1rem;font-size:.65rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
7618
6892
|
}
|
|
7619
6893
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PriceEcComponent, decorators: [{
|
|
7620
6894
|
type: Component,
|
|
@@ -7818,7 +7092,7 @@ class ProductEcComponent {
|
|
|
7818
7092
|
}
|
|
7819
7093
|
}
|
|
7820
7094
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7821
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ProductEcComponent, isStandalone: true, selector: "app-product-ec", inputs: { product: "product", isProductBox: "isProductBox", isCollection: "isCollection" }, outputs: { loaded: "loaded" }, ngImport: i0, template: "<a [routerLink]=\"['/product', product.id]\" class=\"text-decoration-none producto\">\n <!-- Marca especial y descuento -->\n <!-- <div *ngIf=\"product.saleprice || (product.special_mark && product.special_mark !== null && product.special_mark !== undefined && product.special_mark.length >0)\"\n class=\"marcas\">\n <div *ecProductStock=\"product\" [ecProductMini]=\"product.special_mark\"></div>\n <ng-container *ngIf=\"shouldShowPrice\">\n <div *ecProductStock=\"product\" [ngClass]=\"{'tag-dsc float-right': product.saleprice}\"\n [ecProductOff]=\"product\">\n </div>\n </ng-container>\n </div> -->\n\n <!-- Imagen del producto -->\n <div class=\"foto\">\n @if(product.picturesdefault){\n @if (product.picturesdefault && product.picturesdefault.length > 1 ) {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n <img [src]=\"mediaUrl + product.picturesdefault[1]\" alt=\"Imagen secundaria\" class=\"w-100 pic02\" />\n } @else {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n }\n }\n </div>\n <!-- Precio -->\n\n\n <!-- Nombre del producto -->\n <h6 class=\"title\">{{ product.name | titlecase }}</h6>\n\n <div class=\"sku\" [innerHTML]=\"product.shortdetails\"></div>\n\n @if (shouldShowPrice) {\n <app-price-ec [price]=\"product.price\" [saleprice]=\"product.saleprice\" class=\"\" />\n }\n @if(!hidePrices){\n @if(!showPricesOnlyToLoggedUsers || isAuthenticated$){\n\n <div class=\"fixBottom\">\n\n <!-- Bot\u00F3n de acciones -->\n <!-- <ng-container *ecProductStock=\"product; else noStock\"> -->\n <!-- Cuando no tiene marca especial o es de tipo 'standard' -->\n @if (!product.special_mark || product.special_mark.length === 0 || product.special_mark[0]?.type ===\n 'standard') {\n <button class=\"btn standard\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n <ng-container *ngIf=\"isCollection; else normalText\">\n <span> {{(\"buy\" | translate) | uppercase}} </span>\n </ng-container>\n <ng-template #normalText>\n {{(\"buy\" | translate) | uppercase}}\n </ng-template>\n </button>\n }@else {\n <!-- Caso 1: Agotado o Disponible muy pronto -->\n @if (product.special_mark[0]?.type === 'out_of_stock' || product.special_mark[0]?.type === 'coming_soon') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0].name | uppercase }} </span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>}\n <!-- Caso 2: Contacto por WhatsApp -->\n @if (product.special_mark[0].type === 'whatsapp_contact') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\"\n (click)=\"openWhatsApp(product.special_mark[0]?.whatsappContact)\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n\n </button>\n }\n <!-- Caso 3: Solicitar m\u00E1s informaci\u00F3n -->\n @if (product.special_mark[0]?.type === 'more_info') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>\n }\n }\n </div>\n }}\n</a>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1
|
|
7095
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ProductEcComponent, isStandalone: true, selector: "app-product-ec", inputs: { product: "product", isProductBox: "isProductBox", isCollection: "isCollection" }, outputs: { loaded: "loaded" }, ngImport: i0, template: "<a [routerLink]=\"['/product', product.id]\" class=\"text-decoration-none producto\">\n <!-- Marca especial y descuento -->\n <!-- <div *ngIf=\"product.saleprice || (product.special_mark && product.special_mark !== null && product.special_mark !== undefined && product.special_mark.length >0)\"\n class=\"marcas\">\n <div *ecProductStock=\"product\" [ecProductMini]=\"product.special_mark\"></div>\n <ng-container *ngIf=\"shouldShowPrice\">\n <div *ecProductStock=\"product\" [ngClass]=\"{'tag-dsc float-right': product.saleprice}\"\n [ecProductOff]=\"product\">\n </div>\n </ng-container>\n </div> -->\n\n <!-- Imagen del producto -->\n <div class=\"foto\">\n @if(product.picturesdefault){\n @if (product.picturesdefault && product.picturesdefault.length > 1 ) {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n <img [src]=\"mediaUrl + product.picturesdefault[1]\" alt=\"Imagen secundaria\" class=\"w-100 pic02\" />\n } @else {\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"Imagen principal\" class=\"w-100 pic01\" />\n }\n }\n </div>\n <!-- Precio -->\n\n\n <!-- Nombre del producto -->\n <h6 class=\"title\">{{ product.name | titlecase }}</h6>\n\n <div class=\"sku\" [innerHTML]=\"product.shortdetails\"></div>\n\n @if (shouldShowPrice) {\n <app-price-ec [price]=\"product.price\" [saleprice]=\"product.saleprice\" class=\"\" />\n }\n @if(!hidePrices){\n @if(!showPricesOnlyToLoggedUsers || isAuthenticated$){\n\n <div class=\"fixBottom\">\n\n <!-- Bot\u00F3n de acciones -->\n <!-- <ng-container *ecProductStock=\"product; else noStock\"> -->\n <!-- Cuando no tiene marca especial o es de tipo 'standard' -->\n @if (!product.special_mark || product.special_mark.length === 0 || product.special_mark[0]?.type ===\n 'standard') {\n <button class=\"btn standard\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n <ng-container *ngIf=\"isCollection; else normalText\">\n <span> {{(\"buy\" | translate) | uppercase}} </span>\n </ng-container>\n <ng-template #normalText>\n {{(\"buy\" | translate) | uppercase}}\n </ng-template>\n </button>\n }@else {\n <!-- Caso 1: Agotado o Disponible muy pronto -->\n @if (product.special_mark[0]?.type === 'out_of_stock' || product.special_mark[0]?.type === 'coming_soon') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0].name | uppercase }} </span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>}\n <!-- Caso 2: Contacto por WhatsApp -->\n @if (product.special_mark[0].type === 'whatsapp_contact') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\"\n (click)=\"openWhatsApp(product.special_mark[0]?.whatsappContact)\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n\n </button>\n }\n <!-- Caso 3: Solicitar m\u00E1s informaci\u00F3n -->\n @if (product.special_mark[0]?.type === 'more_info') {\n <button class=\"btn\" [ngClass]=\"isCollection ? 'px-2 w-100 d-sm-block' : 'py-2 px-4'\">\n @if(isCollection){\n <span>{{ product.special_mark[0]?.name | uppercase }}</span>\n }@else {\n {{ product.special_mark[0]?.name | uppercase }}\n }\n </button>\n }\n }\n </div>\n }}\n</a>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }, { kind: "component", type: PriceEcComponent, selector: "app-price-ec", inputs: ["price", "saleprice", "basePrice", "taxeAmount", "taxes", "priceSize", "showTaxLegendOnly", "disableTaxInfo", "customPriceTemplate", "customSalePriceTemplate", "customSimplePriceTemplate", "customSimpleSalePriceTemplate", "customTaxTemplate", "customOnlyTaxLabelTemplate"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: FormsModule }] });
|
|
7822
7096
|
}
|
|
7823
7097
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProductEcComponent, decorators: [{
|
|
7824
7098
|
type: Component,
|
|
@@ -7907,12 +7181,24 @@ class BlockProductsEcComponent extends BlockEcComponent {
|
|
|
7907
7181
|
* Esta función puede ser movida al componente base para reutilización.
|
|
7908
7182
|
*/
|
|
7909
7183
|
initializeSwiperWithCustomNavigation() {
|
|
7910
|
-
if (!isPlatformBrowser(this.platformId) || typeof document === 'undefined')
|
|
7911
|
-
return;
|
|
7912
7184
|
const prevButton = document.getElementById(`${this.meta?.code}-prev`);
|
|
7913
7185
|
const nextButton = document.getElementById(`${this.meta?.code}-next`);
|
|
7914
7186
|
const swiperElement = document.getElementById(this.meta?.code);
|
|
7915
7187
|
if (prevButton && nextButton && swiperElement) {
|
|
7188
|
+
// console.log('Configurando navegación personalizada para:', this.meta?.code);
|
|
7189
|
+
const swiperConfig = this.getSwiperConfiguration();
|
|
7190
|
+
// Verificar si el Swiper ya está inicializado
|
|
7191
|
+
if (!swiperElement.swiper) {
|
|
7192
|
+
this.initializeNewSwiper(swiperElement, swiperConfig);
|
|
7193
|
+
}
|
|
7194
|
+
else {
|
|
7195
|
+
this.updateExistingSwiper(swiperElement);
|
|
7196
|
+
}
|
|
7197
|
+
// Configurar los event listeners para los botones
|
|
7198
|
+
this.setupNavigationEventListeners(prevButton, nextButton, swiperElement);
|
|
7199
|
+
// console.log('Event listeners configurados para los botones de navegación');
|
|
7200
|
+
}
|
|
7201
|
+
else {
|
|
7916
7202
|
// console.log('No se pudieron encontrar los elementos:', {
|
|
7917
7203
|
// prevButton: !!prevButton,
|
|
7918
7204
|
// nextButton: !!nextButton,
|
|
@@ -8007,7 +7293,7 @@ class BlockProductsEcComponent extends BlockEcComponent {
|
|
|
8007
7293
|
});
|
|
8008
7294
|
}
|
|
8009
7295
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BlockProductsEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8010
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BlockProductsEcComponent, isStandalone: true, selector: "app-block-products-ec", inputs: { prevArrowImage: "prevArrowImage", nextArrowImage: "nextArrowImage", prevArrowText: "prevArrowText", nextArrowText: "nextArrowText", appProduct: "appProduct", products: "products", meta: "meta" }, usesInheritance: true, ngImport: i0, template: "<section [ngClass]=\"trimClassBlock(meta.code) + ' container-fluid'\">\n\n <div class=\"blockProduct block-product\">\n @if(meta.name){\n <div class=\"row\">\n <div class=\"col-12 mt-4\">\n <h2 class=\"font-weight-normal font-gd\">\n <span>{{meta.name}}</span>\n </h2>\n </div>\n </div>\n }\n\n\n @if(meta.styles && meta.styles.carrousel == false){\n <div class=\"row \">\n @for (product of products; track $index) {\n <div [class]=\"'item '+ ' col-'+ (meta.styles.items?.sm) + ' col-md-' + (meta.styles.items?.md) + ' col-lg-' + (meta.styles.items?.lg) + ' px-2'\" [id]=\"$index\">\n <!-- verifica que si vienen un template para un custom appProduct llamado \"appProduct\" con un objeto \"product\"- sino usa por defecto el del core -->\n <ng-container *ngTemplateOutlet=\"appProduct ? appProduct : defaultAppProduct; context: {product:product}\"></ng-container>\n </div>\n }\n </div>\n } @else {\n <div class=\"container position-relative\">\n <swiper-container \n init=\"false\" \n [id]=\"meta?.code\"\n slides-per-view=\"auto\"\n space-between=\"16\"\n slides-per-group=\"1\"\n navigation=\"false\"\n pagination=\"false\"\n loop=\"false\">\n @for (product of products; track $index) {\n <swiper-slide id=\"swiper-slide\">\n <ng-container\n *ngTemplateOutlet=\"appProduct ? appProduct : defaultAppProduct; context: {product:product}\"></ng-container>\n </swiper-slide>\n }\n </swiper-container>\n \n <!-- Botones de navegaci\u00F3n personalizados -->\n <div class=\"swiper-navigation\">\n <div class=\"swiper-button-prev\" [id]=\"meta?.code + '-prev'\">\n @if(prevArrowImage) {\n <img [src]=\"prevArrowImage\" alt=\"Anterior\" />\n } @else {\n <span class=\"arrow-text\">{{prevArrowText}}</span>\n }\n </div>\n <div class=\"swiper-button-next\" [id]=\"meta?.code + '-next'\">\n @if(nextArrowImage) {\n <img [src]=\"nextArrowImage\" alt=\"Siguiente\" />\n } @else {\n <span class=\"arrow-text\">{{nextArrowText}}</span>\n }\n </div>\n </div>\n </div>\n }\n </div>\n</section>\n\n\n<!-- componente por defecto (tomara como producto el contexto pasado como \"product\") -->\n<ng-template #defaultAppProduct let-product=\"product\">\n <app-product-ec [product]=\"product\"></app-product-ec>\n</ng-template>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1
|
|
7296
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BlockProductsEcComponent, isStandalone: true, selector: "app-block-products-ec", inputs: { prevArrowImage: "prevArrowImage", nextArrowImage: "nextArrowImage", prevArrowText: "prevArrowText", nextArrowText: "nextArrowText", appProduct: "appProduct", products: "products", meta: "meta" }, usesInheritance: true, ngImport: i0, template: "<section [ngClass]=\"trimClassBlock(meta.code) + ' container-fluid'\">\n\n <div class=\"blockProduct block-product\">\n @if(meta.name){\n <div class=\"row\">\n <div class=\"col-12 mt-4\">\n <h2 class=\"font-weight-normal font-gd\">\n <span>{{meta.name}}</span>\n </h2>\n </div>\n </div>\n }\n\n\n @if(meta.styles && meta.styles.carrousel == false){\n <div class=\"row \">\n @for (product of products; track $index) {\n <div [class]=\"'item '+ ' col-'+ (meta.styles.items?.sm) + ' col-md-' + (meta.styles.items?.md) + ' col-lg-' + (meta.styles.items?.lg) + ' px-2'\" [id]=\"$index\">\n <!-- verifica que si vienen un template para un custom appProduct llamado \"appProduct\" con un objeto \"product\"- sino usa por defecto el del core -->\n <ng-container *ngTemplateOutlet=\"appProduct ? appProduct : defaultAppProduct; context: {product:product}\"></ng-container>\n </div>\n }\n </div>\n } @else {\n <div class=\"container position-relative\">\n <swiper-container \n init=\"false\" \n [id]=\"meta?.code\"\n slides-per-view=\"auto\"\n space-between=\"16\"\n slides-per-group=\"1\"\n navigation=\"false\"\n pagination=\"false\"\n loop=\"false\">\n @for (product of products; track $index) {\n <swiper-slide id=\"swiper-slide\">\n <ng-container\n *ngTemplateOutlet=\"appProduct ? appProduct : defaultAppProduct; context: {product:product}\"></ng-container>\n </swiper-slide>\n }\n </swiper-container>\n \n <!-- Botones de navegaci\u00F3n personalizados -->\n <div class=\"swiper-navigation\">\n <div class=\"swiper-button-prev\" [id]=\"meta?.code + '-prev'\">\n @if(prevArrowImage) {\n <img [src]=\"prevArrowImage\" alt=\"Anterior\" />\n } @else {\n <span class=\"arrow-text\">{{prevArrowText}}</span>\n }\n </div>\n <div class=\"swiper-button-next\" [id]=\"meta?.code + '-next'\">\n @if(nextArrowImage) {\n <img [src]=\"nextArrowImage\" alt=\"Siguiente\" />\n } @else {\n <span class=\"arrow-text\">{{nextArrowText}}</span>\n }\n </div>\n </div>\n </div>\n }\n </div>\n</section>\n\n\n<!-- componente por defecto (tomara como producto el contexto pasado como \"product\") -->\n<ng-template #defaultAppProduct let-product=\"product\">\n <app-product-ec [product]=\"product\"></app-product-ec>\n</ng-template>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ProductEcComponent, selector: "app-product-ec", inputs: ["product", "isProductBox", "isCollection"], outputs: ["loaded"] }] });
|
|
8011
7297
|
}
|
|
8012
7298
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BlockProductsEcComponent, decorators: [{
|
|
8013
7299
|
type: Component,
|
|
@@ -8143,7 +7429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8143
7429
|
class LoadingInlineEcComponent {
|
|
8144
7430
|
type = 'border';
|
|
8145
7431
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoadingInlineEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8146
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LoadingInlineEcComponent, isStandalone: true, selector: "app-loading-inline-ec", inputs: { type: "type" }, ngImport: i0, template: "<div class=\"loading-inline-container\">\n <div [class]=\"'spinner-'+type+' text-dark spinner-colo'\" id=\"loading\" role=\"status\">\n <span class=\"visually-hidden\">{{ 'loading' | translate }}</span>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
7432
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: LoadingInlineEcComponent, isStandalone: true, selector: "app-loading-inline-ec", inputs: { type: "type" }, ngImport: i0, template: "<div class=\"loading-inline-container\">\n <div [class]=\"'spinner-'+type+' text-dark spinner-colo'\" id=\"loading\" role=\"status\">\n <span class=\"visually-hidden\">{{ 'loading' | translate }}</span>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
8147
7433
|
}
|
|
8148
7434
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoadingInlineEcComponent, decorators: [{
|
|
8149
7435
|
type: Component,
|
|
@@ -8201,7 +7487,7 @@ class ReCaptchaEcComponent {
|
|
|
8201
7487
|
useExisting: forwardRef(() => ReCaptchaEcComponent),
|
|
8202
7488
|
multi: true
|
|
8203
7489
|
}
|
|
8204
|
-
], ngImport: i0, template: "@if(captcha.siteKey){\n <re-captcha (resolved)=\"resolved($event)\" siteKey=\"{{captcha.siteKey}}\">\n </re-captcha>\n}@else {\n <app-loading-full-ec></app-loading-full-ec>\n}", styles: [""], dependencies: [{ kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: RecaptchaModule }, { kind: "component", type: i1$
|
|
7490
|
+
], ngImport: i0, template: "@if(captcha.siteKey){\n <re-captcha (resolved)=\"resolved($event)\" siteKey=\"{{captcha.siteKey}}\">\n </re-captcha>\n}@else {\n <app-loading-full-ec></app-loading-full-ec>\n}", styles: [""], dependencies: [{ kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: RecaptchaModule }, { kind: "component", type: i1$2.RecaptchaComponent, selector: "re-captcha", inputs: ["id", "siteKey", "theme", "type", "size", "tabIndex", "badge", "errorMode"], outputs: ["resolved", "error", "errored"], exportAs: ["reCaptcha"] }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
8205
7491
|
}
|
|
8206
7492
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ReCaptchaEcComponent, decorators: [{
|
|
8207
7493
|
type: Component,
|
|
@@ -8243,10 +7529,8 @@ class MagnizoomEcComponent {
|
|
|
8243
7529
|
this.document = inject(DOCUMENT); // Solo se inyecta en el navegador
|
|
8244
7530
|
}
|
|
8245
7531
|
afterRender(() => {
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
this.loadImage(this.imageSrc);
|
|
8249
|
-
}
|
|
7532
|
+
this.initContext();
|
|
7533
|
+
this.loadImage(this.imageSrc);
|
|
8250
7534
|
});
|
|
8251
7535
|
}
|
|
8252
7536
|
ngOnInit() {
|
|
@@ -8258,7 +7542,7 @@ class MagnizoomEcComponent {
|
|
|
8258
7542
|
this.context = this.canvas.getContext('2d');
|
|
8259
7543
|
}
|
|
8260
7544
|
loadImage(src) {
|
|
8261
|
-
if (
|
|
7545
|
+
if (this.document) {
|
|
8262
7546
|
this.image = this.document.createElement('img');
|
|
8263
7547
|
this.image.onload = () => {
|
|
8264
7548
|
this.lensSize = { width: this.image.width / 2, height: this.image.height / 2 };
|
|
@@ -8370,7 +7654,7 @@ class MagnizoomEcComponent {
|
|
|
8370
7654
|
event.stopPropagation();
|
|
8371
7655
|
}
|
|
8372
7656
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MagnizoomEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8373
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MagnizoomEcComponent, isStandalone: true, selector: "[app-magnizoom-ec]", inputs: { ImageSrc: "ImageSrc", zoomMode: "zoomMode", minZoomFactor: "minZoomFactor", maxZoomFactor: "maxZoomFactor", imageStyle: "imageStyle", imageClass: "imageClass" }, viewQueries: [{ propertyName: "mainCanvasRef", first: true, predicate: ["mainCanvas"], descendants: true, static: true }], ngImport: i0, template: "<canvas #mainCanvas\n class=\"main-canvas\"\n [ngClass]=\"imageClass\"\n [ngStyle]=\"imageStyle\"\n [width]=\"canvasWidth\"\n [height]=\"canvasHeight\"\n (mouseleave)=\"onMouseLeave($event)\"\n (mouseenter)=\"onMouseEnterOrMove($event)\"\n (mousemove)=\"onMouseEnterOrMove($event)\"\n (wheel)=\"onMouseScroll($event)\">\n</canvas>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1
|
|
7657
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MagnizoomEcComponent, isStandalone: true, selector: "[app-magnizoom-ec]", inputs: { ImageSrc: "ImageSrc", zoomMode: "zoomMode", minZoomFactor: "minZoomFactor", maxZoomFactor: "maxZoomFactor", imageStyle: "imageStyle", imageClass: "imageClass" }, viewQueries: [{ propertyName: "mainCanvasRef", first: true, predicate: ["mainCanvas"], descendants: true, static: true }], ngImport: i0, template: "<canvas #mainCanvas\n class=\"main-canvas\"\n [ngClass]=\"imageClass\"\n [ngStyle]=\"imageStyle\"\n [width]=\"canvasWidth\"\n [height]=\"canvasHeight\"\n (mouseleave)=\"onMouseLeave($event)\"\n (mouseenter)=\"onMouseEnterOrMove($event)\"\n (mousemove)=\"onMouseEnterOrMove($event)\"\n (wheel)=\"onMouseScroll($event)\">\n</canvas>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
8374
7658
|
}
|
|
8375
7659
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MagnizoomEcComponent, decorators: [{
|
|
8376
7660
|
type: Component,
|
|
@@ -8534,16 +7818,26 @@ class RedsysCatchEcComponent extends ComponentHelper {
|
|
|
8534
7818
|
}
|
|
8535
7819
|
/** Intenta cerrar la pestaña actual; si falla, ejecuta el callback de fallback. */
|
|
8536
7820
|
tryCloseSelf(onFail) {
|
|
8537
|
-
if (!isPlatformBrowser(this.platformId))
|
|
8538
|
-
|
|
8539
|
-
|
|
7821
|
+
if (!isPlatformBrowser(this.platformId)) {
|
|
7822
|
+
onFail();
|
|
7823
|
+
return;
|
|
7824
|
+
}
|
|
7825
|
+
// Fallback de seguridad: si después de ~800 ms la página sigue visible,
|
|
7826
|
+
// asumimos que window.close() fue ignorado.
|
|
7827
|
+
const fallback = setTimeout(() => {
|
|
7828
|
+
// Si la pestaña siguiera abierta, document.hidden suele ser false.
|
|
7829
|
+
if (!document.hidden) {
|
|
7830
|
+
onFail();
|
|
7831
|
+
}
|
|
7832
|
+
}, 800);
|
|
8540
7833
|
try {
|
|
8541
7834
|
window.close();
|
|
8542
|
-
|
|
7835
|
+
// Si window.close() lanza excepción, limpiamos el timeout y hacemos fallback inmediato.
|
|
8543
7836
|
}
|
|
8544
|
-
catch {
|
|
8545
|
-
|
|
7837
|
+
catch {
|
|
7838
|
+
clearTimeout(fallback);
|
|
8546
7839
|
onFail();
|
|
7840
|
+
}
|
|
8547
7841
|
}
|
|
8548
7842
|
/** Oculta header/footer para esta pantalla mínima. */
|
|
8549
7843
|
hideHeaderFooter() {
|
|
@@ -8585,7 +7879,7 @@ class RedsysCatchEcComponent extends ComponentHelper {
|
|
|
8585
7879
|
catch { }
|
|
8586
7880
|
}
|
|
8587
7881
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RedsysCatchEcComponent, deps: [{ token: i2.ActivatedRoute }, { token: i2.Router }, { token: CheckoutService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: DOCUMENT }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
|
|
8588
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RedsysCatchEcComponent, isStandalone: true, selector: "app-redsys-catch-ec", usesInheritance: true, ngImport: i0, template: "<div id=\"container\">\n <div class=\"row\">\n <div class=\"col align-self-center\">\n <h4 class=\"titpage center-block text-center font-nexa font-lg my-3\">{{ message | uppercase }}</h4>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col align-self-center\">\n <h5 class=\"center-block text-center font-nexa my-3\">Redirigiendo en segundos...</h5>\n <br>\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </div>\n</div>", styles: [".loader{border:16px solid #f3f3f3;border-top:16px solid #dc3545;border-radius:50%;width:50px;height:50px;animation:spin 2s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.flex-container{display:flex;justify-content:center;align-items:center;height:80vh;width:100%}.flex-container>div{width:90%;height:100px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1
|
|
7882
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: RedsysCatchEcComponent, isStandalone: true, selector: "app-redsys-catch-ec", usesInheritance: true, ngImport: i0, template: "<div id=\"container\">\n <div class=\"row\">\n <div class=\"col align-self-center\">\n <h4 class=\"titpage center-block text-center font-nexa font-lg my-3\">{{ message | uppercase }}</h4>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col align-self-center\">\n <h5 class=\"center-block text-center font-nexa my-3\">Redirigiendo en segundos...</h5>\n <br>\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </div>\n</div>", styles: [".loader{border:16px solid #f3f3f3;border-top:16px solid #dc3545;border-radius:50%;width:50px;height:50px;animation:spin 2s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.flex-container{display:flex;justify-content:center;align-items:center;height:80vh;width:100%}.flex-container>div{width:90%;height:100px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }] });
|
|
8589
7883
|
}
|
|
8590
7884
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RedsysCatchEcComponent, decorators: [{
|
|
8591
7885
|
type: Component,
|
|
@@ -8664,7 +7958,7 @@ class BlockFormContactEcComponent extends BlockEcComponent {
|
|
|
8664
7958
|
}
|
|
8665
7959
|
}
|
|
8666
7960
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BlockFormContactEcComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
8667
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BlockFormContactEcComponent, isStandalone: true, selector: "app-block-form-contact-ec", inputs: { block: "block", success_message: "success_message", redirect: "redirect", subject: "subject" }, usesInheritance: true, ngImport: i0, template: "@if(block){\n<div [class]=\"trimClassBlock(block.code) + ' container-fluid'\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12 col-md-12\">\n <div class=\"row w-100 m-auto\">\n <h5>{{block.name || 'Dejanos tu consulta'}}</h5>\n <p class=\"w-100\">{{ block.description || 'Completa el siguiente formulario y responderemos tu consulta a la brevedad' }}</p>\n </div>\n <form [formGroup]=\"form()\" (submit)=\"onSubmit($event)\" class=\"position-relative\" ><!-- (submit)=\"toastCompleteForm($event)\" -->\n @if(block.sendName){\n <div class=\"form-group mt-1\">\n <label class=\"sr-only\" for=\"nombre\">Nombre</label>\n <input formControlName=\"name\" type=\"text\"\n class=\"form-control form-control-sm required\" id=\"nombre\" placeholder=\"Nombre\">\n </div>\n }\n @if(block.sendEmail){\n <div class=\"form-group mt-1\">\n <label class=\"sr-only\" for=\"mail\">Email</label>\n <input formControlName=\"email\" type=\"email\"\n class=\"form-control form-control-sm required\" id=\"mail\" placeholder=\"Email\">\n </div>\n }\n @if(block.sendTelephone){\n <div class=\"form-group mt-1\">\n <label class=\"sr-only\" for=\"telefono\">Tel\u00E9fono</label>\n <input formControlName=\"telephone\" type=\"text\"\n class=\"form-control form-control-sm required\" id=\"telefono\" placeholder=\"Tel\u00E9fono\">\n </div>\n }\n @if(block.sendSubject){\n <div class=\"form-group mt-1\">\n <label class=\"sr-only\" for=\"subject\">Asunto</label>\n <input formControlName=\"subject\" type=\"text\"\n class=\"form-control form-control-sm required\" id=\"subject\" placeholder=\"Asunto\">\n </div>\n }\n @if(block.sendBody){\n <div class=\"form-group mt-1\">\n <label class=\"sr-only\" for=\"mensaje\">Mensaje</label>\n <textarea formControlName=\"body\" name=\"mensaje\" id=\"mensaje \" cols=\"30\"\n rows=\"5\" placeholder=\"Dejanos tu mensaje\"\n class=\"form-control form-control-sm required\"></textarea>\n </div>\n }\n <div class=\"boxContenidoCapcha mb-3 mt-1\">\n <div class=\"contenedorCaptcha\">\n <re-captcha-ec formControlName=\"recaptcha\"></re-captcha-ec>\n </div>\n </div>\n\n <button type=\"submit\" class=\"btn btn-dark text-uppercase px-5\"\n [disabled]=\"form().invalid\">ENVIAR</button>\n @if(loading){\n <app-loading-section-ec/>\n }\n </form>\n </div>\n\n </div>\n</div>\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$
|
|
7961
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BlockFormContactEcComponent, isStandalone: true, selector: "app-block-form-contact-ec", inputs: { block: "block", success_message: "success_message", redirect: "redirect", subject: "subject" }, usesInheritance: true, ngImport: i0, template: "@if(block){\n<div [class]=\"trimClassBlock(block.code) + ' container-fluid'\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12 col-md-12\">\n <div class=\"row w-100 m-auto\">\n <h5>{{block.name || 'Dejanos tu consulta'}}</h5>\n <p class=\"w-100\">{{ block.description || 'Completa el siguiente formulario y responderemos tu consulta a la brevedad' }}</p>\n </div>\n <form [formGroup]=\"form()\" (submit)=\"onSubmit($event)\" class=\"position-relative\" ><!-- (submit)=\"toastCompleteForm($event)\" -->\n @if(block.sendName){\n <div class=\"form-group mt-1\">\n <label class=\"sr-only\" for=\"nombre\">Nombre</label>\n <input formControlName=\"name\" type=\"text\"\n class=\"form-control form-control-sm required\" id=\"nombre\" placeholder=\"Nombre\">\n </div>\n }\n @if(block.sendEmail){\n <div class=\"form-group mt-1\">\n <label class=\"sr-only\" for=\"mail\">Email</label>\n <input formControlName=\"email\" type=\"email\"\n class=\"form-control form-control-sm required\" id=\"mail\" placeholder=\"Email\">\n </div>\n }\n @if(block.sendTelephone){\n <div class=\"form-group mt-1\">\n <label class=\"sr-only\" for=\"telefono\">Tel\u00E9fono</label>\n <input formControlName=\"telephone\" type=\"text\"\n class=\"form-control form-control-sm required\" id=\"telefono\" placeholder=\"Tel\u00E9fono\">\n </div>\n }\n @if(block.sendSubject){\n <div class=\"form-group mt-1\">\n <label class=\"sr-only\" for=\"subject\">Asunto</label>\n <input formControlName=\"subject\" type=\"text\"\n class=\"form-control form-control-sm required\" id=\"subject\" placeholder=\"Asunto\">\n </div>\n }\n @if(block.sendBody){\n <div class=\"form-group mt-1\">\n <label class=\"sr-only\" for=\"mensaje\">Mensaje</label>\n <textarea formControlName=\"body\" name=\"mensaje\" id=\"mensaje \" cols=\"30\"\n rows=\"5\" placeholder=\"Dejanos tu mensaje\"\n class=\"form-control form-control-sm required\"></textarea>\n </div>\n }\n <div class=\"boxContenidoCapcha mb-3 mt-1\">\n <div class=\"contenedorCaptcha\">\n <re-captcha-ec formControlName=\"recaptcha\"></re-captcha-ec>\n </div>\n </div>\n\n <button type=\"submit\" class=\"btn btn-dark text-uppercase px-5\"\n [disabled]=\"form().invalid\">ENVIAR</button>\n @if(loading){\n <app-loading-section-ec/>\n }\n </form>\n </div>\n\n </div>\n</div>\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: LoadingSectionEcComponent, selector: "app-loading-section-ec" }, { kind: "component", type: ReCaptchaEcComponent, selector: "re-captcha-ec", inputs: ["siteKey"] }] });
|
|
8668
7962
|
}
|
|
8669
7963
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BlockFormContactEcComponent, decorators: [{
|
|
8670
7964
|
type: Component,
|
|
@@ -8772,7 +8066,6 @@ class CollectionEcComponent {
|
|
|
8772
8066
|
_productsService = inject(ProductsService);
|
|
8773
8067
|
_activeRoute = inject(ActivatedRoute);
|
|
8774
8068
|
_optionsService = inject(OptionsService);
|
|
8775
|
-
_filtersService = inject(FiltersService);
|
|
8776
8069
|
params$ = this._activeRoute.params;
|
|
8777
8070
|
//public ready = this._optionsService.ready
|
|
8778
8071
|
queryParams$ = this._activeRoute.queryParams;
|
|
@@ -8784,63 +8077,40 @@ class CollectionEcComponent {
|
|
|
8784
8077
|
defaultFilters = [];
|
|
8785
8078
|
loading = false;
|
|
8786
8079
|
countProducts = signal(0);
|
|
8787
|
-
loaded =
|
|
8080
|
+
loaded = false;
|
|
8788
8081
|
optionsFilters = ['all'];
|
|
8789
8082
|
filters_sort = [];
|
|
8083
|
+
_filtersService = inject(FiltersService);
|
|
8790
8084
|
filters$ = this._filtersService.filters$;
|
|
8791
8085
|
ready$ = this._filtersService.ready$;
|
|
8792
8086
|
window;
|
|
8793
8087
|
isList = false;
|
|
8794
|
-
destroy$ = new Subject();
|
|
8795
8088
|
setAsList = (value) => this.isList = value;
|
|
8796
8089
|
ngOnInit() {
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
}
|
|
8800
|
-
combineLatest([this.params$, this.queryParams$])
|
|
8801
|
-
.pipe(map(([params, query]) => ({ params, query })), distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)), takeUntil(this.destroy$))
|
|
8802
|
-
.subscribe(({ params, query }) => {
|
|
8803
|
-
// Guardamos el tipo de ruta actual en las constantes (ej: 'categories', 'sections', etc.)
|
|
8804
|
-
const routeType = params['type'] || null;
|
|
8805
|
-
this.constanst.setCurrentRouteType(routeType);
|
|
8806
|
-
const paginationSettings = {
|
|
8807
|
-
latest: true,
|
|
8808
|
-
limit: 10,
|
|
8809
|
-
type: params['type'] || null,
|
|
8810
|
-
value: params['value'] || null
|
|
8811
|
-
};
|
|
8812
|
-
// Punto clave:
|
|
8813
|
-
// A partir de la URL (params + query) reconstruimos los filtros
|
|
8814
|
-
// (categorías, atributos, rango de precios, etc.)
|
|
8815
|
-
// Esto permite:
|
|
8816
|
-
// - Soportar F5 / recarga sin perder filtros
|
|
8817
|
-
// - Navegar con URL compartibles (deep linking)
|
|
8818
|
-
this._filtersService.hydrateFromRoute(paginationSettings, params, query);
|
|
8819
|
-
});
|
|
8090
|
+
this.getProducts();
|
|
8091
|
+
this.window?.scroll(0, 0);
|
|
8820
8092
|
}
|
|
8821
8093
|
//protected readonly questions = signal<Question[]>([]);
|
|
8822
8094
|
total = 0;
|
|
8823
8095
|
platformId = inject(PLATFORM_ID);
|
|
8824
8096
|
constructor() {
|
|
8825
|
-
// Guardamos window sólo en Browser para evitar errores en SSR
|
|
8826
8097
|
if (isPlatformBrowser(this.platformId)) {
|
|
8827
8098
|
this.window = window;
|
|
8828
8099
|
}
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
|
|
8100
|
+
}
|
|
8101
|
+
getProducts() {
|
|
8102
|
+
combineLatest([this.params$, this.queryParams$]).subscribe({
|
|
8103
|
+
next: ([params, queryParams]) => {
|
|
8104
|
+
const paginationSettings = {
|
|
8105
|
+
latest: true,
|
|
8106
|
+
limit: 10,
|
|
8107
|
+
type: params['type'] || null,
|
|
8108
|
+
value: params['value'] || null
|
|
8109
|
+
};
|
|
8110
|
+
this._productsService.getProductsForFilter(paginationSettings, queryParams["search"]);
|
|
8837
8111
|
}
|
|
8838
8112
|
});
|
|
8839
8113
|
}
|
|
8840
|
-
ngOnDestroy() {
|
|
8841
|
-
this.destroy$.next();
|
|
8842
|
-
this.destroy$.complete();
|
|
8843
|
-
}
|
|
8844
8114
|
onScroll() {
|
|
8845
8115
|
this.loading = true;
|
|
8846
8116
|
this._productsService.updateProducts();
|
|
@@ -8893,14 +8163,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8893
8163
|
}] } });
|
|
8894
8164
|
|
|
8895
8165
|
class LoginFormEcComponent {
|
|
8896
|
-
platformId;
|
|
8897
8166
|
_authService = inject(AuthService);
|
|
8898
8167
|
_formBuilder = inject(FormBuilder);
|
|
8899
8168
|
_toastService = inject(ToastService);
|
|
8900
8169
|
_router = inject(Router);
|
|
8901
|
-
constructor(platformId) {
|
|
8902
|
-
this.platformId = platformId;
|
|
8903
|
-
}
|
|
8904
8170
|
showPassword = false;
|
|
8905
8171
|
/**
|
|
8906
8172
|
* Parametro para indicar si tras loguear
|
|
@@ -8945,23 +8211,20 @@ class LoginFormEcComponent {
|
|
|
8945
8211
|
this._toastService.show('login-success');
|
|
8946
8212
|
this.loggedIn = true;
|
|
8947
8213
|
if (this.inCart) {
|
|
8948
|
-
//
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
closeButton.click();
|
|
8960
|
-
}
|
|
8214
|
+
// Si se está en el carrito, se cierra el modal de login
|
|
8215
|
+
const modal = document.getElementById('modalInvitado');
|
|
8216
|
+
if (modal) {
|
|
8217
|
+
const modalInstance = window.bootstrap?.Modal?.getInstance(modal);
|
|
8218
|
+
if (modalInstance) {
|
|
8219
|
+
modalInstance.hide();
|
|
8220
|
+
}
|
|
8221
|
+
else {
|
|
8222
|
+
const closeButton = modal.querySelector('[data-bs-dismiss="modal"]');
|
|
8223
|
+
if (closeButton) {
|
|
8224
|
+
closeButton.click();
|
|
8961
8225
|
}
|
|
8962
8226
|
}
|
|
8963
8227
|
}
|
|
8964
|
-
// La navegación funciona en SSR y browser
|
|
8965
8228
|
this._router.navigateByUrl('/checkout');
|
|
8966
8229
|
}
|
|
8967
8230
|
else {
|
|
@@ -8996,16 +8259,13 @@ class LoginFormEcComponent {
|
|
|
8996
8259
|
togglePassword() {
|
|
8997
8260
|
this.showPassword = !this.showPassword;
|
|
8998
8261
|
}
|
|
8999
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginFormEcComponent, deps: [
|
|
9000
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LoginFormEcComponent, isStandalone: true, selector: "app-login-form-ec", inputs: { redirect: "redirect", redirectTo: "redirectTo", inCart: "inCart" }, outputs: { ready: "ready" }, ngImport: i0, template: "<div class=\"d-flex flex-column position-relative\">\n <h1 class=\"right-line ff-ubuntu-light mb-4\"><span>Ingresar</span></h1>\n <p class=\"ff-ubuntu-light font-sm pr-4 mb-4\">\n Si ya est\u00E1s registrado. Ingresa en tu cuenta con tu email y la\n contrase\u00F1a adecuada.\n </p>\n <div class=\"w-md-50 w-100 text-center\">\n <form [formGroup]=\"loginForm()\" (submit)=\"login($event)\">\n <input class=\"form-control mb-4 radius-0\" type=\"email\" formControlName=\"username\"\n placeholder=\"Correo Electr\u00F3nico\">\n <input class=\"form-control mb-4 radius-0\" type=\"password\" formControlName=\"password\"\n placeholder=\"Contrase\u00F1a\">\n\n <div class=\"row d-flex flex-column\">\n <div class=\"col-12 mb-4\">\n <button type=\"submit\"\n class=\"bg-gray border-0 px-4 py-2 color-white ff-ubuntu-light\">INGRESAR</button>\n </div>\n <div class=\"col-12 d-flex justify-content-center align-items-center\">\n <a [routerLink]=\"'/auth/forgot-password'\" class=\"font-md ff-ubuntu-light\">\n \u00BFOlvid\u00F3 su contrase\u00F1a?\n </a>\n </div>\n </div>\n </form>\n </div>\n @if(loading){\n <app-loading-section-ec></app-loading-section-ec>\n }\n</div>", styles: [""], dependencies: [{ kind: "component", type: LoadingSectionEcComponent, selector: "app-loading-section-ec" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$
|
|
8262
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginFormEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8263
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: LoginFormEcComponent, isStandalone: true, selector: "app-login-form-ec", inputs: { redirect: "redirect", redirectTo: "redirectTo", inCart: "inCart" }, outputs: { ready: "ready" }, ngImport: i0, template: "<div class=\"d-flex flex-column position-relative\">\n <h1 class=\"right-line ff-ubuntu-light mb-4\"><span>Ingresar</span></h1>\n <p class=\"ff-ubuntu-light font-sm pr-4 mb-4\">\n Si ya est\u00E1s registrado. Ingresa en tu cuenta con tu email y la\n contrase\u00F1a adecuada.\n </p>\n <div class=\"w-md-50 w-100 text-center\">\n <form [formGroup]=\"loginForm()\" (submit)=\"login($event)\">\n <input class=\"form-control mb-4 radius-0\" type=\"email\" formControlName=\"username\"\n placeholder=\"Correo Electr\u00F3nico\">\n <input class=\"form-control mb-4 radius-0\" type=\"password\" formControlName=\"password\"\n placeholder=\"Contrase\u00F1a\">\n\n <div class=\"row d-flex flex-column\">\n <div class=\"col-12 mb-4\">\n <button type=\"submit\"\n class=\"bg-gray border-0 px-4 py-2 color-white ff-ubuntu-light\">INGRESAR</button>\n </div>\n <div class=\"col-12 d-flex justify-content-center align-items-center\">\n <a [routerLink]=\"'/auth/forgot-password'\" class=\"font-md ff-ubuntu-light\">\n \u00BFOlvid\u00F3 su contrase\u00F1a?\n </a>\n </div>\n </div>\n </form>\n </div>\n @if(loading){\n <app-loading-section-ec></app-loading-section-ec>\n }\n</div>", styles: [""], dependencies: [{ kind: "component", type: LoadingSectionEcComponent, selector: "app-loading-section-ec" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
9001
8264
|
}
|
|
9002
8265
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoginFormEcComponent, decorators: [{
|
|
9003
8266
|
type: Component,
|
|
9004
8267
|
args: [{ selector: 'app-login-form-ec', standalone: true, imports: [LoadingSectionEcComponent, ReactiveFormsModule, RouterLink, JsonPipe], template: "<div class=\"d-flex flex-column position-relative\">\n <h1 class=\"right-line ff-ubuntu-light mb-4\"><span>Ingresar</span></h1>\n <p class=\"ff-ubuntu-light font-sm pr-4 mb-4\">\n Si ya est\u00E1s registrado. Ingresa en tu cuenta con tu email y la\n contrase\u00F1a adecuada.\n </p>\n <div class=\"w-md-50 w-100 text-center\">\n <form [formGroup]=\"loginForm()\" (submit)=\"login($event)\">\n <input class=\"form-control mb-4 radius-0\" type=\"email\" formControlName=\"username\"\n placeholder=\"Correo Electr\u00F3nico\">\n <input class=\"form-control mb-4 radius-0\" type=\"password\" formControlName=\"password\"\n placeholder=\"Contrase\u00F1a\">\n\n <div class=\"row d-flex flex-column\">\n <div class=\"col-12 mb-4\">\n <button type=\"submit\"\n class=\"bg-gray border-0 px-4 py-2 color-white ff-ubuntu-light\">INGRESAR</button>\n </div>\n <div class=\"col-12 d-flex justify-content-center align-items-center\">\n <a [routerLink]=\"'/auth/forgot-password'\" class=\"font-md ff-ubuntu-light\">\n \u00BFOlvid\u00F3 su contrase\u00F1a?\n </a>\n </div>\n </div>\n </form>\n </div>\n @if(loading){\n <app-loading-section-ec></app-loading-section-ec>\n }\n</div>" }]
|
|
9005
|
-
}],
|
|
9006
|
-
type: Inject,
|
|
9007
|
-
args: [PLATFORM_ID]
|
|
9008
|
-
}] }], propDecorators: { redirect: [{
|
|
8268
|
+
}], propDecorators: { redirect: [{
|
|
9009
8269
|
type: Input
|
|
9010
8270
|
}], redirectTo: [{
|
|
9011
8271
|
type: Input
|
|
@@ -9062,7 +8322,7 @@ class ForgotPasswordEcComponent {
|
|
|
9062
8322
|
}).finally(() => this.loading = false);
|
|
9063
8323
|
};
|
|
9064
8324
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9065
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ForgotPasswordEcComponent, isStandalone: true, selector: "app-forgot-password-ec", ngImport: i0, template: "\n<!-- CONTENIDO -->\n @if(!ready){\n<section class=\"container-fluid mb-3 py-3 py-md-4 bloqueContact\">\n <div class=\"container-xl\">\n <div class=\"row\">\n\n <div class=\"col-12 col-md-8 col-lg-5 m-auto recuperar mt-5\">\n <h2 class=\"fw-600 mt-0 mb-4\">{{ 'recover-password' | translate\n }}</h2>\n <form [formGroup]=\"form\" (submit)=\"recoverPassword($event)\" class=\"mt-0\">\n\n <p for=\"nombre\">{{ 'set-forgot-email' | translate }}</p>\n <input class=\"form-control\" formControlName=\"email\" type='text' name='nombre' id=\"nombre\" value='' placeholder=''>\n\n <div class=\"contSend mt-4\">\n <input class=\"comprar\" type=\"submit\" [disabled]=\"form.invalid\" name='' value='ENVIAR' placeholder=''>\n </div>\n\n </form>\n </div>\n\n </div>\n </div>\n</section>\n} @else {\n <div class=\"row d-flex justify-content-center py-5 \">\n <div class=\"col-12 col-md-8 my-5\">\n <div class=\"element-container text-center\">\n <h3>{{ 'mail-sent' | translate }}</h3>\n </div>\n <div class=\"element-container text-center\">\n <h5 class=\"center-text\">{{ 'check-your-email' | translate }}</h5>\n </div>\n </div>\n </div>\n }", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
8325
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ForgotPasswordEcComponent, isStandalone: true, selector: "app-forgot-password-ec", ngImport: i0, template: "\n<!-- CONTENIDO -->\n @if(!ready){\n<section class=\"container-fluid mb-3 py-3 py-md-4 bloqueContact\">\n <div class=\"container-xl\">\n <div class=\"row\">\n\n <div class=\"col-12 col-md-8 col-lg-5 m-auto recuperar mt-5\">\n <h2 class=\"fw-600 mt-0 mb-4\">{{ 'recover-password' | translate\n }}</h2>\n <form [formGroup]=\"form\" (submit)=\"recoverPassword($event)\" class=\"mt-0\">\n\n <p for=\"nombre\">{{ 'set-forgot-email' | translate }}</p>\n <input class=\"form-control\" formControlName=\"email\" type='text' name='nombre' id=\"nombre\" value='' placeholder=''>\n\n <div class=\"contSend mt-4\">\n <input class=\"comprar\" type=\"submit\" [disabled]=\"form.invalid\" name='' value='ENVIAR' placeholder=''>\n </div>\n\n </form>\n </div>\n\n </div>\n </div>\n</section>\n} @else {\n <div class=\"row d-flex justify-content-center py-5 \">\n <div class=\"col-12 col-md-8 my-5\">\n <div class=\"element-container text-center\">\n <h3>{{ 'mail-sent' | translate }}</h3>\n </div>\n <div class=\"element-container text-center\">\n <h5 class=\"center-text\">{{ 'check-your-email' | translate }}</h5>\n </div>\n </div>\n </div>\n }", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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"] }] });
|
|
9066
8326
|
}
|
|
9067
8327
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ForgotPasswordEcComponent, decorators: [{
|
|
9068
8328
|
type: Component,
|
|
@@ -9084,7 +8344,7 @@ class ConfirmAccountEcComponent {
|
|
|
9084
8344
|
});
|
|
9085
8345
|
}
|
|
9086
8346
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ConfirmAccountEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9087
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ConfirmAccountEcComponent, isStandalone: true, selector: "app-confirm-account-ec", ngImport: i0, template: "<div class=\"my-5 py-5\">\n <div class=\"row\">\n <div class=\"col-md-12 col-12 text-center\">\n <h4 class=\"confirm-title py-3 text-uppercase d-inline-block\">\n {{ ('thanks-for-register' | translate) | uppercase }}</h4>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12 col-12 text-center\">\n <h4>{{ 'thanks-for-register-detail' | translate }}</h4>\n <a href=\"/auth/login\">\n <button class=\"btn btn-primary my-4\" type=\"button\">{{ 'login' | translate |\n uppercase }}</button>\n </a>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
8347
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ConfirmAccountEcComponent, isStandalone: true, selector: "app-confirm-account-ec", ngImport: i0, template: "<div class=\"my-5 py-5\">\n <div class=\"row\">\n <div class=\"col-md-12 col-12 text-center\">\n <h4 class=\"confirm-title py-3 text-uppercase d-inline-block\">\n {{ ('thanks-for-register' | translate) | uppercase }}</h4>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-md-12 col-12 text-center\">\n <h4>{{ 'thanks-for-register-detail' | translate }}</h4>\n <a href=\"/auth/login\">\n <button class=\"btn btn-primary my-4\" type=\"button\">{{ 'login' | translate |\n uppercase }}</button>\n </a>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }] });
|
|
9088
8348
|
}
|
|
9089
8349
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ConfirmAccountEcComponent, decorators: [{
|
|
9090
8350
|
type: Component,
|
|
@@ -9218,7 +8478,7 @@ class RegisterFormEcComponent {
|
|
|
9218
8478
|
this.showPassword = !this.showPassword;
|
|
9219
8479
|
}
|
|
9220
8480
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RegisterFormEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9221
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: RegisterFormEcComponent, isStandalone: true, selector: "app-register-form-ec", inputs: { redirect: "redirect" }, outputs: { ready: "ready" }, ngImport: i0, template: "<div class=\"w-100 pl-md-5 position-relative\" id=\"register\">\n <div class=\"py-2\">\n <h5>CREAR CUENTA</h5>\n </div>\n <form id=\"registro\" [formGroup]=\"registerForm\" (submit)=\"register($event)\">\n <div class=\"form-group\">\n <label for=\"\" class=\"form-label\">NOMBRE</label>\n <input formControlName=\"firstName\" class=\"form-control rounded-0\" type=\"text\" placeholder=\"Nombre\">\n </div>\n <div class=\"form-group\">\n <label for=\"\" class=\"form-label\">APELLIDO</label>\n <input formControlName=\"lastName\" class=\"form-control rounded-0\" type=\"text\" placeholder=\"Apellido\">\n </div>\n <div class=\"form-group\">\n <label for=\"\" class=\"\">CORREO ELECTRONICO</label>\n <input formControlName=\"email\" email required class=\"form-control rounded-0\" type=\"email\"\n placeholder=\"Correo electr\u00F3nico\">\n </div>\n <div class=\"form-group\">\n <label for=\"\" class=\"form-label\">CONTRASE\u00D1A</label>\n <input formControlName=\"plainPassword\" required class=\"form-control rounded-0\" type=\"password\"\n placeholder=\"Contrase\u00F1a\">\n </div>\n <div class=\"form-group\">\n <label for=\"\" class=\"form-label\">REPETIR CONTRASE\u00D1A</label>\n <input formControlName=\"plainPassword2\" required class=\"form-control rounded-0\" type=\"password\"\n placeholder=\"Repetir contrase\u00F1a\">\n </div>\n\n <div class=\"custom-control d-flex flex-row form-check custom-checkbox mr-sm-2 mt-4 mb-2\">\n <input type=\"checkbox\" formControlName=\"terms\" required class=\"custom-control-input form-check-input\" name=\"Color2\"\n id=\"Color2\">\n <label class=\"custom-control-label ff-ubuntu-light font-sm form-check-label\" for=\"Color2\"> He\n le\u00EDdo y acepto las pol\u00EDticas de privacidad y los t\u00E9rminos y\n condiciones</label>\n </div>\n\n <div class=\"custom-control d-flex flex-row form-check custom-checkbox mr-sm-2 mb-4\">\n <input type=\"checkbox\" formControlName=\"newsletter\" class=\"custom-control-input form-check-input\" name=\"Color3\" id=\"Color3\">\n <label class=\"custom-control-label form-check-label ff-ubuntu-light font-sm\" for=\"Color3\">\n Suscripci\u00F3n al Newsletter</label>\n </div>\n\n <div class=\"row\">\n <div class=\"col-12\">\n <button [disabled]=\"registerForm.invalid\" type=\"submit\"\n class=\"btn btn-primary px-5 py-2 h-fit\">CREAR</button>\n </div>\n </div>\n </form>\n @if(loading){\n <app-loading-section-ec />\n }\n \n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$
|
|
8481
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: RegisterFormEcComponent, isStandalone: true, selector: "app-register-form-ec", inputs: { redirect: "redirect" }, outputs: { ready: "ready" }, ngImport: i0, template: "<div class=\"w-100 pl-md-5 position-relative\" id=\"register\">\n <div class=\"py-2\">\n <h5>CREAR CUENTA</h5>\n </div>\n <form id=\"registro\" [formGroup]=\"registerForm\" (submit)=\"register($event)\">\n <div class=\"form-group\">\n <label for=\"\" class=\"form-label\">NOMBRE</label>\n <input formControlName=\"firstName\" class=\"form-control rounded-0\" type=\"text\" placeholder=\"Nombre\">\n </div>\n <div class=\"form-group\">\n <label for=\"\" class=\"form-label\">APELLIDO</label>\n <input formControlName=\"lastName\" class=\"form-control rounded-0\" type=\"text\" placeholder=\"Apellido\">\n </div>\n <div class=\"form-group\">\n <label for=\"\" class=\"\">CORREO ELECTRONICO</label>\n <input formControlName=\"email\" email required class=\"form-control rounded-0\" type=\"email\"\n placeholder=\"Correo electr\u00F3nico\">\n </div>\n <div class=\"form-group\">\n <label for=\"\" class=\"form-label\">CONTRASE\u00D1A</label>\n <input formControlName=\"plainPassword\" required class=\"form-control rounded-0\" type=\"password\"\n placeholder=\"Contrase\u00F1a\">\n </div>\n <div class=\"form-group\">\n <label for=\"\" class=\"form-label\">REPETIR CONTRASE\u00D1A</label>\n <input formControlName=\"plainPassword2\" required class=\"form-control rounded-0\" type=\"password\"\n placeholder=\"Repetir contrase\u00F1a\">\n </div>\n\n <div class=\"custom-control d-flex flex-row form-check custom-checkbox mr-sm-2 mt-4 mb-2\">\n <input type=\"checkbox\" formControlName=\"terms\" required class=\"custom-control-input form-check-input\" name=\"Color2\"\n id=\"Color2\">\n <label class=\"custom-control-label ff-ubuntu-light font-sm form-check-label\" for=\"Color2\"> He\n le\u00EDdo y acepto las pol\u00EDticas de privacidad y los t\u00E9rminos y\n condiciones</label>\n </div>\n\n <div class=\"custom-control d-flex flex-row form-check custom-checkbox mr-sm-2 mb-4\">\n <input type=\"checkbox\" formControlName=\"newsletter\" class=\"custom-control-input form-check-input\" name=\"Color3\" id=\"Color3\">\n <label class=\"custom-control-label form-check-label ff-ubuntu-light font-sm\" for=\"Color3\">\n Suscripci\u00F3n al Newsletter</label>\n </div>\n\n <div class=\"row\">\n <div class=\"col-12\">\n <button [disabled]=\"registerForm.invalid\" type=\"submit\"\n class=\"btn btn-primary px-5 py-2 h-fit\">CREAR</button>\n </div>\n </div>\n </form>\n @if(loading){\n <app-loading-section-ec />\n }\n \n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i1$3.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { 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: LoadingSectionEcComponent, selector: "app-loading-section-ec" }] });
|
|
9222
8482
|
}
|
|
9223
8483
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RegisterFormEcComponent, decorators: [{
|
|
9224
8484
|
type: Component,
|
|
@@ -9360,7 +8620,7 @@ class RegisterWholesalerFormEcComponent {
|
|
|
9360
8620
|
this.form.controls['provinceName'].setValue(provinces.find((province) => province.code == value).name);
|
|
9361
8621
|
};
|
|
9362
8622
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RegisterWholesalerFormEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9363
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: RegisterWholesalerFormEcComponent, isStandalone: true, selector: "app-register-wholesaler-form-ec", inputs: { redirect: "redirect" }, outputs: { ready: "ready" }, ngImport: i0, template: "<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"\">\n <div class=\"pt-5 pb-3 border-bottom\">\n <h3 class=\"my-auto mx-2 text-left w-fit bold text-beige1 white-space-md-nowrap\">CREAR CUENTA\n MAYORISTA</h3>\n </div>\n <div class=\" py-3\">\n <p>Si todavia no tienes una cuenta de grandes consumidores en nuestra plataforma, registrate\n ingresando estos\n datos:</p>\n </div>\n <form [formGroup]=\"form\" (submit)=\"register($event)\" class=\"position-relative\">\n <div class=\"row w-100 mx-auto d-flex justify-content-center px-0 py-3\">\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Nombre</label>\n <input type=\"text\" id=\"\" placeholder=\"Nombre\" required name=\"firstName\"\n formControlName=\"firstName\"\n [class]=\"form.controls['firstName'].touched ? (form.controls['firstName'].valid && form.controls['firstName'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">El nombre es un campo obligatorio.</span>\n </div>\n </div>\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Apellidos</label>\n <input type=\"text\" id=\"\" placeholder=\"Apellido\" required name=\"lastName\"\n formControlName=\"lastName\"\n [class]=\"form.controls['lastName'].touched ? (form.controls['lastName'].valid && form.controls['lastName'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">El apellido es un campo obligatorio.</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Email</label>\n <input type=\"email\" id=\"\" placeholder=\"Email\" email required name=\"email\"\n formControlName=\"email\"\n [class]=\"form.controls['email'].touched ? (form.controls['email'].valid && form.controls['email'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">El email no posee un formato correcto.</span>\n </div>\n </div>\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Contrase\u00F1a</label>\n <input type=\"password\" id=\"\" placeholder=\"Contrase\u00F1a\" required name=\"plainPassword\"\n formControlName=\"plainPassword\"\n [class]=\"form.controls['plainPassword'].touched ? (form.controls['plainPassword'].valid && form.controls['plainPassword'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">La contrase\u00F1a es un campo obligatorio.</span>\n </div>\n </div>\n @if(documentTypes$ | async; as documentTypes){\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'document-type'|translate}}</label>\n <select name=\"documentType\" formControlName=\"documentType\" required\n [class]=\"form.controls['documentType'].touched ? (form.controls['documentType'].valid && form.controls['documentType'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <option [value]=\"null\" id=\"selectDocumentType\" disabled>Seleccione un tipo</option>\n @for (type of documentTypes; track $index) {\n <option [value]=\"type.code\">{{ type.name }}</option>\n }\n </select>\n <span class=\"invalid-feedback\">{{'document-type-help'|translate}}</span>\n </div>\n </div>\n }\n\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'document-number'|translate}}</label>\n <input type=\"text\" id=\"\" placeholder=\"{{'document-number'|translate}}\" required\n name=\"documentNumber\" formControlName=\"documentNumber\"\n [class]=\"form.controls['documentNumber'].touched ? (form.controls['documentNumber'].valid && form.controls['documentNumber'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">{{'document-type-help'|translate}}</span>\n </div>\n </div>\n\n @if(countries$ | async; as countries ){\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'country'|translate}}</label>\n <select name=\"countryCode\" formControlName=\"countryCode\" required (change)=\"onCountrySelected($event)\"\n [class]=\"form.controls['countryCode'].touched ? (form.controls['countryCode'].valid && form.controls['countryCode'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <option [value]=\"null\" id=\"selectOpPais\" disabled>Seleccione un pais</option>\n @for (country of countries; track $index) {\n <option [value]=\"country.code\"> {{ country.name }}</option>\n }\n </select>\n <span class=\"invalid-feedback\">{{'country-help'|translate}}</span>\n </div>\n </div>\n }\n @if(provinces$ |async ; as provinces){\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'state'|translate}}</label>\n <select name=\"provinceCode\" formControlName=\"provinceCode\" required (change)=\"onProvincesSelected($event, provinces)\"\n [class]=\"form.controls['provinceCode'].touched ? (form.controls['provinceCode'].valid && form.controls['provinceCode'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <option [value]=\"null\" id=\"selectOpProvincia\" disabled>Seleccione una provincia\n </option>\n @for (province of provinces; track $index) {\n <option [value]=\"province.code\">{{ province.name }}</option>\n }\n </select>\n <span class=\"invalid-feedback\">{{'state-help'|translate}}</span>\n </div>\n </div>\n }\n\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'address'|translate}}</label>\n <input placeholder=\"{{'address'|translate}}\" required type=\"text\" name=\"street\"\n formControlName=\"street\"\n [class]=\"form.controls['street'].touched ? (form.controls['street'].valid && form.controls['street'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">{{'address-help1'|translate}}</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'town-city'|translate}}</label>\n <input placeholder=\"{{'town-city'|translate}}\" required type=\"text\" name=\"city\"\n formControlName=\"city\"\n [class]=\"form.controls['city'].touched ? (form.controls['city'].valid && form.controls['city'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">{{'town-city-help'|translate}}</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'postal-code'|translate}}</label>\n <input placeholder=\"{{'postal-code'|translate}}\" required type=\"text\" name=\"postcode\"\n formControlName=\"postcode\"\n [class]=\"form.controls['postcode'].touched ? (form.controls['postcode'].valid && form.controls['postcode'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">{{'postal-code-help'|translate}}</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Nombre compa\u00F1\u00EDa</label>\n <input type=\"text\" id=\"\" placeholder=\"Nombre compa\u00F1\u00EDa\" required name=\"companyName\"\n formControlName=\"companyName\"\n [class]=\"form.controls['companyName'].touched ? (form.controls['companyName'].valid && form.controls['companyName'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">El nombre compa\u00F1\u00EDa es un campo obligatorio.</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'phone'|translate}}</label>\n <input type=\"text\" id=\"\" placeholder=\"{{'phone'|translate}}\" required name=\"phoneNumber\"\n formControlName=\"phoneNumber\"\n [class]=\"form.controls['phoneNumber'].touched ? (form.controls['phoneNumber'].valid && form.controls['phoneNumber'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">El numero de telefono es un campo obligatorio.</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Sexo</label>\n <select required name=\"gender\" formControlName=\"gender\"\n [class]=\"form.controls['gender'].touched ? (form.controls['gender'].valid && form.controls['gender'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <option value=\"null\" id=\"selectOpSexo\">Sexo</option>\n <option value=\"u\">Desconocido</option>\n <option value=\"s\">Femenino</option>\n <option value=\"m\">Masculino</option>\n </select>\n <span class=\"invalid-feedback\">El sexo es un campo obligatorio.</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Fecha creacion</label>\n <input type=\"date\" id=\"\" placeholder=\"Fecha creacion\" required name=\"birthday\"\n formControlName=\"birthday\"\n [class]=\"form.controls['birthday'].touched ? (form.controls['birthday'].valid && form.controls['birthday'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">La fecha de creacion es un campo obligatorio.</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Identificacion</label>\n <input type=\"text\" id=\"\" placeholder=\"Identificacion\" required name=\"taxIdentification\"\n formControlName=\"taxIdentification\"\n [class]=\"form.controls['taxIdentification'].touched ? (form.controls['taxIdentification'].valid && form.controls['taxIdentification'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">La identificacion de la compa\u00F1\u00EDa es un campo\n obligatorio.</span>\n </div>\n </div>\n <div class=\"col-12 col-md-6 px-0 py-4 pl-md-1 \">\n <div class=\"form-check py-2\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"\" id=\"terms\" name=\"terms\"\n formControlName=\"terms\" type=\"checkbox\">\n <label for=\"terms\" class=\"form-check-label\">Acepto los <a\n [routerLink]=\"['/section/terminos-y-condiciones']\"\n routerLinkActive=\"router-link-active\" class=\"text-primary\">t\u00E9rminos y\n condiciones *</a></label>\n </div>\n </div>\n <div class=\"col-12 col-md-6 px-0 py-4 pl-md-1\">\n <div class=\"form-check py-2\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"\" id=\"defaultCheck2\"\n name=\"subscribedToNewsletter\" formControlName=\"subscribedToNewsletter\"\n type=\"checkbox\">\n <label class=\"form-check-label\" for=\"defaultCheck2\">\n Suscripci\u00F3n al newsletter\n </label>\n </div>\n </div>\n\n <div\n class=\"col-12 col-md-6 px-0 py-4 pr-md-1 d-flex justify-content-md-start order-2 order-md-1\">\n\n <button type=\"submit\" role=\"button\" [disabled]=\"form.invalid\"\n class=\"btn btn-primary rounded-0 px-5 py-2 w-100 w-md-auto h-fit\">REGISTRATE</button>\n </div>\n\n </div>\n <pre>{{form.value | json}}</pre>\n @if(loading){\n <app-loading-section-ec />\n }\n </form>\n </div>\n </div>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "component", type: LoadingSectionEcComponent, selector: "app-loading-section-ec" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$4.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$4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { kind: "directive", type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
8623
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: RegisterWholesalerFormEcComponent, isStandalone: true, selector: "app-register-wholesaler-form-ec", inputs: { redirect: "redirect" }, outputs: { ready: "ready" }, ngImport: i0, template: "<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12\">\n <div class=\"\">\n <div class=\"pt-5 pb-3 border-bottom\">\n <h3 class=\"my-auto mx-2 text-left w-fit bold text-beige1 white-space-md-nowrap\">CREAR CUENTA\n MAYORISTA</h3>\n </div>\n <div class=\" py-3\">\n <p>Si todavia no tienes una cuenta de grandes consumidores en nuestra plataforma, registrate\n ingresando estos\n datos:</p>\n </div>\n <form [formGroup]=\"form\" (submit)=\"register($event)\" class=\"position-relative\">\n <div class=\"row w-100 mx-auto d-flex justify-content-center px-0 py-3\">\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Nombre</label>\n <input type=\"text\" id=\"\" placeholder=\"Nombre\" required name=\"firstName\"\n formControlName=\"firstName\"\n [class]=\"form.controls['firstName'].touched ? (form.controls['firstName'].valid && form.controls['firstName'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">El nombre es un campo obligatorio.</span>\n </div>\n </div>\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Apellidos</label>\n <input type=\"text\" id=\"\" placeholder=\"Apellido\" required name=\"lastName\"\n formControlName=\"lastName\"\n [class]=\"form.controls['lastName'].touched ? (form.controls['lastName'].valid && form.controls['lastName'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">El apellido es un campo obligatorio.</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Email</label>\n <input type=\"email\" id=\"\" placeholder=\"Email\" email required name=\"email\"\n formControlName=\"email\"\n [class]=\"form.controls['email'].touched ? (form.controls['email'].valid && form.controls['email'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">El email no posee un formato correcto.</span>\n </div>\n </div>\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Contrase\u00F1a</label>\n <input type=\"password\" id=\"\" placeholder=\"Contrase\u00F1a\" required name=\"plainPassword\"\n formControlName=\"plainPassword\"\n [class]=\"form.controls['plainPassword'].touched ? (form.controls['plainPassword'].valid && form.controls['plainPassword'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">La contrase\u00F1a es un campo obligatorio.</span>\n </div>\n </div>\n @if(documentTypes$ | async; as documentTypes){\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'document-type'|translate}}</label>\n <select name=\"documentType\" formControlName=\"documentType\" required\n [class]=\"form.controls['documentType'].touched ? (form.controls['documentType'].valid && form.controls['documentType'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <option [value]=\"null\" id=\"selectDocumentType\" disabled>Seleccione un tipo</option>\n @for (type of documentTypes; track $index) {\n <option [value]=\"type.code\">{{ type.name }}</option>\n }\n </select>\n <span class=\"invalid-feedback\">{{'document-type-help'|translate}}</span>\n </div>\n </div>\n }\n\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'document-number'|translate}}</label>\n <input type=\"text\" id=\"\" placeholder=\"{{'document-number'|translate}}\" required\n name=\"documentNumber\" formControlName=\"documentNumber\"\n [class]=\"form.controls['documentNumber'].touched ? (form.controls['documentNumber'].valid && form.controls['documentNumber'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">{{'document-type-help'|translate}}</span>\n </div>\n </div>\n\n @if(countries$ | async; as countries ){\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'country'|translate}}</label>\n <select name=\"countryCode\" formControlName=\"countryCode\" required (change)=\"onCountrySelected($event)\"\n [class]=\"form.controls['countryCode'].touched ? (form.controls['countryCode'].valid && form.controls['countryCode'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <option [value]=\"null\" id=\"selectOpPais\" disabled>Seleccione un pais</option>\n @for (country of countries; track $index) {\n <option [value]=\"country.code\"> {{ country.name }}</option>\n }\n </select>\n <span class=\"invalid-feedback\">{{'country-help'|translate}}</span>\n </div>\n </div>\n }\n @if(provinces$ |async ; as provinces){\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'state'|translate}}</label>\n <select name=\"provinceCode\" formControlName=\"provinceCode\" required (change)=\"onProvincesSelected($event, provinces)\"\n [class]=\"form.controls['provinceCode'].touched ? (form.controls['provinceCode'].valid && form.controls['provinceCode'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <option [value]=\"null\" id=\"selectOpProvincia\" disabled>Seleccione una provincia\n </option>\n @for (province of provinces; track $index) {\n <option [value]=\"province.code\">{{ province.name }}</option>\n }\n </select>\n <span class=\"invalid-feedback\">{{'state-help'|translate}}</span>\n </div>\n </div>\n }\n\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'address'|translate}}</label>\n <input placeholder=\"{{'address'|translate}}\" required type=\"text\" name=\"street\"\n formControlName=\"street\"\n [class]=\"form.controls['street'].touched ? (form.controls['street'].valid && form.controls['street'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">{{'address-help1'|translate}}</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'town-city'|translate}}</label>\n <input placeholder=\"{{'town-city'|translate}}\" required type=\"text\" name=\"city\"\n formControlName=\"city\"\n [class]=\"form.controls['city'].touched ? (form.controls['city'].valid && form.controls['city'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">{{'town-city-help'|translate}}</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pl-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'postal-code'|translate}}</label>\n <input placeholder=\"{{'postal-code'|translate}}\" required type=\"text\" name=\"postcode\"\n formControlName=\"postcode\"\n [class]=\"form.controls['postcode'].touched ? (form.controls['postcode'].valid && form.controls['postcode'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">{{'postal-code-help'|translate}}</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Nombre compa\u00F1\u00EDa</label>\n <input type=\"text\" id=\"\" placeholder=\"Nombre compa\u00F1\u00EDa\" required name=\"companyName\"\n formControlName=\"companyName\"\n [class]=\"form.controls['companyName'].touched ? (form.controls['companyName'].valid && form.controls['companyName'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">El nombre compa\u00F1\u00EDa es un campo obligatorio.</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">{{'phone'|translate}}</label>\n <input type=\"text\" id=\"\" placeholder=\"{{'phone'|translate}}\" required name=\"phoneNumber\"\n formControlName=\"phoneNumber\"\n [class]=\"form.controls['phoneNumber'].touched ? (form.controls['phoneNumber'].valid && form.controls['phoneNumber'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">El numero de telefono es un campo obligatorio.</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Sexo</label>\n <select required name=\"gender\" formControlName=\"gender\"\n [class]=\"form.controls['gender'].touched ? (form.controls['gender'].valid && form.controls['gender'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <option value=\"null\" id=\"selectOpSexo\">Sexo</option>\n <option value=\"u\">Desconocido</option>\n <option value=\"s\">Femenino</option>\n <option value=\"m\">Masculino</option>\n </select>\n <span class=\"invalid-feedback\">El sexo es un campo obligatorio.</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Fecha creacion</label>\n <input type=\"date\" id=\"\" placeholder=\"Fecha creacion\" required name=\"birthday\"\n formControlName=\"birthday\"\n [class]=\"form.controls['birthday'].touched ? (form.controls['birthday'].valid && form.controls['birthday'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">La fecha de creacion es un campo obligatorio.</span>\n </div>\n </div>\n\n <div class=\"col-12 col-md-6 px-0 pr-md-1\">\n <div class=\"form-group\">\n <label for=\"\">Identificacion</label>\n <input type=\"text\" id=\"\" placeholder=\"Identificacion\" required name=\"taxIdentification\"\n formControlName=\"taxIdentification\"\n [class]=\"form.controls['taxIdentification'].touched ? (form.controls['taxIdentification'].valid && form.controls['taxIdentification'].touched) ? 'form-control rounded-0 is-valid' : 'form-control rounded-0 is-invalid' : 'form-control rounded-0'\">\n <span class=\"invalid-feedback\">La identificacion de la compa\u00F1\u00EDa es un campo\n obligatorio.</span>\n </div>\n </div>\n <div class=\"col-12 col-md-6 px-0 py-4 pl-md-1 \">\n <div class=\"form-check py-2\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"\" id=\"terms\" name=\"terms\"\n formControlName=\"terms\" type=\"checkbox\">\n <label for=\"terms\" class=\"form-check-label\">Acepto los <a\n [routerLink]=\"['/section/terminos-y-condiciones']\"\n routerLinkActive=\"router-link-active\" class=\"text-primary\">t\u00E9rminos y\n condiciones *</a></label>\n </div>\n </div>\n <div class=\"col-12 col-md-6 px-0 py-4 pl-md-1\">\n <div class=\"form-check py-2\">\n <input class=\"form-check-input\" type=\"checkbox\" value=\"\" id=\"defaultCheck2\"\n name=\"subscribedToNewsletter\" formControlName=\"subscribedToNewsletter\"\n type=\"checkbox\">\n <label class=\"form-check-label\" for=\"defaultCheck2\">\n Suscripci\u00F3n al newsletter\n </label>\n </div>\n </div>\n\n <div\n class=\"col-12 col-md-6 px-0 py-4 pr-md-1 d-flex justify-content-md-start order-2 order-md-1\">\n\n <button type=\"submit\" role=\"button\" [disabled]=\"form.invalid\"\n class=\"btn btn-primary rounded-0 px-5 py-2 w-100 w-md-auto h-fit\">REGISTRATE</button>\n </div>\n\n </div>\n <pre>{{form.value | json}}</pre>\n @if(loading){\n <app-loading-section-ec />\n }\n </form>\n </div>\n </div>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "component", type: LoadingSectionEcComponent, selector: "app-loading-section-ec" }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.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: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { 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: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: JsonPipe, name: "json" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
9364
8624
|
}
|
|
9365
8625
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RegisterWholesalerFormEcComponent, decorators: [{
|
|
9366
8626
|
type: Component,
|
|
@@ -9433,42 +8693,38 @@ class PasswordResetEcComponent extends ComponentHelper {
|
|
|
9433
8693
|
};
|
|
9434
8694
|
sendToLogin = () => this.router.navigateByUrl('/auth/login');
|
|
9435
8695
|
showPassword = () => {
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
passwordInput.type = 'password';
|
|
9445
|
-
}
|
|
9446
|
-
showIcon?.classList.toggle('d-none');
|
|
9447
|
-
hideIcon?.classList.toggle('d-none');
|
|
8696
|
+
const passwordInput = document.getElementById('contraseña1');
|
|
8697
|
+
const showIcon = document.getElementById('show1');
|
|
8698
|
+
const hideIcon = document.getElementById('hide1');
|
|
8699
|
+
if (passwordInput.type === 'password') {
|
|
8700
|
+
passwordInput.type = 'text';
|
|
8701
|
+
}
|
|
8702
|
+
else {
|
|
8703
|
+
passwordInput.type = 'password';
|
|
9448
8704
|
}
|
|
8705
|
+
showIcon?.classList.toggle('d-none');
|
|
8706
|
+
hideIcon?.classList.toggle('d-none');
|
|
9449
8707
|
};
|
|
9450
8708
|
showPassword2 = () => {
|
|
9451
|
-
|
|
9452
|
-
|
|
9453
|
-
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
passwordInput.type = 'text';
|
|
9457
|
-
}
|
|
9458
|
-
else if (passwordInput) {
|
|
9459
|
-
passwordInput.type = 'password';
|
|
9460
|
-
}
|
|
9461
|
-
showIcon?.classList.toggle('d-none');
|
|
9462
|
-
hideIcon?.classList.toggle('d-none');
|
|
8709
|
+
const passwordInput = document.getElementById('contraseña2');
|
|
8710
|
+
const showIcon = document.getElementById('show2');
|
|
8711
|
+
const hideIcon = document.getElementById('hide2');
|
|
8712
|
+
if (passwordInput.type === 'password') {
|
|
8713
|
+
passwordInput.type = 'text';
|
|
9463
8714
|
}
|
|
8715
|
+
else {
|
|
8716
|
+
passwordInput.type = 'password';
|
|
8717
|
+
}
|
|
8718
|
+
showIcon?.classList.toggle('d-none');
|
|
8719
|
+
hideIcon?.classList.toggle('d-none');
|
|
9464
8720
|
};
|
|
9465
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PasswordResetEcComponent, deps: [{ token: AuthService }, { token: ToastService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i1$
|
|
9466
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PasswordResetEcComponent, isStandalone: true, selector: "app-password-reset-ec", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\n <div class=\"row justify-content-center py-5\">\n <div class=\"col-12 col-md-6 col-lg-4\">\n @if(!ready){\n <form [formGroup]=\"formGroup\" (submit)=\"sendNewPassword($event)\">\n <div class=\"mb-4 text-center\">\n <h3>{{ 'set-new-password' | translate }}</h3>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{ 'set-password' | translate }}</label>\n <div class=\"input-group\">\n <input type=\"password\" formControlName=\"first\" class=\"form-control\" id=\"contrase\u00F1a1\" />\n <button class=\"btn btn-outline-secondary btn-password\" type=\"button\" (click)=\"showPassword()\">\n <i id=\"show1\" class=\"fas fa-eye i-show-password\"></i>\n <i id=\"hide1\" class=\"fas fa-eye-slash d-none i-show-password\"></i>\n </button>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{ 'repeat-password' | translate }}</label>\n <div class=\"input-group\">\n <input type=\"password\" formControlName=\"second\" class=\"form-control\" id=\"contrase\u00F1a2\" />\n <button class=\"btn btn-outline-secondary btn-password\" type=\"button\" (click)=\"showPassword2()\">\n <i id=\"show2\" class=\"fas fa-eye i-show-password\"></i>\n <i id=\"hide2\" class=\"fas fa-eye-slash d-none i-show-password\"></i>\n </button>\n </div>\n </div>\n <div class=\"mt-4 text-center\">\n <button type=\"submit\" class=\"comprar w-100\">{{ 'update' | translate }}</button>\n </div>\n @if(loading){\n <app-loading-inline-ec></app-loading-inline-ec>\n }\n </form>\n }@else {<div class=\"row justify-content-center mt-5 mb-5\">\n <div class=\"text-center\">\n <div class=\"mb-4\">\n <h3>{{ 'updated-password' | translate }}</h3>\n </div>\n <div class=\"mb-4\">\n <h5>{{ 'updated-password-detail' | translate }}</h5>\n </div>\n <button class=\"comprar\" (click)=\"sendToLogin()\">{{ 'login' | translate }}</button>\n </div>\n </div>}\n\n\n\n </div>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
8721
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PasswordResetEcComponent, deps: [{ token: AuthService }, { token: ToastService }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
8722
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PasswordResetEcComponent, isStandalone: true, selector: "app-password-reset-ec", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\n <div class=\"row justify-content-center py-5\">\n <div class=\"col-12 col-md-6 col-lg-4\">\n @if(!ready){\n <form [formGroup]=\"formGroup\" (submit)=\"sendNewPassword($event)\">\n <div class=\"mb-4 text-center\">\n <h3>{{ 'set-new-password' | translate }}</h3>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{ 'set-password' | translate }}</label>\n <div class=\"input-group\">\n <input type=\"password\" formControlName=\"first\" class=\"form-control\" id=\"contrase\u00F1a1\" />\n <button class=\"btn btn-outline-secondary btn-password\" type=\"button\" (click)=\"showPassword()\">\n <i id=\"show1\" class=\"fas fa-eye i-show-password\"></i>\n <i id=\"hide1\" class=\"fas fa-eye-slash d-none i-show-password\"></i>\n </button>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{ 'repeat-password' | translate }}</label>\n <div class=\"input-group\">\n <input type=\"password\" formControlName=\"second\" class=\"form-control\" id=\"contrase\u00F1a2\" />\n <button class=\"btn btn-outline-secondary btn-password\" type=\"button\" (click)=\"showPassword2()\">\n <i id=\"show2\" class=\"fas fa-eye i-show-password\"></i>\n <i id=\"hide2\" class=\"fas fa-eye-slash d-none i-show-password\"></i>\n </button>\n </div>\n </div>\n <div class=\"mt-4 text-center\">\n <button type=\"submit\" class=\"comprar w-100\">{{ 'update' | translate }}</button>\n </div>\n @if(loading){\n <app-loading-inline-ec></app-loading-inline-ec>\n }\n </form>\n }@else {<div class=\"row justify-content-center mt-5 mb-5\">\n <div class=\"text-center\">\n <div class=\"mb-4\">\n <h3>{{ 'updated-password' | translate }}</h3>\n </div>\n <div class=\"mb-4\">\n <h5>{{ 'updated-password-detail' | translate }}</h5>\n </div>\n <button class=\"comprar\" (click)=\"sendToLogin()\">{{ 'login' | translate }}</button>\n </div>\n </div>}\n\n\n\n </div>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: LoadingInlineEcComponent, selector: "app-loading-inline-ec", inputs: ["type"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { 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"] }] });
|
|
9467
8723
|
}
|
|
9468
8724
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PasswordResetEcComponent, decorators: [{
|
|
9469
8725
|
type: Component,
|
|
9470
8726
|
args: [{ selector: 'app-password-reset-ec', imports: [TranslateModule, LoadingInlineEcComponent, ReactiveFormsModule], standalone: true, template: "<div class=\"container\">\n <div class=\"row justify-content-center py-5\">\n <div class=\"col-12 col-md-6 col-lg-4\">\n @if(!ready){\n <form [formGroup]=\"formGroup\" (submit)=\"sendNewPassword($event)\">\n <div class=\"mb-4 text-center\">\n <h3>{{ 'set-new-password' | translate }}</h3>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{ 'set-password' | translate }}</label>\n <div class=\"input-group\">\n <input type=\"password\" formControlName=\"first\" class=\"form-control\" id=\"contrase\u00F1a1\" />\n <button class=\"btn btn-outline-secondary btn-password\" type=\"button\" (click)=\"showPassword()\">\n <i id=\"show1\" class=\"fas fa-eye i-show-password\"></i>\n <i id=\"hide1\" class=\"fas fa-eye-slash d-none i-show-password\"></i>\n </button>\n </div>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{ 'repeat-password' | translate }}</label>\n <div class=\"input-group\">\n <input type=\"password\" formControlName=\"second\" class=\"form-control\" id=\"contrase\u00F1a2\" />\n <button class=\"btn btn-outline-secondary btn-password\" type=\"button\" (click)=\"showPassword2()\">\n <i id=\"show2\" class=\"fas fa-eye i-show-password\"></i>\n <i id=\"hide2\" class=\"fas fa-eye-slash d-none i-show-password\"></i>\n </button>\n </div>\n </div>\n <div class=\"mt-4 text-center\">\n <button type=\"submit\" class=\"comprar w-100\">{{ 'update' | translate }}</button>\n </div>\n @if(loading){\n <app-loading-inline-ec></app-loading-inline-ec>\n }\n </form>\n }@else {<div class=\"row justify-content-center mt-5 mb-5\">\n <div class=\"text-center\">\n <div class=\"mb-4\">\n <h3>{{ 'updated-password' | translate }}</h3>\n </div>\n <div class=\"mb-4\">\n <h5>{{ 'updated-password-detail' | translate }}</h5>\n </div>\n <button class=\"comprar\" (click)=\"sendToLogin()\">{{ 'login' | translate }}</button>\n </div>\n </div>}\n\n\n\n </div>\n </div>\n</div>" }]
|
|
9471
|
-
}], ctorParameters: () => [{ type: AuthService }, { type: ToastService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i1$
|
|
8727
|
+
}], ctorParameters: () => [{ type: AuthService }, { type: ToastService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i1$3.FormBuilder }] });
|
|
9472
8728
|
|
|
9473
8729
|
class FiltersEcComponent {
|
|
9474
8730
|
_authService = inject(AuthService);
|
|
@@ -9482,7 +8738,6 @@ class FiltersEcComponent {
|
|
|
9482
8738
|
injector = inject(Injector);
|
|
9483
8739
|
isAuthenticated$ = this._authService.isAuthenticated();
|
|
9484
8740
|
hidePrices = false;
|
|
9485
|
-
route = inject(ActivatedRoute);
|
|
9486
8741
|
setSelect;
|
|
9487
8742
|
ngOnInit() {
|
|
9488
8743
|
}
|
|
@@ -9512,56 +8767,26 @@ class FiltersEcComponent {
|
|
|
9512
8767
|
.pop()
|
|
9513
8768
|
selectedOption && this._filtersService.setFilterSelected(this.filters[0], selectedOption) */
|
|
9514
8769
|
}
|
|
9515
|
-
/**
|
|
9516
|
-
* Maneja el click sobre un elemento de filtro (categoría, atributo, etc.).
|
|
9517
|
-
*
|
|
9518
|
-
* - Para categorías: navega a la URL de la categoría.
|
|
9519
|
-
* - Para atributos: actualiza la query string de la URL con `attributeCodes`.
|
|
9520
|
-
* - Para otros filtros: delega en FiltersService para marcar seleccionado.
|
|
9521
|
-
*
|
|
9522
|
-
* La idea es que **la URL siempre represente los filtros aplicados**,
|
|
9523
|
-
* de modo que:
|
|
9524
|
-
* - al hacer F5 no se pierdan los filtros,
|
|
9525
|
-
* - los links sean compartibles (deep linking).
|
|
9526
|
-
*/
|
|
9527
8770
|
setSelected(filter, selected) {
|
|
9528
8771
|
if (!filter || !selected) {
|
|
8772
|
+
console.error('Filter or selected element is undefined:', { filter, selected });
|
|
9529
8773
|
return;
|
|
9530
8774
|
}
|
|
9531
|
-
// Si el elemento está marcado como no visible, no hacemos nada
|
|
9532
|
-
if (selected.isVisible === false)
|
|
9533
|
-
return;
|
|
9534
8775
|
if (typeof filter.setSelected !== 'function') {
|
|
8776
|
+
console.error('filter.setSelected is not a function. Filter might not be an instance of the expected class:', filter);
|
|
9535
8777
|
return;
|
|
9536
8778
|
}
|
|
9537
8779
|
try {
|
|
8780
|
+
// this._filtersService.setFilterSelected(filter, selected);
|
|
9538
8781
|
if (filter.type() === 'categories') {
|
|
9539
|
-
// Para categorías usamos navegación por path (ej: /collection/categories/camas-elasticas)
|
|
9540
8782
|
if (selected.path) {
|
|
9541
8783
|
this.router.navigate([selected.path]);
|
|
9542
8784
|
}
|
|
9543
|
-
return;
|
|
9544
8785
|
}
|
|
9545
|
-
if (filter.type() === 'attributes') {
|
|
9546
|
-
//
|
|
9547
|
-
|
|
9548
|
-
// Actualizamos la URL manteniendo la ruta, pero agregando `attributeCodes`
|
|
9549
|
-
// Ejemplo de resultado:
|
|
9550
|
-
// /collection/categories/camas-elasticas?attributeCodes=ABC123&...
|
|
9551
|
-
//
|
|
9552
|
-
// También reseteamos la página a null para que vuelva a la primera página
|
|
9553
|
-
// cuando se aplica un nuevo filtro.
|
|
9554
|
-
this.router.navigate([], {
|
|
9555
|
-
relativeTo: this.route,
|
|
9556
|
-
queryParams: {
|
|
9557
|
-
attributeCodes: code,
|
|
9558
|
-
page: null
|
|
9559
|
-
},
|
|
9560
|
-
queryParamsHandling: 'merge'
|
|
9561
|
-
});
|
|
9562
|
-
return;
|
|
8786
|
+
else if (filter.type() === 'attributes') {
|
|
8787
|
+
// Manejar la navegación para atributos
|
|
8788
|
+
this._filtersService.setFilterSelected(filter, selected);
|
|
9563
8789
|
}
|
|
9564
|
-
this._filtersService.setFilterSelected(filter, selected);
|
|
9565
8790
|
}
|
|
9566
8791
|
catch (error) {
|
|
9567
8792
|
console.error("Error while setting selected filter:", error);
|
|
@@ -9585,9 +8810,7 @@ class FiltersEcComponent {
|
|
|
9585
8810
|
});
|
|
9586
8811
|
}
|
|
9587
8812
|
// close = () => {
|
|
9588
|
-
//
|
|
9589
|
-
// this.document.getElementById("filtros").classList.remove('in');
|
|
9590
|
-
// }
|
|
8813
|
+
// this.document.getElementById("filtros").classList.remove('in');
|
|
9591
8814
|
// return true;
|
|
9592
8815
|
// };
|
|
9593
8816
|
close = () => {
|
|
@@ -9597,9 +8820,7 @@ class FiltersEcComponent {
|
|
|
9597
8820
|
return true;
|
|
9598
8821
|
};
|
|
9599
8822
|
scrollUp = () => {
|
|
9600
|
-
|
|
9601
|
-
window.scroll(0, 0);
|
|
9602
|
-
}
|
|
8823
|
+
window.scroll(0, 0);
|
|
9603
8824
|
return true;
|
|
9604
8825
|
};
|
|
9605
8826
|
hasAppliedFilters() {
|
|
@@ -9620,36 +8841,13 @@ class FiltersEcComponent {
|
|
|
9620
8841
|
}) ?? false;
|
|
9621
8842
|
}
|
|
9622
8843
|
/**
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
8844
|
+
* Verifica si una categoría tiene la propiedad isVisible y está marcada como visible
|
|
8845
|
+
* @param category - La categoría a verificar
|
|
8846
|
+
* @returns true si la categoría es visible, false en caso contrario
|
|
8847
|
+
*/
|
|
9627
8848
|
hasVisibleProperty(category) {
|
|
9628
8849
|
return category.isVisible === true;
|
|
9629
8850
|
}
|
|
9630
|
-
/** Lista visible (filtra recursivo por isVisible) */
|
|
9631
|
-
getVisibleData(filter) {
|
|
9632
|
-
if (!filter)
|
|
9633
|
-
return [];
|
|
9634
|
-
return this.filterVisibleTree(filter.data);
|
|
9635
|
-
}
|
|
9636
|
-
/** Children visibles de un nodo */
|
|
9637
|
-
getVisibleChildren(node) {
|
|
9638
|
-
return this.filterVisibleTree(node?.children ?? []);
|
|
9639
|
-
}
|
|
9640
|
-
/** Tiene hijos visibles? */
|
|
9641
|
-
hasVisibleChildren(node) {
|
|
9642
|
-
return this.getVisibleChildren(node).length > 0;
|
|
9643
|
-
}
|
|
9644
|
-
/** Utilidad recursiva */
|
|
9645
|
-
filterVisibleTree(list = []) {
|
|
9646
|
-
return (list ?? [])
|
|
9647
|
-
.filter(n => n.isVisible === true)
|
|
9648
|
-
.map(n => ({
|
|
9649
|
-
...n,
|
|
9650
|
-
children: this.filterVisibleTree(n.children ?? [])
|
|
9651
|
-
}));
|
|
9652
|
-
}
|
|
9653
8851
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FiltersEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9654
8852
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: FiltersEcComponent, isStandalone: true, selector: "lib-filters-ec", inputs: { setSelect: "setSelect" }, ngImport: i0, template: "<p>filters-ec works!</p>\n", styles: [""] });
|
|
9655
8853
|
}
|
|
@@ -9699,7 +8897,7 @@ class VariantsEcComponent {
|
|
|
9699
8897
|
return products[index].stock;
|
|
9700
8898
|
}
|
|
9701
8899
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: VariantsEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9702
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: VariantsEcComponent, isStandalone: true, selector: "app-variants-ec", inputs: { setImages: "setImages", product: "product" }, ngImport: i0, template: "@if(options$ | async; as options){\n@if(options && options.length ){\n@for(option of options; track $index){\n\n@switch (option.type) {\n@case ('color') {\n@if(option.values && option.values.length > 1) {\n<h5>{{option.name | uppercase}}</h5>\n<div class=\"row w-100 mx-auto pb-3 mb-3\">\n @for(value of option.values; track $index; let x = $index){\n <a role=\"button\" (click)=\"setValuesImages(value.name, option.code) && setOption(option.code, value.name)\"\n [class]=\"'rounded-circle color-item m-1 ' + (value.selected ? 'shadow' : '')\" [id]=\"x + value.name\"\n [style.border]=\"'1px solid black'\"\n [style.background]=\"value.image && (value.image.endsWith('.jpg') || value.image.endsWith('.png') || value.image.endsWith('.svg')) ? 'url(' + this.consts.mediaUrl(value.image) + ')' : '#' + value.name\"\n [style.background-size]=\"'cover'\" [style.background-repeat]=\"'no-repeat'\" [style.background-position]=\"'center'\"\n [style.box-shadow]=\"(value.selected ? '0px 0px 0px 2px #000' : 'none')\"></a>\n }\n</div>\n}\n}\n@case ('size') {\n@if(option.values && option.values.length > 1) {\n<h5>{{option.name | uppercase}}</h5>\n<div class=\"row w-100 mx-auto pb-3\">\n <div class=\"btn-group ps-0\">\n <a class=\"btn btn-light dropdown-toggle cursor-pointer border border-1 d-flex flex-row justify-content-between align-items-center\"\n data-bs-toggle=\"dropdown\" aria-expanded=\"false\"> {{ itemSelected ? itemSelected :\n getValueSelect(option.values)}}</a>\n <ul class=\"dropdown-menu\">\n @for(value of option.values; track $index; let x = $index){\n <li [class]=\" (value.selected ? 'selected-size' : 'unselected-size')\">\n <a [class]=\"'dropdown-item cursor-pointer '+ (value.selected ? 'text-light' : '')\"\n (click)=\"chosenOption(option.code, value.name)\">{{ value.name }}</a>\n </li>\n }\n </ul>\n </div>\n\n</div>\n}\n}\n@default {\n\n}\n}\n}\n}\n}", styles: [".circle{width:32px;height:32px;border-radius:50%}.shadow{border:1px solid #000}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1
|
|
8900
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: VariantsEcComponent, isStandalone: true, selector: "app-variants-ec", inputs: { setImages: "setImages", product: "product" }, ngImport: i0, template: "@if(options$ | async; as options){\n@if(options && options.length ){\n@for(option of options; track $index){\n\n@switch (option.type) {\n@case ('color') {\n@if(option.values && option.values.length > 1) {\n<h5>{{option.name | uppercase}}</h5>\n<div class=\"row w-100 mx-auto pb-3 mb-3\">\n @for(value of option.values; track $index; let x = $index){\n <a role=\"button\" (click)=\"setValuesImages(value.name, option.code) && setOption(option.code, value.name)\"\n [class]=\"'rounded-circle color-item m-1 ' + (value.selected ? 'shadow' : '')\" [id]=\"x + value.name\"\n [style.border]=\"'1px solid black'\"\n [style.background]=\"value.image && (value.image.endsWith('.jpg') || value.image.endsWith('.png') || value.image.endsWith('.svg')) ? 'url(' + this.consts.mediaUrl(value.image) + ')' : '#' + value.name\"\n [style.background-size]=\"'cover'\" [style.background-repeat]=\"'no-repeat'\" [style.background-position]=\"'center'\"\n [style.box-shadow]=\"(value.selected ? '0px 0px 0px 2px #000' : 'none')\"></a>\n }\n</div>\n}\n}\n@case ('size') {\n@if(option.values && option.values.length > 1) {\n<h5>{{option.name | uppercase}}</h5>\n<div class=\"row w-100 mx-auto pb-3\">\n <div class=\"btn-group ps-0\">\n <a class=\"btn btn-light dropdown-toggle cursor-pointer border border-1 d-flex flex-row justify-content-between align-items-center\"\n data-bs-toggle=\"dropdown\" aria-expanded=\"false\"> {{ itemSelected ? itemSelected :\n getValueSelect(option.values)}}</a>\n <ul class=\"dropdown-menu\">\n @for(value of option.values; track $index; let x = $index){\n <li [class]=\" (value.selected ? 'selected-size' : 'unselected-size')\">\n <a [class]=\"'dropdown-item cursor-pointer '+ (value.selected ? 'text-light' : '')\"\n (click)=\"chosenOption(option.code, value.name)\">{{ value.name }}</a>\n </li>\n }\n </ul>\n </div>\n\n</div>\n}\n}\n@default {\n\n}\n}\n}\n}\n}", styles: [".circle{width:32px;height:32px;border-radius:50%}.shadow{border:1px solid #000}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }] });
|
|
9703
8901
|
}
|
|
9704
8902
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: VariantsEcComponent, decorators: [{
|
|
9705
8903
|
type: Component,
|
|
@@ -9801,12 +8999,9 @@ class ProductDetailEcComponent {
|
|
|
9801
8999
|
this._meta.updateTag({ property: 'og:type', content: 'product' });
|
|
9802
9000
|
}
|
|
9803
9001
|
decodeHtml(html) {
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
return txt.value;
|
|
9808
|
-
}
|
|
9809
|
-
return html;
|
|
9002
|
+
const txt = document.createElement('textarea');
|
|
9003
|
+
txt.innerHTML = html;
|
|
9004
|
+
return txt.value;
|
|
9810
9005
|
}
|
|
9811
9006
|
sanitizedHtml(html) {
|
|
9812
9007
|
const decodedHtml = this.decodeHtml(html);
|
|
@@ -9856,11 +9051,9 @@ class ProductDetailEcComponent {
|
|
|
9856
9051
|
goToSection(section) {
|
|
9857
9052
|
this.showFormContact = true;
|
|
9858
9053
|
setTimeout(() => {
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
|
|
9862
|
-
element.scrollIntoView({ behavior: 'smooth' });
|
|
9863
|
-
}
|
|
9054
|
+
const element = document.getElementById(section);
|
|
9055
|
+
if (element) {
|
|
9056
|
+
element.scrollIntoView({ behavior: 'smooth' });
|
|
9864
9057
|
}
|
|
9865
9058
|
}, 500);
|
|
9866
9059
|
}
|
|
@@ -9932,7 +9125,7 @@ class BreadcrumbEcComponent {
|
|
|
9932
9125
|
return this._optionsService.getBreadcrumbByFilters(filters);
|
|
9933
9126
|
}
|
|
9934
9127
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BreadcrumbEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9935
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BreadcrumbEcComponent, isStandalone: true, selector: "app-breadcrumb-ec", ngImport: i0, template: "<nav aria-label=\"breadcrumb\">\n <ol class=\"breadcrumb\">\n <li class=\"breadcrumb-item\"><a routerLink=\"/home\">Home</a></li>\n @for (crumb of breadcrumb; track $index) {\n @if(breadcrumb.length === $index+1){\n <li class=\"breadcrumb-item active\" aria-current=\"page\">\n {{\n crumb.title | translate | titlecase\n }}\n </li>\n }@else {\n <li class=\"breadcrumb-item\">\n <a [routerLink]=\"'/'+crumb.path\">{{\n crumb.title | translate | titlecase\n }}</a>\n </li>\n }\n }\n </ol>\n</nav>", styles: [""], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
9128
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BreadcrumbEcComponent, isStandalone: true, selector: "app-breadcrumb-ec", ngImport: i0, template: "<nav aria-label=\"breadcrumb\">\n <ol class=\"breadcrumb\">\n <li class=\"breadcrumb-item\"><a routerLink=\"/home\">Home</a></li>\n @for (crumb of breadcrumb; track $index) {\n @if(breadcrumb.length === $index+1){\n <li class=\"breadcrumb-item active\" aria-current=\"page\">\n {{\n crumb.title | translate | titlecase\n }}\n </li>\n }@else {\n <li class=\"breadcrumb-item\">\n <a [routerLink]=\"'/'+crumb.path\">{{\n crumb.title | translate | titlecase\n }}</a>\n </li>\n }\n }\n </ol>\n</nav>", styles: [""], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
9936
9129
|
}
|
|
9937
9130
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BreadcrumbEcComponent, decorators: [{
|
|
9938
9131
|
type: Component,
|
|
@@ -10021,7 +9214,7 @@ class EcSafeHtmlPipe {
|
|
|
10021
9214
|
return '';
|
|
10022
9215
|
return this.sanitizer.bypassSecurityTrustHtml(value);
|
|
10023
9216
|
}
|
|
10024
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EcSafeHtmlPipe, deps: [{ token: i1$
|
|
9217
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EcSafeHtmlPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
10025
9218
|
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: EcSafeHtmlPipe, isStandalone: true, name: "ecSafeHtml" });
|
|
10026
9219
|
}
|
|
10027
9220
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: EcSafeHtmlPipe, decorators: [{
|
|
@@ -10030,7 +9223,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
10030
9223
|
name: 'ecSafeHtml',
|
|
10031
9224
|
standalone: true
|
|
10032
9225
|
}]
|
|
10033
|
-
}], ctorParameters: () => [{ type: i1$
|
|
9226
|
+
}], ctorParameters: () => [{ type: i1$4.DomSanitizer }] });
|
|
10034
9227
|
|
|
10035
9228
|
class CartItemEcComponent {
|
|
10036
9229
|
item;
|
|
@@ -10129,7 +9322,7 @@ class CartItemEcComponent {
|
|
|
10129
9322
|
parameters$ = this.parametersService.getParameters();
|
|
10130
9323
|
hasParams = this.parametersService.hasParams;
|
|
10131
9324
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CartItemEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10132
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CartItemEcComponent, isStandalone: true, selector: "app-cart-item-ec", inputs: { item: "item", inSidebar: "inSidebar" }, ngImport: i0, template: "@if(!inSidebar){\n<p>cart-item-ec works!</p>\n}@else{\n\n<div class=\"row\">\n <div class=\"col-3\">\n @let product= item.product;\n @if(item.variant_id && product.variants.length>0){\n <img [src]=\"mediaUrl + product.variants[0].images[0]\" alt=\"\" class=\"img-fluid\">\n }@else{\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"\" class=\"img-fluid\">\n }\n </div>\n <div class=\"col-7\">\n <div class=\"info d-flex flex-column align-items-start\">\n @if (item.product.special_mark?.length > 0 || item.product.saleprice) {\n <div class=\"marcas\">\n <img [src]=\"mediaUrl + (item.product.special_mark?.[0]?.images[0] || '')\" alt=\"\">\n\n @if (item.product.saleprice) {\n <div class=\"tag-dsc\">\n {{\n createDiscountMessage(item.product.saleprice,\n item.product.price)\n }}\n </div>\n }\n </div>\n }\n <a class=\"title text-dark text-decoration-none m-0 p-0 h6 mb-0\"\n [routerLink]=\"['/product', item.variant_id]\">{{\n item.product.name | titlecase\n }}</a>\n <div class=\"qty1\">\n <span>{{ item.product.id}}</span>\n </div>\n <div class=\"price h6 fw-bold mb-0 pb-0\">{{ item.product.price | ecCurrencySymbol\n }}</div>\n @if(getVariants(item); as options){\n <div class=\"d-flex align-items-center p-0\">\n @for(option of options; track $index){\n <span class=\"me-1\"> {{option.name | titlecase}}:</span>\n @if(option.name == 'COLOR'){\n <div class=\"p-2 rounded\" [style.background]=\"'#' + option.value\"></div>\n }@else{\n <b>{{option.value}}</b>\n }\n }\n </div>\n }\n <div class=\"campoCantidad mt-2\">\n <div class=\"numero\">\n <button (click)=\"less(item.product.variants[0]?.stock)\" class=\"btn btn-outline-secondary\"\n type=\"button\" id=\"button-addon1\">\n <i class=\"fa fa-minus\" aria-hidden=\"true\"></i>\n </button>\n <input type=\"text\" class=\"form-control text-center\" placeholder=\"\"\n aria-label=\"Example text with button addon\" aria-describedby=\"button-addon1\"\n [value]=\"item.quantity\" min=\"1\" step=\"1\" [(ngModel)]=\"quantity\"\n (change)=\"updateQuantity(item.product.variants[0]?.stock)\">\n <button (click)=\"plus(item.product.variants[0]?.stock)\" class=\"btn btn-outline-secondary\"\n type=\"button\" id=\"button-addon1\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n </button>\n </div>\n\n </div>\n </div>\n </div>\n <div class=\"col-2\">\n <a (click)=\"deleteCartItem()\" class=\"btn botBorrar\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></a>\n </div>\n</div>\n\n\n\n\n\n}", styles: [""], dependencies: [{ kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$
|
|
9325
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CartItemEcComponent, isStandalone: true, selector: "app-cart-item-ec", inputs: { item: "item", inSidebar: "inSidebar" }, ngImport: i0, template: "@if(!inSidebar){\n<p>cart-item-ec works!</p>\n}@else{\n\n<div class=\"row\">\n <div class=\"col-3\">\n @let product= item.product;\n @if(item.variant_id && product.variants.length>0){\n <img [src]=\"mediaUrl + product.variants[0].images[0]\" alt=\"\" class=\"img-fluid\">\n }@else{\n <img [src]=\"mediaUrl + product.picturesdefault[0]\" alt=\"\" class=\"img-fluid\">\n }\n </div>\n <div class=\"col-7\">\n <div class=\"info d-flex flex-column align-items-start\">\n @if (item.product.special_mark?.length > 0 || item.product.saleprice) {\n <div class=\"marcas\">\n <img [src]=\"mediaUrl + (item.product.special_mark?.[0]?.images[0] || '')\" alt=\"\">\n\n @if (item.product.saleprice) {\n <div class=\"tag-dsc\">\n {{\n createDiscountMessage(item.product.saleprice,\n item.product.price)\n }}\n </div>\n }\n </div>\n }\n <a class=\"title text-dark text-decoration-none m-0 p-0 h6 mb-0\"\n [routerLink]=\"['/product', item.variant_id]\">{{\n item.product.name | titlecase\n }}</a>\n <div class=\"qty1\">\n <span>{{ item.product.id}}</span>\n </div>\n <div class=\"price h6 fw-bold mb-0 pb-0\">{{ item.product.price | ecCurrencySymbol\n }}</div>\n @if(getVariants(item); as options){\n <div class=\"d-flex align-items-center p-0\">\n @for(option of options; track $index){\n <span class=\"me-1\"> {{option.name | titlecase}}:</span>\n @if(option.name == 'COLOR'){\n <div class=\"p-2 rounded\" [style.background]=\"'#' + option.value\"></div>\n }@else{\n <b>{{option.value}}</b>\n }\n }\n </div>\n }\n <div class=\"campoCantidad mt-2\">\n <div class=\"numero\">\n <button (click)=\"less(item.product.variants[0]?.stock)\" class=\"btn btn-outline-secondary\"\n type=\"button\" id=\"button-addon1\">\n <i class=\"fa fa-minus\" aria-hidden=\"true\"></i>\n </button>\n <input type=\"text\" class=\"form-control text-center\" placeholder=\"\"\n aria-label=\"Example text with button addon\" aria-describedby=\"button-addon1\"\n [value]=\"item.quantity\" min=\"1\" step=\"1\" [(ngModel)]=\"quantity\"\n (change)=\"updateQuantity(item.product.variants[0]?.stock)\">\n <button (click)=\"plus(item.product.variants[0]?.stock)\" class=\"btn btn-outline-secondary\"\n type=\"button\" id=\"button-addon1\">\n <i class=\"fa fa-plus\" aria-hidden=\"true\"></i>\n </button>\n </div>\n\n </div>\n </div>\n </div>\n <div class=\"col-2\">\n <a (click)=\"deleteCartItem()\" class=\"btn botBorrar\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i></a>\n </div>\n</div>\n\n\n\n\n\n}", styles: [""], dependencies: [{ kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: FormsModule }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
10133
9326
|
}
|
|
10134
9327
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CartItemEcComponent, decorators: [{
|
|
10135
9328
|
type: Component,
|
|
@@ -10165,7 +9358,7 @@ class CouponEcComponent {
|
|
|
10165
9358
|
}
|
|
10166
9359
|
setLoading = () => this.loading = true;
|
|
10167
9360
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CouponEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10168
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CouponEcComponent, isStandalone: true, selector: "app-coupon-ec", ngImport: i0, template: "<div class=\"border border-bottom card p-2\">\n <p class=\"w-100 mb-1\">C\u00F3digo de descuento</p>\n \n @if(coupon$ | async; as coupon){\n <div class=\"d-flex justify-content-between align-items-center px-1\">\n <p class=\"m-0\">{{coupon.code}}</p>\n <button class=\"btn\" (click)=\"removeCoupon()\"><i class=\"bi bi-trash\"></i></button>\n </div>\n }@else {\n <form class=\"campo d-flex align-items-center\">\n <input type='text' class=\"elcampo\" [(ngModel)]=\"couponValue\" name=\"coupon_value\" />\n <input type='button' value='VALIDAR' class=\"btn btn-primary btnSend py-1\"\n (click)=\" addCoupon()\" />\n </form> \n }\n</div>", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$
|
|
9361
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CouponEcComponent, isStandalone: true, selector: "app-coupon-ec", ngImport: i0, template: "<div class=\"border border-bottom card p-2\">\n <p class=\"w-100 mb-1\">C\u00F3digo de descuento</p>\n \n @if(coupon$ | async; as coupon){\n <div class=\"d-flex justify-content-between align-items-center px-1\">\n <p class=\"m-0\">{{coupon.code}}</p>\n <button class=\"btn\" (click)=\"removeCoupon()\"><i class=\"bi bi-trash\"></i></button>\n </div>\n }@else {\n <form class=\"campo d-flex align-items-center\">\n <input type='text' class=\"elcampo\" [(ngModel)]=\"couponValue\" name=\"coupon_value\" />\n <input type='button' value='VALIDAR' class=\"btn btn-primary btnSend py-1\"\n (click)=\" addCoupon()\" />\n </form> \n }\n</div>", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
10169
9362
|
}
|
|
10170
9363
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CouponEcComponent, decorators: [{
|
|
10171
9364
|
type: Component,
|
|
@@ -10480,7 +9673,7 @@ class DataformEcComponent {
|
|
|
10480
9673
|
this._checkoutService.next();
|
|
10481
9674
|
}
|
|
10482
9675
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DataformEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10483
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DataformEcComponent, isStandalone: true, selector: "app-dataform-ec", ngImport: i0, template: "@if(channel$ | async; as channelConfig){\n@if(channelConfig.channelType != 'b2b' || (channelConfig.channelType == 'b2b' && isAuthenticated())){\n@if( modeSelectAddress == 'LOAD_ADDRESS_AND_SELECTION' && isAuthenticated() && this.addressBook != null){\n<!--Selector de modos-->\n<div class=\"container card p-4 mb-3\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12 col-md-10 col-lg-8 text-center\">\n <div class=\"btn-group btn-group-toggle\" data-bs-toggle=\"buttons\">\n <label [class]=\"'btn btn-outline-secondary ' + (!getMode() ? 'active' : '')\">\n <input type=\"radio\" name=\"options\" id=\"option1\" autocomplete=\"off\" checked\n (change)=\"setMode('seleccion')\"> {{'select-address' | translate | titlecase}}\n </label>\n @if(!getParamByChannelAndLanguage('btn_new_address_')){\n <label [class]=\"'btn btn-outline-secondary ' + (getMode() ? 'active' : '')\">\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\n {{ 'new-address' | translate | titlecase}}\n </label>\n }\n @if(getParamByChannelAndLanguage('btn_new_address_'); as param){\n <label [class]=\"'btn btn-outline-secondary ' + (selectAddress ? 'active' : '')\">\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\n {{ param.value}}\n </label>\n }\n </div>\n </div>\n </div>\n</div>\n}\n\n@if(getMode()){\n@if(!require_login){\n<div>\n @if(modeSelectAddress == 'ONLY_LOAD_ADDRESS'){\n <div class=\"checkout-title my-2\">\n <h3>{{'billing-details'|translate}}</h3>\n </div>\n }\n <!--Formulario-->\n <form [formGroup]=\"checkoutForm\" (submit)=\"verifyValidate($event)\"> <!-- //this.cartService.items -->\n <div class=\"row mt-2\"><!--Fila 1-->\n\n @if(getTypeForm().viewForms.firstName.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <!--Si es required-->\n <label class=\"form-label\">{{'first-name'|translate}}\n @if(getTypeForm().viewForms.firstName.required){\n <span class=\"required\">*</span>\n }\n </label>\n <!--Input-->\n <input class=\"form-control\" type=\"text\" name=\"firstName\" formControlName=\"firstName\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['firstName'].touched &&\n checkoutForm.controls['firstName'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\n </div>\n }\n <!--Error info-->\n @if(checkoutForm.controls['firstName'].touched &&\n checkoutForm.controls['firstName'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'first-name-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n @if(getTypeForm().viewForms.lastName.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'last-name'|translate}}\n @if(getTypeForm().viewForms.lastName.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input class=\"form-control\" type=\"text\" name=\"lastName\" formControlName=\"lastName\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['lastName'].touched &&\n checkoutForm.controls['lastName'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\n </div>\n }\n @if(checkoutForm.controls['lastName'].touched && checkoutForm.controls['lastName'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-2\"><!--Fila 2-->\n @if(getTypeForm().viewForms.phoneNumber.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'phone'|translate}}\n @if(getTypeForm().viewForms.phoneNumber.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"phoneNumber\"\n formControlName='phoneNumber' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['phoneNumber'].touched &&\n checkoutForm.controls['phoneNumber'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'phone-help1'|translate}}\n </span>\n </div>\n }\n @if(checkoutForm.controls['phoneNumber'].touched &&\n checkoutForm.controls['phoneNumber'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'phone-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n @if(getTypeForm().viewForms.email.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'email-address'|translate}}\n @if(getTypeForm().viewForms.email.required){\n <span class=\"required\">*</span>\n }</label>\n <input class=\"form-control\" type=\"email\" name=\"email\" formControlName='email' value=\"\" placeholder=\"\"\n autocomplete=\"off\">\n @if(checkoutForm.controls['email'].touched && checkoutForm.controls['email'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'email-address-help1'|translate}}\n </span>\n </div>\n }\n @if(checkoutForm.controls['email'].touched && checkoutForm.controls['email'].errors?.['email']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'email-address-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-2\"><!--Fila 3-->\n @if(getTypeForm().viewForms.countryCode.enabled){\n @if(countries$ | async; as countries){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'country'|translate}}\n @if(getTypeForm().viewForms.countryCode.required){\n <span class=\"required\">*</span>\n }</label>\n <select class=\"form-select\" name=\"countryCode\" formControlName='countryCode'\n (change)=\"onCountrySelected($event)\">\n @for(country of countries; track $index){\n <option [value]=\"country.code\">{{ country.name }}</option>\n }\n </select>\n @if(checkoutForm.controls['countryCode'].touched &&\n checkoutForm.controls['countryCode'].errors?.['required']){\n <div class=\"text text-danger\">\n {{'country-help'|translate}}\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.provinceCode.enabled){\n @if(provinces$ | async; as provinces){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'state'|translate}}\n @if(getTypeForm().viewForms.provinceCode.required){\n <span class=\"required\">*</span>\n }</label>\n <select class=\"form-select\" name=\"provinceCode\" (change)=\"onProvincesSelected($event, provinces)\"\n formControlName='provinceCode'>\n <option value=\"\">{{'select-state'|translate}}</option>\n @for(province of provinces; track $index){\n <option [value]=\"province.code\">{{ province.name }}\n </option>\n }\n </select>\n @if(checkoutForm.controls['provinceCode'].touched &&\n checkoutForm.controls['provinceCode'].errors?.['required']){\n <div class=\"text text-danger\">\n {{'state-help'|translate}}\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.city.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'town-city'|translate}}\n @if(getTypeForm().viewForms.city.required){\n <span class=\"required\">*</span>\n }</label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\" formControlName='city'\n value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['city'].touched && checkoutForm.controls['city'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 4-->\n @if(getTypeForm().viewForms.street.enabled){\n <div class=\"form-group col-12 col-md-8\">\n <label class=\"field-label\">{{'address'|translate}}\n @if(getTypeForm().viewForms.street.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\n formControlName='street' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['street'].touched && checkoutForm.controls['street'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\n </div>\n }\n @if(checkoutForm.controls['street'].touched && checkoutForm.controls['street'].errors?.['maxlength']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\n </div>\n }\n </div>\n }\n\n <!-- form direcci\u00F3n -->\n @if(getTypeForm().viewForms.postcode.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'postal-code'|translate}}\n @if(getTypeForm().viewForms.postcode.required){\n <span class=\"required\">*</span>\n }</label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\n formControlName='postcode' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['postcode'].touched &&\n checkoutForm.controls['postcode'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\n </div>\n }\n @if(checkoutForm.controls['postcode'].touched && checkoutForm.controls['postcode'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\"> {{'postal-code-pattern-error' | translate}} </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 5-->\n @if(getTypeForm().viewForms.documentType.enabled){\n @if(documentTypes$ | async; as documentTypes){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'document-type'|translate}}\n @if(getTypeForm().viewForms.documentType.required){\n <span class=\"required\">*</span>\n }</label>\n <select name=\"documentType\" class=\"form-select\" (change)=\"onDocumentTypesSelected($event)\"\n formControlName='documentType'>\n @for(item of documentTypes; track $index){\n <option [value]=\"item.code\">{{item.name}}</option>\n }\n </select>\n @if(checkoutForm.controls['documentType'].touched &&\n checkoutForm.controls['documentType'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'type-document-help'|translate}}\n </span>\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.documentNumber.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'document-number'|translate}}\n @if(getTypeForm().viewForms.documentNumber.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" [type]=\"'text'\" name=\"documentNumber\"\n formControlName='documentNumber' min=\"1\" max=\"99999999999\" value=\"\" placeholder=\"\"\n autocomplete=\"off\">\n @if(checkoutForm.controls['documentNumber'].touched &&\n checkoutForm.controls['documentNumber'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'document-number-help'|translate}}\n </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 6-->\n @if(this.channel.checkoutNotesField == 'required' || this.channel.checkoutNotesField == 'show'){\n <div class=\"form-group col-12 col-md-12\">\n @if(!getLabelNotesParam()){\n <label class=\"field-label\">{{'notes'|translate}}\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n @if(getLabelNotesParam(); as labelnotes){\n <label class=\"field-label\" [innerHTML]=\"labelnotes.value\">\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\" formControlName='notes'\n value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(this.channel.checkoutNotesField == 'required' && checkoutForm.controls['notes'].touched &&\n checkoutForm.controls['notes'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'notes-help'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 7-->\n <div class=\"form-group col-12 col-md-12\">\n <label for=\"formFact\"><b>{{ 'same-billing-address' | translate }}</b> <input type=\"checkbox\"\n class=\"ms-2\" [checked]=\"viewDataFacturacion\" (change)=\"showFormFacturacion()\"\n id=\"formFact\"></label>\n </div>\n </div>\n <div class=\"row mt-df\">\n <div class=\"col-12\">\n <p>\n <label class=\"required text-underline text-danger\">* {{ 'required-fields' | translate }}</label>\n </p>\n </div>\n </div>\n <div class=\"row mt-df\">\n @if(getTypeForm().viewForms.terms.enabled){\n <div class=\"form-group col-12 col-md-12\">\n @if(getTypeForm().viewForms.terms.required){\n <span class=\"required\">*</span>\n }\n <label class=\"\" for=\"\"> {{ 'accept-terms' | translate }} <input class=\"ms-2\" name=\"terms\"\n formControlName='terms' type=\"checkbox\" required (change)=\"onInputChange()\" /> </label><br />\n <button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\"\n data-bs-target=\"#terminos-y-condiciones\">\n {{ 'whats-this' | translate }}\n </button>\n @if(checkoutForm.controls['terms'].touched && !checkoutForm.controls['terms'].value){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{ 'must-accept-terms' | translate }}</span>\n </div>\n }\n </div>\n }\n </div>\n @if(!viewDataFacturacion){\n <!--Formulario de Facturaci\u00F3n-->\n <div class=\"card\">\n <div class=\"card-header text-center\">\n <h2>{{ 'billing-data' | translate }}</h2>\n </div>\n <div class=\"card-body\">\n <form [formGroup]=\"checkoutFormFacturacion\">\n <div class=\"row mt-2\"><!--Fila 1-->\n\n @if(getTypeForm().viewForms.firstName.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <!--Si es required-->\n <label class=\"form-label\">{{'first-name'|translate}}\n @if(getTypeForm().viewForms.firstName.required){\n <span class=\"required\">*</span>\n }\n </label>\n <!--Input-->\n <input class=\"form-control\" type=\"text\" name=\"firstName\" formControlName=\"firstName\"\n value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['firstName'].touched &&\n checkoutFormFacturacion.controls['firstName'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\n </div>\n }\n <!--Error info-->\n @if(checkoutFormFacturacion.controls['firstName'].touched &&\n checkoutFormFacturacion.controls['firstName'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'first-name-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n @if(getTypeForm().viewForms.lastName.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'last-name'|translate}}\n @if(getTypeForm().viewForms.lastName.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input class=\"form-control\" type=\"text\" name=\"lastName\" formControlName=\"lastName\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['lastName'].touched &&\n checkoutFormFacturacion.controls['lastName'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\n </div>\n }\n @if(checkoutFormFacturacion.controls['lastName'].touched &&\n checkoutFormFacturacion.controls['lastName'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-2\"><!--Fila 2-->\n @if(getTypeForm().viewForms.phoneNumber.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'phone'|translate}}\n @if(getTypeForm().viewForms.phoneNumber.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"phoneNumber\"\n formControlName='phoneNumber' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['phoneNumber'].touched &&\n checkoutFormFacturacion.controls['phoneNumber'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'phone-help1'|translate}}\n </span>\n </div>\n }\n @if(checkoutFormFacturacion.controls['phoneNumber'].touched &&\n checkoutFormFacturacion.controls['phoneNumber'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'phone-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n @if(getTypeForm().viewForms.email.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'email-address'|translate}}\n @if(getTypeForm().viewForms.email.required){\n <span class=\"required\">*</span>\n }</label>\n <input class=\"form-control\" type=\"email\" name=\"email\" formControlName='email' value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['email'].touched &&\n checkoutFormFacturacion.controls['email'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'email-address-help1'|translate}}\n </span>\n </div>\n }\n @if(checkoutFormFacturacion.controls['email'].touched &&\n checkoutFormFacturacion.controls['email'].errors?.['email']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'email-address-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-2\"><!--Fila 3-->\n @if(getTypeForm().viewForms.countryCode.enabled){\n @if(countries$ | async; as countries){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'country'|translate}}\n @if(getTypeForm().viewForms.countryCode.required){\n <span class=\"required\">*</span>\n }</label>\n <select class=\"form-select\" name=\"countryCode\" formControlName='countryCode'\n (change)=\"onCountrySelected($event, true)\">\n @for(country of countries; track $index){\n <option [value]=\"country.code\">{{ country.name }}</option>\n }\n </select>\n @if(checkoutFormFacturacion.controls['countryCode'].touched &&\n checkoutFormFacturacion.controls['countryCode'].errors?.['required']){\n <div class=\"text text-danger\">\n {{'country-help'|translate}}\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.provinceCode.enabled){\n @if(provinces$ | async; as provinces){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'state'|translate}}\n @if(getTypeForm().viewForms.provinceCode.required){\n <span class=\"required\">*</span>\n }</label>\n <select class=\"form-select\" name=\"provinceCode\"\n (change)=\"onProvincesSelected($event, provinces, true)\" formControlName='provinceCode'>\n <option value=\"\">{{'select-state'|translate}}</option>\n @for(province of provinces; track $index){\n <option [value]=\"province.code\">{{ province.name }}\n </option>\n }\n </select>\n @if(checkoutFormFacturacion.controls['provinceCode'].touched &&\n checkoutFormFacturacion.controls['provinceCode'].errors?.['required']){\n <div class=\"text text-danger\">\n {{'state-help'|translate}}\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.city.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'town-city'|translate}}\n @if(getTypeForm().viewForms.city.required){\n <span class=\"required\">*</span>\n }</label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\n formControlName='city' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['city'].touched &&\n checkoutFormFacturacion.controls['city'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 4-->\n @if(getTypeForm().viewForms.street.enabled){\n <div class=\"form-group col-12 col-md-8\">\n <label class=\"field-label\">{{'address'|translate}}\n @if(getTypeForm().viewForms.street.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\n formControlName='street' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['street'].touched &&\n checkoutFormFacturacion.controls['street'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\n </div>\n }\n @if(checkoutFormFacturacion.controls['street'].touched &&\n checkoutFormFacturacion.controls['street'].errors?.['maxlength']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\n </div>\n }\n </div>\n }\n\n <!-- form direcci\u00F3n -->\n @if(getTypeForm().viewForms.postcode.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'postal-code'|translate}}\n @if(getTypeForm().viewForms.postcode.required){\n <span class=\"required\">*</span>\n }</label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\n formControlName='postcode' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['postcode'].touched &&\n checkoutFormFacturacion.controls['postcode'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\n </div>\n }\n @if(checkoutFormFacturacion.controls['postcode'].touched &&\n checkoutFormFacturacion.controls['postcode'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\"> {{'postal-code-pattern-error' | translate}} </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 5-->\n @if(getTypeForm().viewForms.documentType.enabled){\n @if(documentTypes$ | async; as documentTypes){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'document-type'|translate}}\n @if(getTypeForm().viewForms.documentType.required){\n <span class=\"required\">*</span>\n }</label>\n <select name=\"documentType\" class=\"form-select\"\n (change)=\"onDocumentTypesSelected($event, true)\" formControlName='documentType'>\n @for(item of documentTypes; track $index){\n <option [value]=\"item.code\">{{item.name}}</option>\n }\n </select>\n @if(checkoutFormFacturacion.controls['documentType'].touched &&\n checkoutFormFacturacion.controls['documentType'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'type-document-help'|translate}}\n </span>\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.documentNumber.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'document-number'|translate}}\n @if(getTypeForm().viewForms.documentNumber.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" [type]=\"'text'\" name=\"documentNumber\"\n formControlName='documentNumber' min=\"1\" max=\"99999999999\" value=\"\" placeholder=\"\"\n autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['documentNumber'].touched &&\n checkoutFormFacturacion.controls['documentNumber'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'document-number-help'|translate}}\n </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 6-->\n @if(this.channel.checkoutNotesField == 'required' || this.channel.checkoutNotesField == 'show'){\n <div class=\"form-group col-12 col-md-12\">\n @if(!getLabelNotesParam()){\n <label class=\"field-label\">{{'notes'|translate}}\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n @if(getLabelNotesParam(); as labelnotes){\n <label class=\"field-label\" [innerHTML]=\"labelnotes.value\">\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\n formControlName='notes' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(this.channel.checkoutNotesField == 'required' &&\n checkoutFormFacturacion.controls['notes'].touched &&\n checkoutFormFacturacion.controls['notes'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'notes-help'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n </form>\n </div>\n </div>\n }\n <div class=\"row d-flex flex-row\">\n <div class=\"col-12 d-flex justify-content-end\">\n <button type=\"submit\" class=\"btn btn-primary text-white\"\n [disabled]=\"checkoutForm.invalid || (this.channel.checkoutNotesField == 'required' && (!checkoutForm.get('notes')?.value || checkoutForm.get('notes')?.value.trim() === '')) || (!viewDataFacturacion && checkoutFormFacturacion && (checkoutFormFacturacion.invalid || (this.channel.checkoutNotesField == 'required' && (!checkoutFormFacturacion.get('notes')?.value || checkoutFormFacturacion.get('notes')?.value.trim() === ''))))\">{{(isLastOne\n ? 'finish-checkout' : (allready_data ? 'update' :\n 'ready-form')) | translate}}\n <!-- {{(allready_data ? 'update' : (isLastOne ? 'finish-checkout' : 'ready-form')) | translate}} -->\n </button>\n </div>\n </div>\n @if(loading){\n <div class=\"d-flex flex-column justify-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n }\n\n </form>\n</div>\n} @else {\n<div id=\"loginCheckout\">\n @if(require_login){\n <div class=\"d-flex flex-column justify-content-center align-items-center my-5 \">\n <div class=\"col-12 col-md-6 \">\n <app-login-form-ec (ready)=\"verifyValidate($event)\" [redirect]=\"false\" [title]=\"'need-login'\">\n </app-login-form-ec>\n </div>\n </div>\n }\n</div>\n}\n} @else {\n@if(modeSelectAddress == 'ONLY_ADDRESS_SELECTION'){\n<div class=\"checkout-title my-2\">\n <h3>{{'address-selection'|translate}}</h3>\n</div>\n}\n\n@if(this.addressBook){\n@if(this.addressBook?.length){\n<div class=\"container\">\n <div class=\"row\">\n @for(item of addressBook; track $index; let i = $index){\n <div class=\"col-sm-6 col-12 my-3\">\n <div class=\"card p-3\">\n <input class=\"ms-1 mt-3 form-check-input input-size-lg\" type=\"radio\" [name]=\"'n-'+i\" [id]=\"i\"\n [checked]=\"item.selected\" (click)=\"setSelectAddress(item)\" (change)=\"onInputChange()\">\n <div class=\"ms-5\">\n <h4 class=\"card-title\">\n <strong>{{'address'|translate}}</strong><br>\n <span class=\"text-uppercase h3\">{{item.street}}</span>\n </h4>\n <div class=\"row\">\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'country'|translate}}</strong> {{getCountry(item.countryCode)}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'state'|translate}}</strong> {{getProvince(item.provinceCode)}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'town-city'|translate}}</strong> {{item.city}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'postal-code'|translate}}</strong> {{item.postcode}}\n </h5>\n </div>\n <div class=\"row px-3\">\n <div class=\"card p-2 bg-light w-100\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">{{'address-contact'|translate}}</h5>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'first-name'|translate}}</strong>\n {{item.addressContact.firstName}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'last-name'|translate}}</strong>\n {{item.addressContact.lastName}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'document-type'|translate}}</strong>\n {{getDocumentType(item.addressContact.documentType)}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'document-number'|translate}}</strong>\n {{item.addressContact.documentNumber}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'email-address'|translate}}</strong>\n {{item.addressContact.email}}\n </h6>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n\n </div>\n\n <div class=\"w-100\">\n @if(this.channel.checkoutNotesField == 'required' || this.channel.checkoutNotesField == 'show'){\n <div class=\"row mt-df\">\n <div class=\"form-group col-12 col-md-12\">\n @if(!getLabelNotesParam()){\n <label class=\"form-label\">{{'notes'|translate}}\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n @if(getLabelNotesParam(); as labelnotes){\n <label class=\"form-label\" [innerHTML]=\"labelnotes.value\">\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\n [(ngModel)]=\"this.addressBookSelected.notes\" #ctrl=\"ngModel\" value=\"\" placeholder=\"\"\n autocomplete=\"off\" [required]=\"this.channel.checkoutNotesField == 'required'\">\n @if(this.channel.checkoutNotesField == 'required' && ctrl.touched && ctrl.invalid){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'notes-help'|translate}}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n <div class=\"row d-flex flex-row\">\n <div class=\"col-12 d-flex justify-content-end\">\n <button (click)=\"onSelectAddress(cartItems)\" class=\"btn btn-primary text-white\"\n [disabled]=\"loadingStep || (this.channel.checkoutNotesField == 'required' && (!this.addressBookSelected.notes || this.addressBookSelected.notes.trim() === ''))\">{{(isLastOne\n ? 'finish-checkout' : (allready_data ? 'update' :\n 'ready-form')) | translate}}\n <!-- {{(allready_data ? 'update' : (isLastOne ? 'finish-checkout' : 'ready-form')) | translate}} -->\n </button>\n\n </div>\n </div>\n @if(loading){\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n }\n</div>\n} @else {\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 text-center my-2\">\n <div class=\"d-flex flex-column justify-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </div>\n</div>\n}\n} @else {\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 text-center my-2\">\n <h4> {{'address-book-not-result' | translate }} </h4>\n </div>\n </div>\n</div>\n}\n\n}\n\n}\n@else {\n<div class=\"container\">\n <p>Por favor <a [routerLink]=\"['/auth/login']\"> Inicie Sesi\u00F3n</a></p>\n</div>\n}\n}\n@if(getTypeForm().viewForms.terms.enabled){\n<div class=\"modal fade\" id=\"terminos-y-condiciones\" tabindex=\"-1\" aria-labelledby=\"modalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-xl modal-dialog-scrollable\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"modalLabel\">T\u00E9rminos y condiciones</h5>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <app-blocks-ec [section]=\"'terminos-y-condiciones'\" />\n </div>\n </div>\n </div>\n</div>\n}", styles: [""], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$4.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$4.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$4.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { kind: "directive", type: i1$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$4.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LoginFormEcComponent, selector: "app-login-form-ec", inputs: ["redirect", "redirectTo", "inCart"], outputs: ["ready"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "component", type: BlocksEcComponent, selector: "app-blocks-ec", inputs: ["templates", "show_loading", "section", "blockFilters"] }] });
|
|
9676
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DataformEcComponent, isStandalone: true, selector: "app-dataform-ec", ngImport: i0, template: "@if(channel$ | async; as channelConfig){\n@if(channelConfig.channelType != 'b2b' || (channelConfig.channelType == 'b2b' && isAuthenticated())){\n@if( modeSelectAddress == 'LOAD_ADDRESS_AND_SELECTION' && isAuthenticated() && this.addressBook != null){\n<!--Selector de modos-->\n<div class=\"container card p-4 mb-3\">\n <div class=\"row justify-content-center\">\n <div class=\"col-12 col-md-10 col-lg-8 text-center\">\n <div class=\"btn-group btn-group-toggle\" data-bs-toggle=\"buttons\">\n <label [class]=\"'btn btn-outline-secondary ' + (!getMode() ? 'active' : '')\">\n <input type=\"radio\" name=\"options\" id=\"option1\" autocomplete=\"off\" checked\n (change)=\"setMode('seleccion')\"> {{'select-address' | translate | titlecase}}\n </label>\n @if(!getParamByChannelAndLanguage('btn_new_address_')){\n <label [class]=\"'btn btn-outline-secondary ' + (getMode() ? 'active' : '')\">\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\n {{ 'new-address' | translate | titlecase}}\n </label>\n }\n @if(getParamByChannelAndLanguage('btn_new_address_'); as param){\n <label [class]=\"'btn btn-outline-secondary ' + (selectAddress ? 'active' : '')\">\n <input type=\"radio\" name=\"options\" id=\"option2\" autocomplete=\"off\" (change)=\"setMode('carga')\">\n {{ param.value}}\n </label>\n }\n </div>\n </div>\n </div>\n</div>\n}\n\n@if(getMode()){\n@if(!require_login){\n<div>\n @if(modeSelectAddress == 'ONLY_LOAD_ADDRESS'){\n <div class=\"checkout-title my-2\">\n <h3>{{'billing-details'|translate}}</h3>\n </div>\n }\n <!--Formulario-->\n <form [formGroup]=\"checkoutForm\" (submit)=\"verifyValidate($event)\"> <!-- //this.cartService.items -->\n <div class=\"row mt-2\"><!--Fila 1-->\n\n @if(getTypeForm().viewForms.firstName.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <!--Si es required-->\n <label class=\"form-label\">{{'first-name'|translate}}\n @if(getTypeForm().viewForms.firstName.required){\n <span class=\"required\">*</span>\n }\n </label>\n <!--Input-->\n <input class=\"form-control\" type=\"text\" name=\"firstName\" formControlName=\"firstName\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['firstName'].touched &&\n checkoutForm.controls['firstName'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\n </div>\n }\n <!--Error info-->\n @if(checkoutForm.controls['firstName'].touched &&\n checkoutForm.controls['firstName'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'first-name-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n @if(getTypeForm().viewForms.lastName.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'last-name'|translate}}\n @if(getTypeForm().viewForms.lastName.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input class=\"form-control\" type=\"text\" name=\"lastName\" formControlName=\"lastName\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['lastName'].touched &&\n checkoutForm.controls['lastName'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\n </div>\n }\n @if(checkoutForm.controls['lastName'].touched && checkoutForm.controls['lastName'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-2\"><!--Fila 2-->\n @if(getTypeForm().viewForms.phoneNumber.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'phone'|translate}}\n @if(getTypeForm().viewForms.phoneNumber.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"phoneNumber\"\n formControlName='phoneNumber' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['phoneNumber'].touched &&\n checkoutForm.controls['phoneNumber'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'phone-help1'|translate}}\n </span>\n </div>\n }\n @if(checkoutForm.controls['phoneNumber'].touched &&\n checkoutForm.controls['phoneNumber'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'phone-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n @if(getTypeForm().viewForms.email.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'email-address'|translate}}\n @if(getTypeForm().viewForms.email.required){\n <span class=\"required\">*</span>\n }</label>\n <input class=\"form-control\" type=\"email\" name=\"email\" formControlName='email' value=\"\" placeholder=\"\"\n autocomplete=\"off\">\n @if(checkoutForm.controls['email'].touched && checkoutForm.controls['email'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'email-address-help1'|translate}}\n </span>\n </div>\n }\n @if(checkoutForm.controls['email'].touched && checkoutForm.controls['email'].errors?.['email']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'email-address-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-2\"><!--Fila 3-->\n @if(getTypeForm().viewForms.countryCode.enabled){\n @if(countries$ | async; as countries){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'country'|translate}}\n @if(getTypeForm().viewForms.countryCode.required){\n <span class=\"required\">*</span>\n }</label>\n <select class=\"form-select\" name=\"countryCode\" formControlName='countryCode'\n (change)=\"onCountrySelected($event)\">\n @for(country of countries; track $index){\n <option [value]=\"country.code\">{{ country.name }}</option>\n }\n </select>\n @if(checkoutForm.controls['countryCode'].touched &&\n checkoutForm.controls['countryCode'].errors?.['required']){\n <div class=\"text text-danger\">\n {{'country-help'|translate}}\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.provinceCode.enabled){\n @if(provinces$ | async; as provinces){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'state'|translate}}\n @if(getTypeForm().viewForms.provinceCode.required){\n <span class=\"required\">*</span>\n }</label>\n <select class=\"form-select\" name=\"provinceCode\" (change)=\"onProvincesSelected($event, provinces)\"\n formControlName='provinceCode'>\n <option value=\"\">{{'select-state'|translate}}</option>\n @for(province of provinces; track $index){\n <option [value]=\"province.code\">{{ province.name }}\n </option>\n }\n </select>\n @if(checkoutForm.controls['provinceCode'].touched &&\n checkoutForm.controls['provinceCode'].errors?.['required']){\n <div class=\"text text-danger\">\n {{'state-help'|translate}}\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.city.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'town-city'|translate}}\n @if(getTypeForm().viewForms.city.required){\n <span class=\"required\">*</span>\n }</label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\" formControlName='city'\n value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['city'].touched && checkoutForm.controls['city'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 4-->\n @if(getTypeForm().viewForms.street.enabled){\n <div class=\"form-group col-12 col-md-8\">\n <label class=\"field-label\">{{'address'|translate}}\n @if(getTypeForm().viewForms.street.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\n formControlName='street' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['street'].touched && checkoutForm.controls['street'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\n </div>\n }\n @if(checkoutForm.controls['street'].touched && checkoutForm.controls['street'].errors?.['maxlength']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\n </div>\n }\n </div>\n }\n\n <!-- form direcci\u00F3n -->\n @if(getTypeForm().viewForms.postcode.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'postal-code'|translate}}\n @if(getTypeForm().viewForms.postcode.required){\n <span class=\"required\">*</span>\n }</label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\n formControlName='postcode' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutForm.controls['postcode'].touched &&\n checkoutForm.controls['postcode'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\n </div>\n }\n @if(checkoutForm.controls['postcode'].touched && checkoutForm.controls['postcode'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\"> {{'postal-code-pattern-error' | translate}} </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 5-->\n @if(getTypeForm().viewForms.documentType.enabled){\n @if(documentTypes$ | async; as documentTypes){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'document-type'|translate}}\n @if(getTypeForm().viewForms.documentType.required){\n <span class=\"required\">*</span>\n }</label>\n <select name=\"documentType\" class=\"form-select\" (change)=\"onDocumentTypesSelected($event)\"\n formControlName='documentType'>\n @for(item of documentTypes; track $index){\n <option [value]=\"item.code\">{{item.name}}</option>\n }\n </select>\n @if(checkoutForm.controls['documentType'].touched &&\n checkoutForm.controls['documentType'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'type-document-help'|translate}}\n </span>\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.documentNumber.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'document-number'|translate}}\n @if(getTypeForm().viewForms.documentNumber.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" [type]=\"'text'\" name=\"documentNumber\"\n formControlName='documentNumber' min=\"1\" max=\"99999999999\" value=\"\" placeholder=\"\"\n autocomplete=\"off\">\n @if(checkoutForm.controls['documentNumber'].touched &&\n checkoutForm.controls['documentNumber'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'document-number-help'|translate}}\n </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 6-->\n @if(this.channel.checkoutNotesField == 'required' || this.channel.checkoutNotesField == 'show'){\n <div class=\"form-group col-12 col-md-12\">\n @if(!getLabelNotesParam()){\n <label class=\"field-label\">{{'notes'|translate}}\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n @if(getLabelNotesParam(); as labelnotes){\n <label class=\"field-label\" [innerHTML]=\"labelnotes.value\">\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\" formControlName='notes'\n value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(this.channel.checkoutNotesField == 'required' && checkoutForm.controls['notes'].touched &&\n checkoutForm.controls['notes'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'notes-help'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 7-->\n <div class=\"form-group col-12 col-md-12\">\n <label for=\"formFact\"><b>{{ 'same-billing-address' | translate }}</b> <input type=\"checkbox\"\n class=\"ms-2\" [checked]=\"viewDataFacturacion\" (change)=\"showFormFacturacion()\"\n id=\"formFact\"></label>\n </div>\n </div>\n <div class=\"row mt-df\">\n <div class=\"col-12\">\n <p>\n <label class=\"required text-underline text-danger\">* {{ 'required-fields' | translate }}</label>\n </p>\n </div>\n </div>\n <div class=\"row mt-df\">\n @if(getTypeForm().viewForms.terms.enabled){\n <div class=\"form-group col-12 col-md-12\">\n @if(getTypeForm().viewForms.terms.required){\n <span class=\"required\">*</span>\n }\n <label class=\"\" for=\"\"> {{ 'accept-terms' | translate }} <input class=\"ms-2\" name=\"terms\"\n formControlName='terms' type=\"checkbox\" required (change)=\"onInputChange()\" /> </label><br />\n <button type=\"button\" class=\"btn btn-primary\" data-bs-toggle=\"modal\"\n data-bs-target=\"#terminos-y-condiciones\">\n {{ 'whats-this' | translate }}\n </button>\n @if(checkoutForm.controls['terms'].touched && !checkoutForm.controls['terms'].value){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{ 'must-accept-terms' | translate }}</span>\n </div>\n }\n </div>\n }\n </div>\n @if(!viewDataFacturacion){\n <!--Formulario de Facturaci\u00F3n-->\n <div class=\"card\">\n <div class=\"card-header text-center\">\n <h2>{{ 'billing-data' | translate }}</h2>\n </div>\n <div class=\"card-body\">\n <form [formGroup]=\"checkoutFormFacturacion\">\n <div class=\"row mt-2\"><!--Fila 1-->\n\n @if(getTypeForm().viewForms.firstName.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <!--Si es required-->\n <label class=\"form-label\">{{'first-name'|translate}}\n @if(getTypeForm().viewForms.firstName.required){\n <span class=\"required\">*</span>\n }\n </label>\n <!--Input-->\n <input class=\"form-control\" type=\"text\" name=\"firstName\" formControlName=\"firstName\"\n value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['firstName'].touched &&\n checkoutFormFacturacion.controls['firstName'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'first-name-help1'|translate}}</span>\n </div>\n }\n <!--Error info-->\n @if(checkoutFormFacturacion.controls['firstName'].touched &&\n checkoutFormFacturacion.controls['firstName'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'first-name-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n @if(getTypeForm().viewForms.lastName.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'last-name'|translate}}\n @if(getTypeForm().viewForms.lastName.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input class=\"form-control\" type=\"text\" name=\"lastName\" formControlName=\"lastName\" value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['lastName'].touched &&\n checkoutFormFacturacion.controls['lastName'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'last-name-help1'|translate}}</span>\n </div>\n }\n @if(checkoutFormFacturacion.controls['lastName'].touched &&\n checkoutFormFacturacion.controls['lastName'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'last-name-help2'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-2\"><!--Fila 2-->\n @if(getTypeForm().viewForms.phoneNumber.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'phone'|translate}}\n @if(getTypeForm().viewForms.phoneNumber.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"phoneNumber\"\n formControlName='phoneNumber' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['phoneNumber'].touched &&\n checkoutFormFacturacion.controls['phoneNumber'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'phone-help1'|translate}}\n </span>\n </div>\n }\n @if(checkoutFormFacturacion.controls['phoneNumber'].touched &&\n checkoutFormFacturacion.controls['phoneNumber'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'phone-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n @if(getTypeForm().viewForms.email.enabled){\n <div class=\"form-group col-12 col-md-6\">\n <label class=\"form-label\">{{'email-address'|translate}}\n @if(getTypeForm().viewForms.email.required){\n <span class=\"required\">*</span>\n }</label>\n <input class=\"form-control\" type=\"email\" name=\"email\" formControlName='email' value=\"\"\n placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['email'].touched &&\n checkoutFormFacturacion.controls['email'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'email-address-help1'|translate}}\n </span>\n </div>\n }\n @if(checkoutFormFacturacion.controls['email'].touched &&\n checkoutFormFacturacion.controls['email'].errors?.['email']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'email-address-help2'|translate}}\n </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-2\"><!--Fila 3-->\n @if(getTypeForm().viewForms.countryCode.enabled){\n @if(countries$ | async; as countries){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'country'|translate}}\n @if(getTypeForm().viewForms.countryCode.required){\n <span class=\"required\">*</span>\n }</label>\n <select class=\"form-select\" name=\"countryCode\" formControlName='countryCode'\n (change)=\"onCountrySelected($event, true)\">\n @for(country of countries; track $index){\n <option [value]=\"country.code\">{{ country.name }}</option>\n }\n </select>\n @if(checkoutFormFacturacion.controls['countryCode'].touched &&\n checkoutFormFacturacion.controls['countryCode'].errors?.['required']){\n <div class=\"text text-danger\">\n {{'country-help'|translate}}\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.provinceCode.enabled){\n @if(provinces$ | async; as provinces){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'state'|translate}}\n @if(getTypeForm().viewForms.provinceCode.required){\n <span class=\"required\">*</span>\n }</label>\n <select class=\"form-select\" name=\"provinceCode\"\n (change)=\"onProvincesSelected($event, provinces, true)\" formControlName='provinceCode'>\n <option value=\"\">{{'select-state'|translate}}</option>\n @for(province of provinces; track $index){\n <option [value]=\"province.code\">{{ province.name }}\n </option>\n }\n </select>\n @if(checkoutFormFacturacion.controls['provinceCode'].touched &&\n checkoutFormFacturacion.controls['provinceCode'].errors?.['required']){\n <div class=\"text text-danger\">\n {{'state-help'|translate}}\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.city.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"form-label\">{{'town-city'|translate}}\n @if(getTypeForm().viewForms.city.required){\n <span class=\"required\">*</span>\n }</label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"city\"\n formControlName='city' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['city'].touched &&\n checkoutFormFacturacion.controls['city'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'town-city-help'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 4-->\n @if(getTypeForm().viewForms.street.enabled){\n <div class=\"form-group col-12 col-md-8\">\n <label class=\"field-label\">{{'address'|translate}}\n @if(getTypeForm().viewForms.street.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"street\"\n formControlName='street' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['street'].touched &&\n checkoutFormFacturacion.controls['street'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'address-help1'|translate}}</span>\n </div>\n }\n @if(checkoutFormFacturacion.controls['street'].touched &&\n checkoutFormFacturacion.controls['street'].errors?.['maxlength']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'address-help2'|translate}}</span>\n </div>\n }\n </div>\n }\n\n <!-- form direcci\u00F3n -->\n @if(getTypeForm().viewForms.postcode.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'postal-code'|translate}}\n @if(getTypeForm().viewForms.postcode.required){\n <span class=\"required\">*</span>\n }</label>\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"postcode\"\n formControlName='postcode' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['postcode'].touched &&\n checkoutFormFacturacion.controls['postcode'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'postal-code-help'|translate}}</span>\n </div>\n }\n @if(checkoutFormFacturacion.controls['postcode'].touched &&\n checkoutFormFacturacion.controls['postcode'].errors?.['pattern']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\"> {{'postal-code-pattern-error' | translate}} </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 5-->\n @if(getTypeForm().viewForms.documentType.enabled){\n @if(documentTypes$ | async; as documentTypes){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'document-type'|translate}}\n @if(getTypeForm().viewForms.documentType.required){\n <span class=\"required\">*</span>\n }</label>\n <select name=\"documentType\" class=\"form-select\"\n (change)=\"onDocumentTypesSelected($event, true)\" formControlName='documentType'>\n @for(item of documentTypes; track $index){\n <option [value]=\"item.code\">{{item.name}}</option>\n }\n </select>\n @if(checkoutFormFacturacion.controls['documentType'].touched &&\n checkoutFormFacturacion.controls['documentType'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'type-document-help'|translate}}\n </span>\n </div>\n }\n </div>\n }\n }\n @if(getTypeForm().viewForms.documentNumber.enabled){\n <div class=\"form-group col-12 col-md-4\">\n <label class=\"field-label\">{{'document-number'|translate}}\n @if(getTypeForm().viewForms.documentNumber.required){\n <span class=\"required\">*</span>\n }\n </label>\n <input (change)=\"onInputChange()\" class=\"form-control\" [type]=\"'text'\" name=\"documentNumber\"\n formControlName='documentNumber' min=\"1\" max=\"99999999999\" value=\"\" placeholder=\"\"\n autocomplete=\"off\">\n @if(checkoutFormFacturacion.controls['documentNumber'].touched &&\n checkoutFormFacturacion.controls['documentNumber'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">\n {{'document-number-help'|translate}}\n </span>\n </div>\n }\n </div>\n }\n </div>\n <div class=\"row mt-df\"><!--Fila 6-->\n @if(this.channel.checkoutNotesField == 'required' || this.channel.checkoutNotesField == 'show'){\n <div class=\"form-group col-12 col-md-12\">\n @if(!getLabelNotesParam()){\n <label class=\"field-label\">{{'notes'|translate}}\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n @if(getLabelNotesParam(); as labelnotes){\n <label class=\"field-label\" [innerHTML]=\"labelnotes.value\">\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\n formControlName='notes' value=\"\" placeholder=\"\" autocomplete=\"off\">\n @if(this.channel.checkoutNotesField == 'required' &&\n checkoutFormFacturacion.controls['notes'].touched &&\n checkoutFormFacturacion.controls['notes'].errors?.['required']){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'notes-help'|translate}}</span>\n </div>\n }\n </div>\n }\n </div>\n </form>\n </div>\n </div>\n }\n <div class=\"row d-flex flex-row\">\n <div class=\"col-12 d-flex justify-content-end\">\n <button type=\"submit\" class=\"btn btn-primary text-white\"\n [disabled]=\"checkoutForm.invalid || (this.channel.checkoutNotesField == 'required' && (!checkoutForm.get('notes')?.value || checkoutForm.get('notes')?.value.trim() === '')) || (!viewDataFacturacion && checkoutFormFacturacion && (checkoutFormFacturacion.invalid || (this.channel.checkoutNotesField == 'required' && (!checkoutFormFacturacion.get('notes')?.value || checkoutFormFacturacion.get('notes')?.value.trim() === ''))))\">{{(isLastOne\n ? 'finish-checkout' : (allready_data ? 'update' :\n 'ready-form')) | translate}}\n <!-- {{(allready_data ? 'update' : (isLastOne ? 'finish-checkout' : 'ready-form')) | translate}} -->\n </button>\n </div>\n </div>\n @if(loading){\n <div class=\"d-flex flex-column justify-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n }\n\n </form>\n</div>\n} @else {\n<div id=\"loginCheckout\">\n @if(require_login){\n <div class=\"d-flex flex-column justify-content-center align-items-center my-5 \">\n <div class=\"col-12 col-md-6 \">\n <app-login-form-ec (ready)=\"verifyValidate($event)\" [redirect]=\"false\" [title]=\"'need-login'\">\n </app-login-form-ec>\n </div>\n </div>\n }\n</div>\n}\n} @else {\n@if(modeSelectAddress == 'ONLY_ADDRESS_SELECTION'){\n<div class=\"checkout-title my-2\">\n <h3>{{'address-selection'|translate}}</h3>\n</div>\n}\n\n@if(this.addressBook){\n@if(this.addressBook?.length){\n<div class=\"container\">\n <div class=\"row\">\n @for(item of addressBook; track $index; let i = $index){\n <div class=\"col-sm-6 col-12 my-3\">\n <div class=\"card p-3\">\n <input class=\"ms-1 mt-3 form-check-input input-size-lg\" type=\"radio\" [name]=\"'n-'+i\" [id]=\"i\"\n [checked]=\"item.selected\" (click)=\"setSelectAddress(item)\" (change)=\"onInputChange()\">\n <div class=\"ms-5\">\n <h4 class=\"card-title\">\n <strong>{{'address'|translate}}</strong><br>\n <span class=\"text-uppercase h3\">{{item.street}}</span>\n </h4>\n <div class=\"row\">\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'country'|translate}}</strong> {{getCountry(item.countryCode)}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'state'|translate}}</strong> {{getProvince(item.provinceCode)}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'town-city'|translate}}</strong> {{item.city}}\n </h5>\n <h5 class=\"card-subtitle mb-2 text-muted col-auto\">\n <strong>{{'postal-code'|translate}}</strong> {{item.postcode}}\n </h5>\n </div>\n <div class=\"row px-3\">\n <div class=\"card p-2 bg-light w-100\">\n <div class=\"card-body\">\n <h5 class=\"card-title\">{{'address-contact'|translate}}</h5>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'first-name'|translate}}</strong>\n {{item.addressContact.firstName}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'last-name'|translate}}</strong>\n {{item.addressContact.lastName}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'document-type'|translate}}</strong>\n {{getDocumentType(item.addressContact.documentType)}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'document-number'|translate}}</strong>\n {{item.addressContact.documentNumber}}\n </h6>\n <h6 class=\"card-subtitle mb-2 text-muted\">\n <strong>{{'email-address'|translate}}</strong>\n {{item.addressContact.email}}\n </h6>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n\n </div>\n\n <div class=\"w-100\">\n @if(this.channel.checkoutNotesField == 'required' || this.channel.checkoutNotesField == 'show'){\n <div class=\"row mt-df\">\n <div class=\"form-group col-12 col-md-12\">\n @if(!getLabelNotesParam()){\n <label class=\"form-label\">{{'notes'|translate}}\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n @if(getLabelNotesParam(); as labelnotes){\n <label class=\"form-label\" [innerHTML]=\"labelnotes.value\">\n @if(this.channel.checkoutNotesField == 'required'){\n <span class=\"required\">*</span>\n }\n </label>\n }\n <input (change)=\"onInputChange()\" class=\"form-control\" type=\"text\" name=\"notes\"\n [(ngModel)]=\"this.addressBookSelected.notes\" #ctrl=\"ngModel\" value=\"\" placeholder=\"\"\n autocomplete=\"off\" [required]=\"this.channel.checkoutNotesField == 'required'\">\n @if(this.channel.checkoutNotesField == 'required' && ctrl.touched && ctrl.invalid){\n <div class=\"text-danger-container\">\n <span class=\"text-danger\">{{'notes-help'|translate}}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n <div class=\"row d-flex flex-row\">\n <div class=\"col-12 d-flex justify-content-end\">\n <button (click)=\"onSelectAddress(cartItems)\" class=\"btn btn-primary text-white\"\n [disabled]=\"loadingStep || (this.channel.checkoutNotesField == 'required' && (!this.addressBookSelected.notes || this.addressBookSelected.notes.trim() === ''))\">{{(isLastOne\n ? 'finish-checkout' : (allready_data ? 'update' :\n 'ready-form')) | translate}}\n <!-- {{(allready_data ? 'update' : (isLastOne ? 'finish-checkout' : 'ready-form')) | translate}} -->\n </button>\n\n </div>\n </div>\n @if(loading){\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n }\n</div>\n} @else {\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 text-center my-2\">\n <div class=\"d-flex flex-column justify-content-center align-items-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </div>\n</div>\n}\n} @else {\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 text-center my-2\">\n <h4> {{'address-book-not-result' | translate }} </h4>\n </div>\n </div>\n</div>\n}\n\n}\n\n}\n@else {\n<div class=\"container\">\n <p>Por favor <a [routerLink]=\"['/auth/login']\"> Inicie Sesi\u00F3n</a></p>\n</div>\n}\n}\n@if(getTypeForm().viewForms.terms.enabled){\n<div class=\"modal fade\" id=\"terminos-y-condiciones\" tabindex=\"-1\" aria-labelledby=\"modalLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog modal-xl modal-dialog-scrollable\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"modalLabel\">T\u00E9rminos y condiciones</h5>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <app-blocks-ec [section]=\"'terminos-y-condiciones'\" />\n </div>\n </div>\n </div>\n</div>\n}", styles: [""], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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.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: "directive", type: i1$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$3.CheckboxRequiredValidator, selector: "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]" }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LoginFormEcComponent, selector: "app-login-form-ec", inputs: ["redirect", "redirectTo", "inCart"], outputs: ["ready"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "component", type: BlocksEcComponent, selector: "app-blocks-ec", inputs: ["templates", "show_loading", "section", "blockFilters"] }] });
|
|
10484
9677
|
}
|
|
10485
9678
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DataformEcComponent, decorators: [{
|
|
10486
9679
|
type: Component,
|
|
@@ -10629,7 +9822,7 @@ class ShipmentEcComponent {
|
|
|
10629
9822
|
this._checkoutService.next();
|
|
10630
9823
|
}
|
|
10631
9824
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ShipmentEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10632
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ShipmentEcComponent, isStandalone: true, selector: "app-shipment-ec", ngImport: i0, template: "<div class=\"container-fluid\">\n\t<div class=\"col-12\">\n\t\t<div class=\"card text-center\">\n\t\t\t<div class=\"card-header text-dark\">\n\t\t\t\t<h4>{{ 'select-method' | translate }}</h4>\n\t\t\t\t@if(methods$ | async; as methods){\n\t\t\t\t\t<div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n\t\t\t\t\t\t<div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n\t\t\t\t\t\t\t<div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n\t\t\t\t\t\t\t\t@for(method of filterMethods(methods); track $index){\n\t\t\t\t\t\t\t\t<button [disabled]=\"buttonsDisabled\" type=\"button\"\n\t\t\t\t\t\t\t\t\t[class]=\"'btn btn-outline-secondary mx-1 mb-1' + (isMethodActive(method.code) ? ' active' : '')\"\n\t\t\t\t\t\t\t\t\t(click)=\"setMethod(method)\">\n\t\t\t\t\t\t\t\t\t{{ method.name | translate }}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}@else {\n\t\t\t\t\t<div class=\"d-flex flex-row w-100 justify-content-center mt-2\">\n\t\t\t\t\t\t<h5 class=\"text-secondary\">{{'no-shipment-methods'|translate}}</h5>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<div class=\"card-body\">\n\t\t\t\t@if(moreInfoInMethod && methodSelect && methodSelect.description){\n <div class=\"row justify-content-center mb-2\">\n <div class=\"col-12 col-md-6 col-lg-4 d-flex flex-column mb-2\" [id]=\"methodSelect.code\">\n @for(line of methodSelect.description.split('\\r\\n'); track $index; let i=$index){\n <span [id]=\"methodSelect.code+'-'+i\" [class]=\"'line-'+i\">{{line}}</span>\n\t\t\t\t\t }\n </div>\n </div>}\n\t\t\t\t@if(costs$ | async; as costs){\n<!-- \t\t\t\t @if(costs){ -->\n <div class=\"row justify-content-center\">\n @if(!loadingInternal){\n\t\t\t\t\t\t@for(cost of costs; track $index; let y = $index){\n <div class=\"col-auto text-dark\">\n\t\t\t\t\t\t\t@if(cost.contracts.length > 0){\n\t\t\t\t\t\t\t\t@if(costs.length > 1){\n\t\t\t\t\t\t\t\t\t<span><b>{{ cost.name | translate }}</b></span>\n\t\t\t\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t\t\t}@else{\n\t\t\t\t\t\t\t\t\t<span><b>{{ methodSelect.name | translate }}</b></span>\n\t\t\t\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@for(contract of cost.contracts; track $index; let i = $index){\n <div class=\"option\">\n <div class=\"form-check current-contract\">\n <input class=\"form-check-input\" [checked]=\"(y === 0 && i === 0) ? true : contract.selected\" type=\"radio\" name=\"card\" [id]=\"cost.name + i\"\n value=\"dark\" (click)=\"verifyValidate(costs,cost.name, contract)\">\n <label class=\"form-check-label\" [for]=\"cost.name + i\" aria-label=\"Dark grey\">\n @if(validName(contract.name)){\n\t\t\t\t\t\t\t\t\t\t\t<span\n [class]=\"(cost.name == 'home_delivery') ? 'shipment-contractname home_delivery' : 'shipment-contractname' \">\n\t\t\t\t\t\t\t\t\t\t\t\t{{ contract.name | translate }}\n\t\t\t\t\t\t\t\t\t\t\t</span>}\n\t\t\t\t\t\t\t\t\t\t\t@if(contract.computed){\n\t\t\t\t\t\t\t\t\t\t\t\t<span><br class=\"shipment-contractname\">{{ contract.computed | translate }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<br class=\"shipment-contractname\">\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t@if(contract.detail){\n <div class=\"contract-detail\">\n\t\t\t\t\t\t\t\t\t\t\t\t@for(line of contract.detail.split(' - '); track $index; let i = $index){\n <div [class]=\"'contrat-item-'+i\">\n @if(i == 0){<span><b>{{ line }}</b></span>}\n @if(i > 0){<span class=\"inside-detail\">{{ line }}</span>}\n </div>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n </div>\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t@if(contract.price > 0){\n <span [class]=\"'inside-detail ' + ( costos?.amount == 0 ? ' free ' : '') \">\n @if(!contract.computed){<br class=\"shipment-contractname\">}\n {{ ('price'|translate) + ': ' + (contract.price | ecCurrencySymbol) }}</span>\n\t\t\t\t\t\t\t\t\t\t\t}\n <br>\n </label>\n </div>\n </div>\n\t\t\t\t\t\t\t\t}\n \n\t\t\t\t\t\t\t}\n </div>\n\t\t\t\t\t\t}\n }@else {\n\t\t\t\t\t\t<app-loading-full-ec></app-loading-full-ec>\n\t\t\t\t\t}\n </div>\n\t\t\t\t}\n\t\t\t\t\n </div>\n\n\t\t</div>\n\t\t<div class=\"row d-flex flex-row\">\n\t\t\t<div class=\"col-12 d-flex justify-content-between\">\n\t\t\t\t<button class=\"btn btn-primary text-white\" (click)=\"goBack()\">{{'back'|translate}}</button>\n\t\t\t\t<button type=\"submit\" (click)=\"next()\" [disabled]=\"!enabledConfirmButton\" class=\"btn btn-primary text-white\">{{(isLastOne\n\t\t\t\t\t? 'finish-checkout' :'ready-form') | translate}}\n\t\t\t\t\t<!-- {{(allready_data ? 'update' : (isLastOne ? 'finish-checkout' : 'ready-form')) | translate}} -->\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n</div>", styles: [""], dependencies: [{ kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
9825
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ShipmentEcComponent, isStandalone: true, selector: "app-shipment-ec", ngImport: i0, template: "<div class=\"container-fluid\">\n\t<div class=\"col-12\">\n\t\t<div class=\"card text-center\">\n\t\t\t<div class=\"card-header text-dark\">\n\t\t\t\t<h4>{{ 'select-method' | translate }}</h4>\n\t\t\t\t@if(methods$ | async; as methods){\n\t\t\t\t\t<div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n\t\t\t\t\t\t<div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n\t\t\t\t\t\t\t<div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n\t\t\t\t\t\t\t\t@for(method of filterMethods(methods); track $index){\n\t\t\t\t\t\t\t\t<button [disabled]=\"buttonsDisabled\" type=\"button\"\n\t\t\t\t\t\t\t\t\t[class]=\"'btn btn-outline-secondary mx-1 mb-1' + (isMethodActive(method.code) ? ' active' : '')\"\n\t\t\t\t\t\t\t\t\t(click)=\"setMethod(method)\">\n\t\t\t\t\t\t\t\t\t{{ method.name | translate }}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}@else {\n\t\t\t\t\t<div class=\"d-flex flex-row w-100 justify-content-center mt-2\">\n\t\t\t\t\t\t<h5 class=\"text-secondary\">{{'no-shipment-methods'|translate}}</h5>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<div class=\"card-body\">\n\t\t\t\t@if(moreInfoInMethod && methodSelect && methodSelect.description){\n <div class=\"row justify-content-center mb-2\">\n <div class=\"col-12 col-md-6 col-lg-4 d-flex flex-column mb-2\" [id]=\"methodSelect.code\">\n @for(line of methodSelect.description.split('\\r\\n'); track $index; let i=$index){\n <span [id]=\"methodSelect.code+'-'+i\" [class]=\"'line-'+i\">{{line}}</span>\n\t\t\t\t\t }\n </div>\n </div>}\n\t\t\t\t@if(costs$ | async; as costs){\n<!-- \t\t\t\t @if(costs){ -->\n <div class=\"row justify-content-center\">\n @if(!loadingInternal){\n\t\t\t\t\t\t@for(cost of costs; track $index; let y = $index){\n <div class=\"col-auto text-dark\">\n\t\t\t\t\t\t\t@if(cost.contracts.length > 0){\n\t\t\t\t\t\t\t\t@if(costs.length > 1){\n\t\t\t\t\t\t\t\t\t<span><b>{{ cost.name | translate }}</b></span>\n\t\t\t\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t\t\t}@else{\n\t\t\t\t\t\t\t\t\t<span><b>{{ methodSelect.name | translate }}</b></span>\n\t\t\t\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@for(contract of cost.contracts; track $index; let i = $index){\n <div class=\"option\">\n <div class=\"form-check current-contract\">\n <input class=\"form-check-input\" [checked]=\"(y === 0 && i === 0) ? true : contract.selected\" type=\"radio\" name=\"card\" [id]=\"cost.name + i\"\n value=\"dark\" (click)=\"verifyValidate(costs,cost.name, contract)\">\n <label class=\"form-check-label\" [for]=\"cost.name + i\" aria-label=\"Dark grey\">\n @if(validName(contract.name)){\n\t\t\t\t\t\t\t\t\t\t\t<span\n [class]=\"(cost.name == 'home_delivery') ? 'shipment-contractname home_delivery' : 'shipment-contractname' \">\n\t\t\t\t\t\t\t\t\t\t\t\t{{ contract.name | translate }}\n\t\t\t\t\t\t\t\t\t\t\t</span>}\n\t\t\t\t\t\t\t\t\t\t\t@if(contract.computed){\n\t\t\t\t\t\t\t\t\t\t\t\t<span><br class=\"shipment-contractname\">{{ contract.computed | translate }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t<br class=\"shipment-contractname\">\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t@if(contract.detail){\n <div class=\"contract-detail\">\n\t\t\t\t\t\t\t\t\t\t\t\t@for(line of contract.detail.split(' - '); track $index; let i = $index){\n <div [class]=\"'contrat-item-'+i\">\n @if(i == 0){<span><b>{{ line }}</b></span>}\n @if(i > 0){<span class=\"inside-detail\">{{ line }}</span>}\n </div>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n </div>\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t@if(contract.price > 0){\n <span [class]=\"'inside-detail ' + ( costos?.amount == 0 ? ' free ' : '') \">\n @if(!contract.computed){<br class=\"shipment-contractname\">}\n {{ ('price'|translate) + ': ' + (contract.price | ecCurrencySymbol) }}</span>\n\t\t\t\t\t\t\t\t\t\t\t}\n <br>\n </label>\n </div>\n </div>\n\t\t\t\t\t\t\t\t}\n \n\t\t\t\t\t\t\t}\n </div>\n\t\t\t\t\t\t}\n }@else {\n\t\t\t\t\t\t<app-loading-full-ec></app-loading-full-ec>\n\t\t\t\t\t}\n </div>\n\t\t\t\t}\n\t\t\t\t\n </div>\n\n\t\t</div>\n\t\t<div class=\"row d-flex flex-row\">\n\t\t\t<div class=\"col-12 d-flex justify-content-between\">\n\t\t\t\t<button class=\"btn btn-primary text-white\" (click)=\"goBack()\">{{'back'|translate}}</button>\n\t\t\t\t<button type=\"submit\" (click)=\"next()\" [disabled]=\"!enabledConfirmButton\" class=\"btn btn-primary text-white\">{{(isLastOne\n\t\t\t\t\t? 'finish-checkout' :'ready-form') | translate}}\n\t\t\t\t\t<!-- {{(allready_data ? 'update' : (isLastOne ? 'finish-checkout' : 'ready-form')) | translate}} -->\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n</div>", styles: [""], dependencies: [{ kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }] });
|
|
10633
9826
|
}
|
|
10634
9827
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ShipmentEcComponent, decorators: [{
|
|
10635
9828
|
type: Component,
|
|
@@ -10824,7 +10017,7 @@ class BankTransferEcComponent {
|
|
|
10824
10017
|
ngOnInit() {
|
|
10825
10018
|
}
|
|
10826
10019
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BankTransferEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10827
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BankTransferEcComponent, isStandalone: true, selector: "app-bank-transfer-ec", inputs: { method: "method", verifyValidate: "verifyValidate", setLoading: "setLoading" }, ngImport: i0, template: "<div class=\"row px-0 description-cont\">\n\n @for(line of method.description.split('\\r\\n');track $index; let i=$index){\n <p [id]=\"'faqs-'+i\" [class]=\"'qt px-5 m-0 line-'+i\">{{ line }}</p>\n }\n</div>\n@if(method.instructions){\n <hr />\n <div class=\"row px-0 instructions-cont mb-1\">\n <h5 class=\"instructions-title\">{{ ('instructions' | translate) }}</h5>\n @for(line of method.instructions.split('\\r\\n'); track $index; let i=$index){\n <p [class]=\"'px-5 m-0 instructions-text line-'+i \">{{ line }}</p>\n }\n</div>\n}\n\n<div class=\"end-button\">\n <button class=\"btn btn-outline-primary\" (click)=\"setLoading() && verifyValidate()\">{{\n ('pay-with-transfer'\n | translate) }}</button>\n</div>\n<!-- @if(loading$ | async; as loading){\n @if(loading){\n <div class=\"mt-2\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n }\n} -->", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
10020
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: BankTransferEcComponent, isStandalone: true, selector: "app-bank-transfer-ec", inputs: { method: "method", verifyValidate: "verifyValidate", setLoading: "setLoading" }, ngImport: i0, template: "<div class=\"row px-0 description-cont\">\n\n @for(line of method.description.split('\\r\\n');track $index; let i=$index){\n <p [id]=\"'faqs-'+i\" [class]=\"'qt px-5 m-0 line-'+i\">{{ line }}</p>\n }\n</div>\n@if(method.instructions){\n <hr />\n <div class=\"row px-0 instructions-cont mb-1\">\n <h5 class=\"instructions-title\">{{ ('instructions' | translate) }}</h5>\n @for(line of method.instructions.split('\\r\\n'); track $index; let i=$index){\n <p [class]=\"'px-5 m-0 instructions-text line-'+i \">{{ line }}</p>\n }\n</div>\n}\n\n<div class=\"end-button\">\n <button class=\"btn btn-outline-primary\" (click)=\"setLoading() && verifyValidate()\">{{\n ('pay-with-transfer'\n | translate) }}</button>\n</div>\n<!-- @if(loading$ | async; as loading){\n @if(loading){\n <div class=\"mt-2\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n }\n} -->", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
10828
10021
|
}
|
|
10829
10022
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: BankTransferEcComponent, decorators: [{
|
|
10830
10023
|
type: Component,
|
|
@@ -10848,7 +10041,7 @@ class OfflineEcComponent {
|
|
|
10848
10041
|
ngOnInit() {
|
|
10849
10042
|
}
|
|
10850
10043
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OfflineEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
10851
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: OfflineEcComponent, isStandalone: true, selector: "app-offline-ec", inputs: { method: "method", verifyValidate: "verifyValidate", setLoading: "setLoading" }, ngImport: i0, template: "<p id=\"faqs\" class=\"qt px-5\">{{ method.description }}</p>\n<p class=\"px-5\">{{ method.instructions }}</p>\n<div class=\"end-button\">\n\t<button class=\"btn btn-outline-primary\" (click)=\"setLoading() && verifyValidate()\">{{\n\t\t('pay-with-offline'| translate) }}</button>\n</div>\n<!-- @if(loading$ | async; as loading){\n @if(loading){\n <div class=\"mt-2\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n }\n} -->", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
10044
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: OfflineEcComponent, isStandalone: true, selector: "app-offline-ec", inputs: { method: "method", verifyValidate: "verifyValidate", setLoading: "setLoading" }, ngImport: i0, template: "<p id=\"faqs\" class=\"qt px-5\">{{ method.description }}</p>\n<p class=\"px-5\">{{ method.instructions }}</p>\n<div class=\"end-button\">\n\t<button class=\"btn btn-outline-primary\" (click)=\"setLoading() && verifyValidate()\">{{\n\t\t('pay-with-offline'| translate) }}</button>\n</div>\n<!-- @if(loading$ | async; as loading){\n @if(loading){\n <div class=\"mt-2\">\n <app-loading-inline-ec></app-loading-inline-ec>\n </div>\n }\n} -->", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
10852
10045
|
}
|
|
10853
10046
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OfflineEcComponent, decorators: [{
|
|
10854
10047
|
type: Component,
|
|
@@ -10919,9 +10112,7 @@ class DecidirEcComponent extends ComponentHelper {
|
|
|
10919
10112
|
}
|
|
10920
10113
|
ngOnDestroy() {
|
|
10921
10114
|
// Remover el listener de mensajes
|
|
10922
|
-
|
|
10923
|
-
window.removeEventListener('message', this.handleIframeMessage, false);
|
|
10924
|
-
}
|
|
10115
|
+
window.removeEventListener('message', this.handleIframeMessage, false);
|
|
10925
10116
|
// console.log("SE DESTROZA");
|
|
10926
10117
|
}
|
|
10927
10118
|
ngOnChanges() {
|
|
@@ -11001,13 +10192,11 @@ class DecidirEcComponent extends ComponentHelper {
|
|
|
11001
10192
|
this.url = this.sanitizer.bypassSecurityTrustResourceUrl('assets/decidirFormEc.html');
|
|
11002
10193
|
this.loading = false;
|
|
11003
10194
|
// Escuchar mensajes del iframe para manejar la comunicación
|
|
11004
|
-
|
|
11005
|
-
window.addEventListener('message', this.handleIframeMessage.bind(this), false);
|
|
11006
|
-
}
|
|
10195
|
+
window.addEventListener('message', this.handleIframeMessage.bind(this), false);
|
|
11007
10196
|
};
|
|
11008
10197
|
handleIframeMessage = (event) => {
|
|
11009
10198
|
// Verificar el origen por seguridad
|
|
11010
|
-
if (
|
|
10199
|
+
if (event.origin !== window.location.origin) {
|
|
11011
10200
|
return;
|
|
11012
10201
|
}
|
|
11013
10202
|
if (event.data && event.data.type === 'DECIDIR_PAYMENT') {
|
|
@@ -11049,18 +10238,16 @@ class DecidirEcComponent extends ComponentHelper {
|
|
|
11049
10238
|
});
|
|
11050
10239
|
};
|
|
11051
10240
|
resizeIframe = (obj) => {
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
obj.style.width = obj.contentWindow.document.body.scrollWidth + 'px';
|
|
11055
|
-
}
|
|
10241
|
+
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
|
|
10242
|
+
obj.style.width = obj.contentWindow.document.body.scrollWidth + 'px';
|
|
11056
10243
|
};
|
|
11057
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DecidirEcComponent, deps: [{ token: i0.Renderer2 }, { token: ConnectionService }, { token: ToastService }, { token: CoreConstantsService }, { token: ApiConstantsService }, { token: CartService }, { token: i2.ActivatedRoute }, { token: i1$
|
|
10244
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DecidirEcComponent, deps: [{ token: i0.Renderer2 }, { token: ConnectionService }, { token: ToastService }, { token: CoreConstantsService }, { token: ApiConstantsService }, { token: CartService }, { token: i2.ActivatedRoute }, { token: i1$4.DomSanitizer }, { token: ParametersService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11058
10245
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DecidirEcComponent, isStandalone: true, selector: "app-decidir-ec", inputs: { paymentServiceInst: "paymentServiceInst", method: "method", total_amount: "total_amount", allData: "allData", user_data: "user_data" }, outputs: { ready: "ready" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"text-center\">\n <h3>Continuar con el pago en Decidir</h3>\n @if (method) {\n <p class=\"px-5\">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n }\n @if (!loading) {\n <button class=\"btn btn-outline-secondary comprar\" (click)=\"openModal()\">Pagar</button>\n } @else {\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center mt-2\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n }\n </div>\n\n@if (showModal) {\n<div class=\"modal-backdrop\" (click)=\"clickClose()\">\n <div class=\"modal-dialog modal-lg\" (click)=\"$event.stopPropagation()\">\n <div class=\"modal-content\">\n\n <div class=\"modal-body\">\n <div class=\"payment-container\">\n \n <!-- Iframe del formulario de decidir -->\n <div class=\"iframe-container\">\n <iframe [src]=\"url\" frameborder=\"0\" class=\"payment-iframe\"></iframe>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n}\n", styles: [".modal-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;display:flex;justify-content:center;align-items:center;z-index:1050;backdrop-filter:blur(2px)}.modal-dialog{max-width:90%;max-height:90%;width:800px;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 20px 60px #0000004d;animation:modalFadeIn .3s ease-out}.modal-dialog.modal-lg{max-width:900px;width:90%}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.9) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}.modal-content{display:flex;flex-direction:column;height:100%;border:none;border-radius:16px;background:#fff}.modal-header{padding:1.5rem 2rem;border-bottom:1px solid #e9ecef;background:linear-gradient(135deg,#f8f9fa,#e9ecef);display:flex;justify-content:space-between;align-items:center;position:relative}.modal-header:after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent 0%,#dee2e6 50%,transparent 100%)}.modal-header .modal-title{margin:0;font-size:1.5rem;font-weight:700;color:#2c3e50;text-shadow:0 1px 2px rgba(0,0,0,.1)}.modal-header .btn-close{background:none;border:none;font-size:1.8rem;color:#6c757d;cursor:pointer;padding:0;width:35px;height:35px;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all .3s ease;position:relative}.modal-header .btn-close:hover{background-color:#dc3545;color:#fff;transform:rotate(90deg);box-shadow:0 4px 12px #dc35454d}.modal-header .btn-close:active{transform:rotate(90deg) scale(.95)}.modal-body{padding:0;flex:1;overflow:hidden;background:#fff}.payment-container{height:100%;display:flex;flex-direction:column;background:#fff}.cards-accepted{padding:1.5rem 2rem;text-align:center;border-bottom:1px solid #e9ecef;background:linear-gradient(135deg,#fff,#f8f9fa);position:relative}.cards-accepted:after{content:\"\";position:absolute;bottom:0;left:5%;right:5%;height:1px;background:linear-gradient(90deg,transparent 0%,#dee2e6 50%,transparent 100%)}.cards-accepted .cards-img{height:45px;max-width:100%;object-fit:contain;filter:drop-shadow(0 2px 4px rgba(0,0,0,.1));transition:transform .2s ease}.cards-accepted .cards-img:hover{transform:scale(1.05)}.iframe-container{flex:1;padding:1.5rem;background:#fff;position:relative}.iframe-container:before{content:\"\";position:absolute;top:0;left:1.5rem;right:1.5rem;height:1px;background:linear-gradient(90deg,transparent 0%,#e9ecef 50%,transparent 100%)}.payment-iframe{width:100%;height:620px;border:none;border-radius:12px;background:#fff;box-shadow:inset 0 2px 8px #0000000d}.half-width{width:49%!important}.ml-1{margin-left:1%}#card-form{height:450px}.iframeStyle{height:520px;width:100%}@media only screen and (max-width: 1024px){.modal-dialog,.modal-dialog.modal-lg{max-width:95%;width:95%}.payment-iframe{height:650px}.modal-header{padding:1rem 1.5rem}.modal-header .modal-title{font-size:1.125rem}.cards-accepted{padding:.75rem 1.5rem}}@media only screen and (max-width: 680px){.modal-dialog{max-width:98%;width:98%;margin:1rem;max-height:calc(100vh - 2rem)}.modal-dialog.modal-lg{max-width:98%;width:98%}.payment-iframe{height:550px}.modal-header{padding:1rem}.modal-header .modal-title{font-size:1rem}.modal-header .btn-close{width:28px;height:28px;font-size:1.25rem}.cards-accepted{padding:.5rem 1rem}.cards-accepted .cards-img{height:35px}.iframe-container{padding:.5rem}}@media only screen and (max-width: 480px){.modal-dialog{margin:.5rem;max-height:calc(100vh - 1rem);border-radius:8px}.modal-content{border-radius:8px}.payment-iframe{height:500px}.cards-accepted .cards-img{height:30px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }] });
|
|
11059
10246
|
}
|
|
11060
10247
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DecidirEcComponent, decorators: [{
|
|
11061
10248
|
type: Component,
|
|
11062
10249
|
args: [{ selector: 'app-decidir-ec', standalone: true, imports: [CommonModule, FormsModule, LoadingFullEcComponent], template: "<div class=\"text-center\">\n <h3>Continuar con el pago en Decidir</h3>\n @if (method) {\n <p class=\"px-5\">{{ method.description }}</p>\n <p class=\"px-5\">{{ method.instructions }}</p>\n }\n @if (!loading) {\n <button class=\"btn btn-outline-secondary comprar\" (click)=\"openModal()\">Pagar</button>\n } @else {\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center mt-2\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n }\n </div>\n\n@if (showModal) {\n<div class=\"modal-backdrop\" (click)=\"clickClose()\">\n <div class=\"modal-dialog modal-lg\" (click)=\"$event.stopPropagation()\">\n <div class=\"modal-content\">\n\n <div class=\"modal-body\">\n <div class=\"payment-container\">\n \n <!-- Iframe del formulario de decidir -->\n <div class=\"iframe-container\">\n <iframe [src]=\"url\" frameborder=\"0\" class=\"payment-iframe\"></iframe>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n}\n", styles: [".modal-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#0009;display:flex;justify-content:center;align-items:center;z-index:1050;backdrop-filter:blur(2px)}.modal-dialog{max-width:90%;max-height:90%;width:800px;background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 20px 60px #0000004d;animation:modalFadeIn .3s ease-out}.modal-dialog.modal-lg{max-width:900px;width:90%}@keyframes modalFadeIn{0%{opacity:0;transform:scale(.9) translateY(-20px)}to{opacity:1;transform:scale(1) translateY(0)}}.modal-content{display:flex;flex-direction:column;height:100%;border:none;border-radius:16px;background:#fff}.modal-header{padding:1.5rem 2rem;border-bottom:1px solid #e9ecef;background:linear-gradient(135deg,#f8f9fa,#e9ecef);display:flex;justify-content:space-between;align-items:center;position:relative}.modal-header:after{content:\"\";position:absolute;bottom:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent 0%,#dee2e6 50%,transparent 100%)}.modal-header .modal-title{margin:0;font-size:1.5rem;font-weight:700;color:#2c3e50;text-shadow:0 1px 2px rgba(0,0,0,.1)}.modal-header .btn-close{background:none;border:none;font-size:1.8rem;color:#6c757d;cursor:pointer;padding:0;width:35px;height:35px;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:all .3s ease;position:relative}.modal-header .btn-close:hover{background-color:#dc3545;color:#fff;transform:rotate(90deg);box-shadow:0 4px 12px #dc35454d}.modal-header .btn-close:active{transform:rotate(90deg) scale(.95)}.modal-body{padding:0;flex:1;overflow:hidden;background:#fff}.payment-container{height:100%;display:flex;flex-direction:column;background:#fff}.cards-accepted{padding:1.5rem 2rem;text-align:center;border-bottom:1px solid #e9ecef;background:linear-gradient(135deg,#fff,#f8f9fa);position:relative}.cards-accepted:after{content:\"\";position:absolute;bottom:0;left:5%;right:5%;height:1px;background:linear-gradient(90deg,transparent 0%,#dee2e6 50%,transparent 100%)}.cards-accepted .cards-img{height:45px;max-width:100%;object-fit:contain;filter:drop-shadow(0 2px 4px rgba(0,0,0,.1));transition:transform .2s ease}.cards-accepted .cards-img:hover{transform:scale(1.05)}.iframe-container{flex:1;padding:1.5rem;background:#fff;position:relative}.iframe-container:before{content:\"\";position:absolute;top:0;left:1.5rem;right:1.5rem;height:1px;background:linear-gradient(90deg,transparent 0%,#e9ecef 50%,transparent 100%)}.payment-iframe{width:100%;height:620px;border:none;border-radius:12px;background:#fff;box-shadow:inset 0 2px 8px #0000000d}.half-width{width:49%!important}.ml-1{margin-left:1%}#card-form{height:450px}.iframeStyle{height:520px;width:100%}@media only screen and (max-width: 1024px){.modal-dialog,.modal-dialog.modal-lg{max-width:95%;width:95%}.payment-iframe{height:650px}.modal-header{padding:1rem 1.5rem}.modal-header .modal-title{font-size:1.125rem}.cards-accepted{padding:.75rem 1.5rem}}@media only screen and (max-width: 680px){.modal-dialog{max-width:98%;width:98%;margin:1rem;max-height:calc(100vh - 2rem)}.modal-dialog.modal-lg{max-width:98%;width:98%}.payment-iframe{height:550px}.modal-header{padding:1rem}.modal-header .modal-title{font-size:1rem}.modal-header .btn-close{width:28px;height:28px;font-size:1.25rem}.cards-accepted{padding:.5rem 1rem}.cards-accepted .cards-img{height:35px}.iframe-container{padding:.5rem}}@media only screen and (max-width: 480px){.modal-dialog{margin:.5rem;max-height:calc(100vh - 1rem);border-radius:8px}.modal-content{border-radius:8px}.payment-iframe{height:500px}.cards-accepted .cards-img{height:30px}}\n"] }]
|
|
11063
|
-
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: ConnectionService }, { type: ToastService }, { type: CoreConstantsService }, { type: ApiConstantsService }, { type: CartService }, { type: i2.ActivatedRoute }, { type: i1$
|
|
10250
|
+
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: ConnectionService }, { type: ToastService }, { type: CoreConstantsService }, { type: ApiConstantsService }, { type: CartService }, { type: i2.ActivatedRoute }, { type: i1$4.DomSanitizer }, { type: ParametersService }], propDecorators: { paymentServiceInst: [{
|
|
11064
10251
|
type: Input
|
|
11065
10252
|
}], method: [{
|
|
11066
10253
|
type: Input
|
|
@@ -11153,7 +10340,7 @@ class PaymentEcComponent {
|
|
|
11153
10340
|
this._checkoutService.back();
|
|
11154
10341
|
};
|
|
11155
10342
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PaymentEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11156
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PaymentEcComponent, isStandalone: true, selector: "app-payment-ec", ngImport: i0, template: "@if(methods$ | async; as methods){\n<div class=\"container-fluid\">\n\n\t<div class=\"row\">\n\t\t<div class=\"col-12\">\n\t\t\t<div class=\"card \">\n\t\t\t\t<div class=\"card-header text-dark text-center\">\n\t\t\t\t\t<h4>{{ 'select-method' | translate }}</h4>\n\t\t\t\t\t<div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n\t\t\t\t\t\t<div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n\t\t\t\t\t\t\t<div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n\t\t\t\t\t\t\t\t@for (method of methods; track $index; let x = $index) {\n\t\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\"(click)=\"setMethod(method) ; setActive($event)\">\n\t\t\t\t\t\t\t\t\t{{ method.name | translate }}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"card-body text-center\">\n\t\t\t\t\t@if(methodData$ | async; as method){\n\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t@if(!loadingInternal){\n\t\t\t\t\t\t\t@if(isMP(method.code)){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"px-5\">{{ method.instructions }}</p>\n\t\t\t\t\t\t\t\t\t\t<app-mp-redirect-ec (ready)=\"verifyValidate($event)\" \t[method]=\"method\"></app-mp-redirect-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<!-- <div class=\"method-container text-dark text-left\" *ngIf=\"isMPTarjetaDeCredito(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n\t\t\t\t\t\t\t\t\t\t<p class=\"px-5\">{{ method.instructions }}</p>\n\t\t\t\t\t\t\t\t\t\t<div app-mp-credit-ec (ready)=\"verifyValidate()\" [public_key]=\"getPK(method)\"\n\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectRedsys(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t*ngIf=\"!method.code.includes('bizum') && !method.code.includes('_out_')\">\n\t\t\t\t\t\t\t\t\t\t\t<app-redsys-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t\t</app-redsys-redirect-ec>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t*ngIf=\"method.code.includes('bizum') || method.code.includes('_out_')\">\n\t\t\t\t\t\t\t\t\t\t\t<app-redsys-redirect-out-ec (ready)=\"verifyValidate($event)\"\n\t\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" [user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t\t</app-redsys-redirect-out-ec>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectCecaBank(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<app-ceca-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t</app-ceca-redirect-ec>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isPeyPalExpress(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-paypal-express-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-paypal-express-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isMobbex(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-mobbex-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isBancard(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bancard-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-bancard-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>-->\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isDecidir(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-decidir-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"_paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-decidir-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t@if(isMethodOffline(method.code)){\n\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<app-offline-ec \n\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!--\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isCulqi(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-culqi-ec [apiKey]=\"getPKCulqi(method)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[amount]=\"total_amount\" [customStyle]=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t(ready)=\"verifyValidate()\"></app-culqi-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isCatastro(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bancard-catastro-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\"></app-bancard-catastro-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isBamboo(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bamboo-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\"></app-bamboo-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div> -->\n\t\t\t\t\t\t\t@if(isBankTransfer(method.code)){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bank-transfer-ec \n\t\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<app-loading-inline-ec></app-loading-inline-ec>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row d-flex flex-row\">\n\t\t\t\t<div class=\"col-12 d-flex justify-content-between\">\n\t\t\t\t\t<button class=\"btn btn-primary text-white\" (click)=\"goBack()\">{{'back'|translate}}</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n}", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "component", type: LoadingInlineEcComponent, selector: "app-loading-inline-ec", inputs: ["type"] }, { kind: "component", type: MpRedirectEcComponent, selector: "app-mp-redirect-ec", inputs: ["method", "total_amount", "allData"], outputs: ["ready"] }, { kind: "component", type: BankTransferEcComponent, selector: "app-bank-transfer-ec", inputs: ["method", "verifyValidate", "setLoading"] }, { kind: "component", type: OfflineEcComponent, selector: "app-offline-ec", inputs: ["method", "verifyValidate", "setLoading"] }, { kind: "component", type: DecidirEcComponent, selector: "app-decidir-ec", inputs: ["paymentServiceInst", "method", "total_amount", "allData", "user_data"], outputs: ["ready"] }] });
|
|
10343
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: PaymentEcComponent, isStandalone: true, selector: "app-payment-ec", ngImport: i0, template: "@if(methods$ | async; as methods){\n<div class=\"container-fluid\">\n\n\t<div class=\"row\">\n\t\t<div class=\"col-12\">\n\t\t\t<div class=\"card \">\n\t\t\t\t<div class=\"card-header text-dark text-center\">\n\t\t\t\t\t<h4>{{ 'select-method' | translate }}</h4>\n\t\t\t\t\t<div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\">\n\t\t\t\t\t\t<div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\n\t\t\t\t\t\t\t<div class=\"d-flex align-content-start justify-content-center flex-wrap\">\n\t\t\t\t\t\t\t\t@for (method of methods; track $index; let x = $index) {\n\t\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\"(click)=\"setMethod(method) ; setActive($event)\">\n\t\t\t\t\t\t\t\t\t{{ method.name | translate }}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"card-body text-center\">\n\t\t\t\t\t@if(methodData$ | async; as method){\n\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t@if(!loadingInternal){\n\t\t\t\t\t\t\t@if(isMP(method.code)){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n\t\t\t\t\t\t\t\t\t\t\t<p class=\"px-5\">{{ method.instructions }}</p>\n\t\t\t\t\t\t\t\t\t\t<app-mp-redirect-ec (ready)=\"verifyValidate($event)\" \t[method]=\"method\"></app-mp-redirect-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<!-- <div class=\"method-container text-dark text-left\" *ngIf=\"isMPTarjetaDeCredito(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<p id=\"faqs\" class=\"qt px-5 \">{{ method.description }}</p>\n\t\t\t\t\t\t\t\t\t\t<p class=\"px-5\">{{ method.instructions }}</p>\n\t\t\t\t\t\t\t\t\t\t<div app-mp-credit-ec (ready)=\"verifyValidate()\" [public_key]=\"getPK(method)\"\n\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectRedsys(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t*ngIf=\"!method.code.includes('bizum') && !method.code.includes('_out_')\">\n\t\t\t\t\t\t\t\t\t\t\t<app-redsys-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t\t</app-redsys-redirect-ec>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t\t\t\t\t*ngIf=\"method.code.includes('bizum') || method.code.includes('_out_')\">\n\t\t\t\t\t\t\t\t\t\t\t<app-redsys-redirect-out-ec (ready)=\"verifyValidate($event)\"\n\t\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" [user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t\t</app-redsys-redirect-out-ec>\n\t\t\t\t\t\t\t\t\t\t</ng-container>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isRedirectCecaBank(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<app-ceca-redirect-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\">\n\t\t\t\t\t\t\t\t\t\t</app-ceca-redirect-ec>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isPeyPalExpress(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-paypal-express-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-paypal-express-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isMobbex(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-mobbex-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-mobbex-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isBancard(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bancard-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-bancard-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>-->\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isDecidir(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-decidir-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"_paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\">\n\t\t\t\t\t\t\t\t\t\t\t</app-decidir-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div> \n\t\t\t\t\t\t\t@if(isMethodOffline(method.code)){\n\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t<app-offline-ec \n\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<!--\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isCulqi(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-culqi-ec [apiKey]=\"getPKCulqi(method)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[amount]=\"total_amount\" [customStyle]=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t(ready)=\"verifyValidate()\"></app-culqi-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isCatastro(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bancard-catastro-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\"></app-bancard-catastro-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"method-container text-dark text-start\" *ngIf=\"isBamboo(method.code)\">\n\t\t\t\t\t\t\t\t<div class=\"container\">\n\t\t\t\t\t\t\t\t\t<div class=\"row justify-content-center\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bamboo-ec (ready)=\"verifyValidate($event)\" [method]=\"method\"\n\t\t\t\t\t\t\t\t\t\t\t\t[user_data]=\"allData()\" [paymentServiceInst]=\"paymentService\"\n\t\t\t\t\t\t\t\t\t\t\t\t[total_amount]=\"total_amount\"></app-bamboo-ec>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div> -->\n\t\t\t\t\t\t\t@if(isBankTransfer(method.code)){\n\t\t\t\t\t\t\t\t<div class=\"method-container text-dark\">\n\t\t\t\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"col-12\">\n\t\t\t\t\t\t\t\t\t\t\t<app-bank-transfer-ec \n\t\t\t\t\t\t\t\t\t\t\t\t[method]=\"method\" \n\t\t\t\t\t\t\t\t\t\t\t\t[verifyValidate]= \"verifyValidate\"\n\t\t\t\t\t\t\t\t\t\t\t\t[setLoading] = \"setLoading\" />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t<app-loading-inline-ec></app-loading-inline-ec>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"row d-flex flex-row\">\n\t\t\t\t<div class=\"col-12 d-flex justify-content-between\">\n\t\t\t\t\t<button class=\"btn btn-primary text-white\" (click)=\"goBack()\">{{'back'|translate}}</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n}", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: LoadingInlineEcComponent, selector: "app-loading-inline-ec", inputs: ["type"] }, { kind: "component", type: MpRedirectEcComponent, selector: "app-mp-redirect-ec", inputs: ["method", "total_amount", "allData"], outputs: ["ready"] }, { kind: "component", type: BankTransferEcComponent, selector: "app-bank-transfer-ec", inputs: ["method", "verifyValidate", "setLoading"] }, { kind: "component", type: OfflineEcComponent, selector: "app-offline-ec", inputs: ["method", "verifyValidate", "setLoading"] }, { kind: "component", type: DecidirEcComponent, selector: "app-decidir-ec", inputs: ["paymentServiceInst", "method", "total_amount", "allData", "user_data"], outputs: ["ready"] }] });
|
|
11157
10344
|
}
|
|
11158
10345
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PaymentEcComponent, decorators: [{
|
|
11159
10346
|
type: Component,
|
|
@@ -11228,7 +10415,7 @@ class DetailCheckoutBlockEcComponent {
|
|
|
11228
10415
|
}
|
|
11229
10416
|
}
|
|
11230
10417
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DetailCheckoutBlockEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11231
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DetailCheckoutBlockEcComponent, isStandalone: true, selector: "app-detail-checkout-block-ec", ngImport: i0, template: "@if(data$ | async; as datos){\n <div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\">\n @for(item of data; track $index; let i = $index){\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon(item.type)\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">{{ item.type | translate }}</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (item.amount != 0 ) ? (item.amount |\n ecCurrencySymbol) : ('free' | translate) }}</span>\n </div>\n }\n </div>\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
10418
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: DetailCheckoutBlockEcComponent, isStandalone: true, selector: "app-detail-checkout-block-ec", ngImport: i0, template: "@if(data$ | async; as datos){\n <div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\">\n @for(item of data; track $index; let i = $index){\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\">\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon(item.type)\"></i>\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">{{ item.type | translate }}</strong>\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (item.amount != 0 ) ? (item.amount |\n ecCurrencySymbol) : ('free' | translate) }}</span>\n </div>\n }\n </div>\n}", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
|
|
11232
10419
|
}
|
|
11233
10420
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DetailCheckoutBlockEcComponent, decorators: [{
|
|
11234
10421
|
type: Component,
|
|
@@ -11279,7 +10466,7 @@ class CheckoutEcComponent {
|
|
|
11279
10466
|
this._checkoutService.setSteps(steps);
|
|
11280
10467
|
}
|
|
11281
10468
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CheckoutEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11282
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CheckoutEcComponent, isStandalone: true, selector: "lib-checkout-ec", ngImport: i0, template: "<main class=\"py-4\" id=\"appCheckoutEc\">\n @if(canCheckout){\n <app-detail-checkout-block-ec></app-detail-checkout-block-ec>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-md-12 col-12\">\n @if(state$ | async; as steps){ \n <div id=\"stepper\" class=\"bs-stepper\">\n <div class=\"mb-3 row d-flex justify-content-center position-relative stepperContainer\">\n @for(step of steps; track $index; let x=$index){\n <div [class]=\"'d-flex flex-column justify-content-center align-items-center px-0 col-2'\">\n <div [class]=\"'step d-inline-flex align-items-center'\" [attr.data-target]=\"'#test-l-'+step.step\">\n <span\n [class]=\"'px-2 rounded-circle text-white font-bold bs-stepper-number ' + (step.state == 'ready' ? 'bg-primary' : 'bg-secondary') \">{{x+1}}</span>\n <span class=\"bs-stepper-label\">{{ step.label |translate}}</span>\n </div>\n \n </div>\n @if(x < steps.length-1){\n <div class=\"col-3 d-flex align-items-center\"><hr [class]=\"'w-100 line ' + (step.state == 'doing' ? 'line-active' : 'line-default')\" ></div>\n }\n }\n </div>\n <!-- CONTENT -->\n <div class=\"bs-stepper-content margin-bottom-i\">\n <app-step-container-ec [steps]=\"steps\" />\n </div>\n </div>\n } \n </div>\n <!--@if(loading$ | async; as load){\n <div class=\"col-md-12 col-12\">\n <div *ngIf=\"load\" class=\"d-flex flex-column jusitfy-content-center align-items-center mt-2\">\n <app-loading-full-ec></app-loading-full-ec>\n <h5>{{ 'processing-payment' | translate }}</h5> \n </div>\n </div>\n }-->\n </div>\n </div>\n } @else {\n <div class=\"wrap\">\n <!-- <div *ngIf=\"(loading$ | async) as load\">\n <app-loading-full-ec *ngIf=\"canCheckout\"></app-loading-full-ec>\n </div>\n <section id=\"cart\" *ngIf=\"!canCheckout\">\n <section id=\"cart bg-white h-50\">\n <div class=\"d-flex flex-column justify-content-center align-items-center text-center\">\n <h4>{{ 'empty-cart' | translate }}</h4>\n <h5>{{ 'empty-cart-detail' | translate }}</h5>\n </div>\n </section>\n </section> -->\n </div>\n }\n</main>\n", styles: [".bs-stepper-label{font-size:10px;padding-left:.5rem;font-weight:700}@media (max-width: 767.98px){.bs-stepper-label{font-size:10px;line-height:1.1;white-space:normal;word-wrap:break-word;max-width:65px;text-align:center;padding-left:0;padding-top:.2rem}}.bs-stepper-number{font-size:10px;font-weight:700;padding-top:.2rem;padding-bottom:.2rem}@media (max-width: 767.98px){.bs-stepper-number{font-size:9px;padding:.2rem .35rem;min-width:20px;height:20px;display:flex;align-items:center;justify-content:center}}@media (max-width: 767.98px){.step{flex-direction:column!important;align-items:center!important;text-align:center;width:100%}}@media (max-width: 767.98px){.stepperContainer{margin-bottom:1.5rem!important}.stepperContainer .col-2{display:flex;justify-content:center;align-items:flex-start;min-height:50px}.stepperContainer .col-3{display:flex;align-items:center}.stepperContainer .col-3 hr{margin-top:-10px}}.line{height:1px;border:none;background-color:var(--bs-secondary);position:relative;overflow:hidden;margin:0;opacity:.75!important}.line:before{content:\"\";position:absolute;top:0;left:0;width:0;height:100%;background-color:var(--bs-primary);transition:width .5s}.line-active:before{width:100%;left:0}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
10469
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: CheckoutEcComponent, isStandalone: true, selector: "lib-checkout-ec", ngImport: i0, template: "<main class=\"py-4\" id=\"appCheckoutEc\">\n @if(canCheckout){\n <app-detail-checkout-block-ec></app-detail-checkout-block-ec>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-md-12 col-12\">\n @if(state$ | async; as steps){ \n <div id=\"stepper\" class=\"bs-stepper\">\n <div class=\"mb-3 row d-flex justify-content-center position-relative stepperContainer\">\n @for(step of steps; track $index; let x=$index){\n <div [class]=\"'d-flex flex-column justify-content-center align-items-center px-0 col-2'\">\n <div [class]=\"'step d-inline-flex align-items-center'\" [attr.data-target]=\"'#test-l-'+step.step\">\n <span\n [class]=\"'px-2 rounded-circle text-white font-bold bs-stepper-number ' + (step.state == 'ready' ? 'bg-primary' : 'bg-secondary') \">{{x+1}}</span>\n <span class=\"bs-stepper-label\">{{ step.label |translate}}</span>\n </div>\n \n </div>\n @if(x < steps.length-1){\n <div class=\"col-3 d-flex align-items-center\"><hr [class]=\"'w-100 line ' + (step.state == 'doing' ? 'line-active' : 'line-default')\" ></div>\n }\n }\n </div>\n <!-- CONTENT -->\n <div class=\"bs-stepper-content margin-bottom-i\">\n <app-step-container-ec [steps]=\"steps\" />\n </div>\n </div>\n } \n </div>\n <!--@if(loading$ | async; as load){\n <div class=\"col-md-12 col-12\">\n <div *ngIf=\"load\" class=\"d-flex flex-column jusitfy-content-center align-items-center mt-2\">\n <app-loading-full-ec></app-loading-full-ec>\n <h5>{{ 'processing-payment' | translate }}</h5> \n </div>\n </div>\n }-->\n </div>\n </div>\n } @else {\n <div class=\"wrap\">\n <!-- <div *ngIf=\"(loading$ | async) as load\">\n <app-loading-full-ec *ngIf=\"canCheckout\"></app-loading-full-ec>\n </div>\n <section id=\"cart\" *ngIf=\"!canCheckout\">\n <section id=\"cart bg-white h-50\">\n <div class=\"d-flex flex-column justify-content-center align-items-center text-center\">\n <h4>{{ 'empty-cart' | translate }}</h4>\n <h5>{{ 'empty-cart-detail' | translate }}</h5>\n </div>\n </section>\n </section> -->\n </div>\n }\n</main>\n", styles: [".bs-stepper-label{font-size:10px;padding-left:.5rem;font-weight:700}@media (max-width: 767.98px){.bs-stepper-label{font-size:10px;line-height:1.1;white-space:normal;word-wrap:break-word;max-width:65px;text-align:center;padding-left:0;padding-top:.2rem}}.bs-stepper-number{font-size:10px;font-weight:700;padding-top:.2rem;padding-bottom:.2rem}@media (max-width: 767.98px){.bs-stepper-number{font-size:9px;padding:.2rem .35rem;min-width:20px;height:20px;display:flex;align-items:center;justify-content:center}}@media (max-width: 767.98px){.step{flex-direction:column!important;align-items:center!important;text-align:center;width:100%}}@media (max-width: 767.98px){.stepperContainer{margin-bottom:1.5rem!important}.stepperContainer .col-2{display:flex;justify-content:center;align-items:flex-start;min-height:50px}.stepperContainer .col-3{display:flex;align-items:center}.stepperContainer .col-3 hr{margin-top:-10px}}.line{height:1px;border:none;background-color:var(--bs-secondary);position:relative;overflow:hidden;margin:0;opacity:.75!important}.line:before{content:\"\";position:absolute;top:0;left:0;width:0;height:100%;background-color:var(--bs-primary);transition:width .5s}.line-active:before{width:100%;left:0}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "component", type: StepContainerEcComponent, selector: "app-step-container-ec", inputs: ["steps"] }, { kind: "component", type: DetailCheckoutBlockEcComponent, selector: "app-detail-checkout-block-ec" }] });
|
|
11283
10470
|
}
|
|
11284
10471
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CheckoutEcComponent, decorators: [{
|
|
11285
10472
|
type: Component,
|
|
@@ -11323,7 +10510,7 @@ class SuccessEcComponent {
|
|
|
11323
10510
|
*/
|
|
11324
10511
|
containsBlock(codeBlock) { return this.blocks.find((block) => block.code == codeBlock); }
|
|
11325
10512
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuccessEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11326
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SuccessEcComponent, isStandalone: true, selector: "app-order-success-ec", ngImport: i0, template: "<div id=\"container \" class=\"flex-center generalContainer container-xl py-5\">\n\t@if(payments && payments[0].method.code){\n\t<div class=\"Main card my-2\">\n\t\t@if(this.blocks && this.blocks.length > 0){ \n\t\t\t@if(containsBlock(this.payments[0].method.code); as bloque) {\n\t\t\t\t<div class=\"wrap my-4 card-body\" [id]=\"bloque.code\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t\t\t\t<h5 [class]=\"bloque.code+'-title'\">{{ (bloque?.translations[locale]?.name ?\n\t\t\t\t\t\t\t\tbloque.translations[locale].name :\n\t\t\t\t\t\t\t\t'thanks-for-buying') | translate\n\t\t\t\t\t\t\t\t| uppercase }}</h5>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12 text-start\">\n\t\t\t\t\t\t\t<app-blocks-ec [section]=\"'info_metodo_pago'\" [blockFilters]=\"payments[0].method.code\">\n\t\t\t\t\t\t\t</app-blocks-ec>\n\t\t\t\t\t\t\t<div class=\"d-flex flex-column details\">\n\t\t\t\t\t\t\t\t<p class=\"card-text\">{{ ('number' | translate) + ': ' + params.external_reference }}</p>\n\t\t\t\t\t\t\t\t<p class=\"card-text\">{{((params.payment_status || 'pending') | translate)}}</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}@else {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t\t\t}\n\t\t} @else{\n\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t}\n\t</div>\n\t} @else {\n\t\t<app-loading-full-ec></app-loading-full-ec>\t\n\t}\n</div>\n\n<ng-template #notInfoToMethod let-params>\n\n\t<div class=\"wrap my-4 card-body\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t<h5 class=\"card-title titpage center-block text-center\">\n\t\t\t\t\t{{ 'thanks-for-buying' | translate | uppercase }}\n\t\t\t\t</h5>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12 text-center py-3\">\n\t\t\t\t<h4 class=\"thanks-details\">{{ 'thanks-details' | translate }}</h4>\n\t\t\t\t<h5 class=\"number\">{{ ('number' | translate) + ': ' + params.external_reference }}</h5>\n\t\t\t\t<h5 class=\"pending\">{{ ((params.payment_status || 'pending') | translate) }}</h5>\n\t\t\t\t<!-- <h5 *ngIf=\"!from_mp\">{{ ('will_contact' | translate) }}</h5> -->\n\n\t\t\t\t<!-- <a routerLink=\"/collection\"><button class=\"comprar\">{{ 'continue-shopping' | translate }}</button></a> -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</ng-template>", styles: [""], dependencies: [{ kind: "component", type: BlocksEcComponent, selector: "app-blocks-ec", inputs: ["templates", "show_loading", "section", "blockFilters"] }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
10513
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SuccessEcComponent, isStandalone: true, selector: "app-order-success-ec", ngImport: i0, template: "<div id=\"container \" class=\"flex-center generalContainer container-xl py-5\">\n\t@if(payments && payments[0].method.code){\n\t<div class=\"Main card my-2\">\n\t\t@if(this.blocks && this.blocks.length > 0){ \n\t\t\t@if(containsBlock(this.payments[0].method.code); as bloque) {\n\t\t\t\t<div class=\"wrap my-4 card-body\" [id]=\"bloque.code\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t\t\t\t<h5 [class]=\"bloque.code+'-title'\">{{ (bloque?.translations[locale]?.name ?\n\t\t\t\t\t\t\t\tbloque.translations[locale].name :\n\t\t\t\t\t\t\t\t'thanks-for-buying') | translate\n\t\t\t\t\t\t\t\t| uppercase }}</h5>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12 text-start\">\n\t\t\t\t\t\t\t<app-blocks-ec [section]=\"'info_metodo_pago'\" [blockFilters]=\"payments[0].method.code\">\n\t\t\t\t\t\t\t</app-blocks-ec>\n\t\t\t\t\t\t\t<div class=\"d-flex flex-column details\">\n\t\t\t\t\t\t\t\t<p class=\"card-text\">{{ ('number' | translate) + ': ' + params.external_reference }}</p>\n\t\t\t\t\t\t\t\t<p class=\"card-text\">{{((params.payment_status || 'pending') | translate)}}</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}@else {\n\t\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t\t\t}\n\t\t} @else{\n\t\t\t<ng-container *ngTemplateOutlet=\"notInfoToMethodTemplate ? notInfoToMethodTemplate : notInfoToMethod; context: { $implicit: params }\"></ng-container>\n\t}\n\t</div>\n\t} @else {\n\t\t<app-loading-full-ec></app-loading-full-ec>\t\n\t}\n</div>\n\n<ng-template #notInfoToMethod let-params>\n\n\t<div class=\"wrap my-4 card-body\">\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t<h5 class=\"card-title titpage center-block text-center\">\n\t\t\t\t\t{{ 'thanks-for-buying' | translate | uppercase }}\n\t\t\t\t</h5>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-md-12 col-12 text-center py-3\">\n\t\t\t\t<h4 class=\"thanks-details\">{{ 'thanks-details' | translate }}</h4>\n\t\t\t\t<h5 class=\"number\">{{ ('number' | translate) + ': ' + params.external_reference }}</h5>\n\t\t\t\t<h5 class=\"pending\">{{ ((params.payment_status || 'pending') | translate) }}</h5>\n\t\t\t\t<!-- <h5 *ngIf=\"!from_mp\">{{ ('will_contact' | translate) }}</h5> -->\n\n\t\t\t\t<!-- <a routerLink=\"/collection\"><button class=\"comprar\">{{ 'continue-shopping' | translate }}</button></a> -->\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</ng-template>", styles: [""], dependencies: [{ kind: "component", type: BlocksEcComponent, selector: "app-blocks-ec", inputs: ["templates", "show_loading", "section", "blockFilters"] }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
11327
10514
|
}
|
|
11328
10515
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuccessEcComponent, decorators: [{
|
|
11329
10516
|
type: Component,
|
|
@@ -11462,7 +10649,7 @@ class OrdersListEcComponent {
|
|
|
11462
10649
|
this._router.navigateByUrl((`account/orders/${order.number}`));
|
|
11463
10650
|
}
|
|
11464
10651
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OrdersListEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11465
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: OrdersListEcComponent, isStandalone: true, selector: "app-orders-ec", ngImport: i0, template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n @if(!loading){\n <section id=\"orders\" class=\"w-100\">\n @if(orders && orders.length){\n <div class=\"row mb-1 border-bottom\">\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'number' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('number')\">{{ 'order' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'paymentState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('paymentState')\">{{ 'payment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'method' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('method')\">{{ 'shipment-method' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12 \">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'methodState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('methodState')\">\n {{ 'shipment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'date' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('date')\">{{ 'date' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'total' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('total')\">{{ 'total' | translate }}:</p>\n </div>\n </div>\n @for(order of orders; track $index){\n <div class=\"row item border-bottom py-2\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n </div>\n <div class=\"col-lg-2 col-12\">\n @if(order.payments && order.payments.length > 0){\n <p class=\"price\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n }\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.shipments[0].method.name }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.shipments[0].state | translate | titlecase }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <!-- <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</button> -->\n @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\n }\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12 d-flex\">\n @if(creditAmountConfigured ? showPrice : true){\n <h5 class=\"fw-bold text-nowrap\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n }\n <!-- <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button> -->\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">\n <i class=\"bi bi-box-arrow-in-right\"></i></button>\n </div>\n </div>\n }\n }@else {\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n }\n </section>\n }@else {\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n }\n</div>\n\n<ng-template #errorView>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h4>{{ 'orders-error' | translate }}</h4>\n </div>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
10652
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: OrdersListEcComponent, isStandalone: true, selector: "app-orders-ec", ngImport: i0, template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n @if(!loading){\n <section id=\"orders\" class=\"w-100\">\n @if(orders && orders.length){\n <div class=\"row mb-1 border-bottom\">\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'number' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('number')\">{{ 'order' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'paymentState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('paymentState')\">{{ 'payment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'method' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('method')\">{{ 'shipment-method' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12 \">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'methodState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('methodState')\">\n {{ 'shipment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'date' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('date')\">{{ 'date' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'total' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('total')\">{{ 'total' | translate }}:</p>\n </div>\n </div>\n @for(order of orders; track $index){\n <div class=\"row item border-bottom py-2\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n </div>\n <div class=\"col-lg-2 col-12\">\n @if(order.payments && order.payments.length > 0){\n <p class=\"price\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n }\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.shipments[0].method.name }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.shipments[0].state | translate | titlecase }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <!-- <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</button> -->\n @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\n }\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12 d-flex\">\n @if(creditAmountConfigured ? showPrice : true){\n <h5 class=\"fw-bold text-nowrap\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n }\n <!-- <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button> -->\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">\n <i class=\"bi bi-box-arrow-in-right\"></i></button>\n </div>\n </div>\n }\n }@else {\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n }\n </section>\n }@else {\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n }\n</div>\n\n<ng-template #errorView>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h4>{{ 'orders-error' | translate }}</h4>\n </div>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }] });
|
|
11466
10653
|
}
|
|
11467
10654
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OrdersListEcComponent, decorators: [{
|
|
11468
10655
|
type: Component,
|
|
@@ -11547,7 +10734,7 @@ class OrderEcComponent {
|
|
|
11547
10734
|
}
|
|
11548
10735
|
mediaUrl = () => this._constants.mediaUrl();
|
|
11549
10736
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OrderEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11550
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: OrderEcComponent, isStandalone: true, selector: "app-order-ec", ngImport: i0, template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n @if(order$ | async; as order){\n <div class=\"wrap\">\n @if(order){\n\n <div class=\"row justify-content-between \">\n <div class=\"col-sm-auto col-12 font-brandon\">\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\n @if(order?.invoice){\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"getUrlBase().slice(0, -1) + order.invoice\"\n class=\"btn btn-link btn-invoice\">\n <i class=\"fas fa-file-download me-1\"></i>\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\n </a>\n </div>\n }\n <a (click)=\"back()\" class=\"col-auto text-end\">\n <button class=\"btn btn-outline-dark btvolver border\">{{ 'back-to-orders' | translate }}</button>\n </a>\n </div>\n\n <section id=\"orders\">\n <div class=\"row pt-2\">\n <div class=\"col-md-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0]?.method?.name | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">\n Ver seguimiento</a>\n }\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n }\n </div>\n </section>\n @if(!hidePrices && allowRepeatOrders){\n <div class=\"text-end mt-3\">\n <button class=\"btn btn-primary mb-2 btnRepeatOrder\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div> \n }\n\n <div class=\"container py-3 border-top border-bottom\">\n @if(order.items.length){\n <div class=\"row\">\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\n {{ 'description' | translate | uppercase }}\n </div>\n @if(channelConfig.applyOrderLot){\n <div id=\"colLots\" class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n }\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n }\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\">\n {{ 'total' | translate | uppercase }}\n </div>\n }\n </div>\n } @else {\n\n }\n @for(item of order.items; track $index; let i = $index){\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n @if(item.product.variants[0]?.images?.length){\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n } @else {\n @if(item.product.picturesdefault){\n <img class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n }\n }\n </div>\n <div\n class=\"col-md-4 col-7 flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <p class=\"font-brandon d-flex w-100 mb-0\">\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\n </p>\n </div>\n @if(channelConfig.applyOrderLot){\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\n value=\"{{ 'see' | translate | uppercase }}\">\n </div>\n }\n <div class=\"container d-md-none\">\n <div class=\"row\">\n <div class=\"col-4\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-4 font-xl\">\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) |\n ecCurrencySymbol}}</p>\n </div>\n }\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-4 font-xl\">\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) *\n item.quantity) | ecCurrencySymbol}}aaaa</p>\n </div>\n }\n </div>\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\">\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) | ecCurrencySymbol}}\n </p>\n </div>\n }\n <div class=\"col-1 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\n <p class=\"text-end w-100 m-0\">\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n }\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\n <div class=\"card card-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Estado</th>\n <th scope=\"col\">Cantidad</th>\n <th scope=\"col\">Fecha Solicitada</th>\n <th scope=\"col\">Fecha Estimada</th>\n <th scope=\"col\">Sede</th>\n <th scope=\"col\">Nota</th>\n <th scope=\"col\">Total Lote</th>\n </tr>\n </thead>\n <tbody>\n @for( lot of item.orderItemLot; track $index){\n <tr>\n <th scope=\"row\">{{lot.id}}</th>\n <td>{{lot.lot_status}}</td>\n <td>{{lot.quantity}}</td>\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\n @if(lot.date_deliver){\n <td>{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n } @else {\n <td>Pendiente</td>\n }\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n </div>\n }\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-12 col-md-6\">\n <div class=\"row py-4\">\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.items) | ecCurrencySymbol }}\n </div>\n\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.shipping || '0') | ecCurrencySymbol }}\n\n </div>\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n }\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0 ){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'taxes' | translate }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n }\n\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\n <div class=\"col-6 font-brandon font-md text-end\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n } @else {\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n }\n </div>\n\n } @else {\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n }\n </div>\n</main>", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$2.TranslatePipe, name: "translate" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }] });
|
|
10737
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: OrderEcComponent, isStandalone: true, selector: "app-order-ec", ngImport: i0, template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n @if(order$ | async; as order){\n <div class=\"wrap\">\n @if(order){\n\n <div class=\"row justify-content-between \">\n <div class=\"col-sm-auto col-12 font-brandon\">\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\n @if(order?.invoice){\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"getUrlBase().slice(0, -1) + order.invoice\"\n class=\"btn btn-link btn-invoice\">\n <i class=\"fas fa-file-download me-1\"></i>\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\n </a>\n </div>\n }\n <a (click)=\"back()\" class=\"col-auto text-end\">\n <button class=\"btn btn-outline-dark btvolver border\">{{ 'back-to-orders' | translate }}</button>\n </a>\n </div>\n\n <section id=\"orders\">\n <div class=\"row pt-2\">\n <div class=\"col-md-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0]?.method?.name | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n @if(order.tracking){\n <a [href]=\"order.tracking\"\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">\n Ver seguimiento</a>\n }\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n }\n </div>\n </section>\n @if(!hidePrices && allowRepeatOrders){\n <div class=\"text-end mt-3\">\n <button class=\"btn btn-primary mb-2 btnRepeatOrder\" (click)=\"repeatOrder()\">\n {{ 'repeat-order' | translate }}\n </button>\n </div> \n }\n\n <div class=\"container py-3 border-top border-bottom\">\n @if(order.items.length){\n <div class=\"row\">\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\n {{ 'description' | translate | uppercase }}\n </div>\n @if(channelConfig.applyOrderLot){\n <div id=\"colLots\" class=\"col-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | translate | uppercase }}\n </div>\n }\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n }\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\">\n {{ 'total' | translate | uppercase }}\n </div>\n }\n </div>\n } @else {\n\n }\n @for(item of order.items; track $index; let i = $index){\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n @if(item.product.variants[0]?.images?.length){\n <img class=\"smc maxwidth img-fluid rounded-custom \"\n [src]=\"mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n } @else {\n @if(item.product.picturesdefault){\n <img class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n }\n }\n </div>\n <div\n class=\"col-md-4 col-7 flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <p class=\"font-brandon d-flex w-100 mb-0\">\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\n </p>\n </div>\n @if(channelConfig.applyOrderLot){\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\n value=\"{{ 'see' | translate | uppercase }}\">\n </div>\n }\n <div class=\"container d-md-none\">\n <div class=\"row\">\n <div class=\"col-4\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-4 font-xl\">\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) |\n ecCurrencySymbol}}</p>\n </div>\n }\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-4 font-xl\">\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\n item.product.variants[0].saleprice : item.product.variants[0].price) *\n item.quantity) | ecCurrencySymbol}}aaaa</p>\n </div>\n }\n </div>\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\">\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) | ecCurrencySymbol}}\n </p>\n </div>\n }\n <div class=\"col-1 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-2 d-none d-md-flex align-items-center\">\n <p class=\"text-end w-100 m-0\">\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n }\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\n <div class=\"card card-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Estado</th>\n <th scope=\"col\">Cantidad</th>\n <th scope=\"col\">Fecha Solicitada</th>\n <th scope=\"col\">Fecha Estimada</th>\n <th scope=\"col\">Sede</th>\n <th scope=\"col\">Nota</th>\n <th scope=\"col\">Total Lote</th>\n </tr>\n </thead>\n <tbody>\n @for( lot of item.orderItemLot; track $index){\n <tr>\n <th scope=\"row\">{{lot.id}}</th>\n <td>{{lot.lot_status}}</td>\n <td>{{lot.quantity}}</td>\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\n @if(lot.date_deliver){\n <td>{{\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\n } @else {\n <td>Pendiente</td>\n }\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n </div>\n }\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n @if(creditAccountShowPrices !== null ? creditAccountShowPrices : true){\n <div class=\"col-12 col-md-6\">\n <div class=\"row py-4\">\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.items) | ecCurrencySymbol }}\n </div>\n\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\n translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.shipping || '0') | ecCurrencySymbol }}\n\n </div>\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\n translate }}</div>\n }\n @if(!hideDiscounts && order.totals.promotion && order.totals.promotion != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0 ){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'taxes' | translate }}</div>\n }\n @if(!hideTaxes && order.totals.taxes && order.totals.taxes != 0){\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n }\n\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\n <div class=\"col-6 font-brandon font-md text-end\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n } @else {\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n }\n </div>\n\n } @else {\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n }\n </div>\n</main>", styles: [""], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }] });
|
|
11551
10738
|
}
|
|
11552
10739
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OrderEcComponent, decorators: [{
|
|
11553
10740
|
type: Component,
|
|
@@ -11740,7 +10927,7 @@ class FaqsEcComponent {
|
|
|
11740
10927
|
}).catch(err => this._toastService.show('empty-faqs'));
|
|
11741
10928
|
}
|
|
11742
10929
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FaqsEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11743
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FaqsEcComponent, isStandalone: true, selector: "app-faqs-ec", ngImport: i0, template: "<section class=\"formulario container py-2\">\n@if(faqs$ | async; as faqs){\n @if(!empty_faqs){\n <div class=\"d-flex align-items-start row\">\n <div class=\"nav flex-column nav-pills me-3 col-2\" id=\"v-pills-tab\" role=\"tablist\" aria-orientation=\"vertical\">\n @for(faq of faqs; track $index; let i = $index){\n <button [class]=\"'nav-link '+(i==0 ? 'active': '')\" [id]=\"'v-pills-'+faq.code+'-tab'\" data-bs-toggle=\"pill\" [attr.data-bs-target]=\"'#v-pills-'+faq.code\" type=\"button\" role=\"tab\" [attr.aria-controls]=\"'v-pills-'+faq.code\" [attr.aria-selected]=\"(i==0)\">{{faq.title}}</button>\n }\n </div>\n <div class=\"tab-content col-9\" id=\"v-pills-tabContent\">\n @for(faq of faqs; track $index; let i = $index){\n <div [class]=\"'tab-pane fade '+(i==0 ? 'show active' : '')\" [id]=\"'v-pills-'+faq.code\" role=\"tabpanel\" [attr.aria-labelledby]=\"'v-pills-'+faq.code+'-tab'\" tabindex=\"0\">\n <div class=\"accordion\" id=\"accordionFaqs\">\n @for(item of faq.questions; track $index; let i = $index){\n <div class=\"accordion-item\">\n <h2 class=\"accordion-header\">\n <button class=\"accordion-button collapsed\" type=\"button\" data-bs-toggle=\"collapse\"\n [attr.data-bs-target]=\"'#collapse-'+i\" aria-expanded=\"false\" [attr.aria-controls]=\"'collapse-'+i\">\n {{item.question}}\n </button>\n </h2>\n <div [id]=\"'collapse-'+i\" class=\"accordion-collapse collapse\" data-bs-parent=\"#accordionFaqs\">\n <div class=\"accordion-body\">\n <p>{{item.answer}}</p>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }@else {\n <div class=\"d-flex justify-content-center\">\n {{ 'empty_faqs' | translate }}\n </div>\n }\n}@else {\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 align-items-center\">\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center my-5\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </div>\n </div>\n}\n</section>", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
10930
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FaqsEcComponent, isStandalone: true, selector: "app-faqs-ec", ngImport: i0, template: "<section class=\"formulario container py-2\">\n@if(faqs$ | async; as faqs){\n @if(!empty_faqs){\n <div class=\"d-flex align-items-start row\">\n <div class=\"nav flex-column nav-pills me-3 col-2\" id=\"v-pills-tab\" role=\"tablist\" aria-orientation=\"vertical\">\n @for(faq of faqs; track $index; let i = $index){\n <button [class]=\"'nav-link '+(i==0 ? 'active': '')\" [id]=\"'v-pills-'+faq.code+'-tab'\" data-bs-toggle=\"pill\" [attr.data-bs-target]=\"'#v-pills-'+faq.code\" type=\"button\" role=\"tab\" [attr.aria-controls]=\"'v-pills-'+faq.code\" [attr.aria-selected]=\"(i==0)\">{{faq.title}}</button>\n }\n </div>\n <div class=\"tab-content col-9\" id=\"v-pills-tabContent\">\n @for(faq of faqs; track $index; let i = $index){\n <div [class]=\"'tab-pane fade '+(i==0 ? 'show active' : '')\" [id]=\"'v-pills-'+faq.code\" role=\"tabpanel\" [attr.aria-labelledby]=\"'v-pills-'+faq.code+'-tab'\" tabindex=\"0\">\n <div class=\"accordion\" id=\"accordionFaqs\">\n @for(item of faq.questions; track $index; let i = $index){\n <div class=\"accordion-item\">\n <h2 class=\"accordion-header\">\n <button class=\"accordion-button collapsed\" type=\"button\" data-bs-toggle=\"collapse\"\n [attr.data-bs-target]=\"'#collapse-'+i\" aria-expanded=\"false\" [attr.aria-controls]=\"'collapse-'+i\">\n {{item.question}}\n </button>\n </h2>\n <div [id]=\"'collapse-'+i\" class=\"accordion-collapse collapse\" data-bs-parent=\"#accordionFaqs\">\n <div class=\"accordion-body\">\n <p>{{item.answer}}</p>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n }@else {\n <div class=\"d-flex justify-content-center\">\n {{ 'empty_faqs' | translate }}\n </div>\n }\n}@else {\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 align-items-center\">\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center my-5\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </div>\n </div>\n}\n</section>", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LoadingFullEcComponent, selector: "app-loading-full-ec" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
11744
10931
|
}
|
|
11745
10932
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FaqsEcComponent, decorators: [{
|
|
11746
10933
|
type: Component,
|
|
@@ -11995,7 +11182,7 @@ class RatingEcComponent extends ComponentHelper {
|
|
|
11995
11182
|
}
|
|
11996
11183
|
};
|
|
11997
11184
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingEcComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
11998
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: RatingEcComponent, isStandalone: true, selector: "app-rating-ec", inputs: { template: "template", type: "type", ratingValue: "ratingValue" }, usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <ng-template #stars let-score=\"score\">\n @for (value of score; track $index) {\n @switch (value) {\n @case (1) {\n <i class=\"me-1 bi bi-star-fill text-warning star\"></i> \n }\n @case (0.5) {\n <i class=\"me-1 bi bi-star-half text-warning star\"></i>\n } \n @default {\n <i class=\"me-1 bi bi-star text-muted star\"></i>\n }\n }\n }\n </ng-template>\n <ng-container *ngSwitchCase=\"'stars'\"\n [ngTemplateOutlet]=\"template ? template : stars\"\n [ngTemplateOutletContext]=\"{score:score, ratingValue:ratingValue}\">\n </ng-container>\n</ng-container> \n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1
|
|
11185
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: RatingEcComponent, isStandalone: true, selector: "app-rating-ec", inputs: { template: "template", type: "type", ratingValue: "ratingValue" }, usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <ng-template #stars let-score=\"score\">\n @for (value of score; track $index) {\n @switch (value) {\n @case (1) {\n <i class=\"me-1 bi bi-star-fill text-warning star\"></i> \n }\n @case (0.5) {\n <i class=\"me-1 bi bi-star-half text-warning star\"></i>\n } \n @default {\n <i class=\"me-1 bi bi-star text-muted star\"></i>\n }\n }\n }\n </ng-template>\n <ng-container *ngSwitchCase=\"'stars'\"\n [ngTemplateOutlet]=\"template ? template : stars\"\n [ngTemplateOutletContext]=\"{score:score, ratingValue:ratingValue}\">\n </ng-container>\n</ng-container> \n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
11999
11186
|
}
|
|
12000
11187
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RatingEcComponent, decorators: [{
|
|
12001
11188
|
type: Component,
|
|
@@ -12162,7 +11349,7 @@ class ReviewsEcComponent extends ComponentHelper {
|
|
|
12162
11349
|
_authService = inject(AuthService);
|
|
12163
11350
|
isAuthenticated$ = this._authService.isAuthenticated();
|
|
12164
11351
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ReviewsEcComponent, deps: [{ token: ReviewsService }, { token: CoreConstantsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
12165
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ReviewsEcComponent, isStandalone: true, selector: "app-reviews-ec", inputs: { product: "product" }, usesInheritance: true, ngImport: i0, template: "<div class=\"row px-3\">\n <div class=\"col-12 pb-2 pb-md-0\">\n <div class=\"row w-100\">\n <div class=\"col-12 col-md-6\">\n <h4 class=\"mb-0 pt-2 pb-1\">{{\"product-review\" | translate}}</h4>\n @if(isAuthenticated$ ){\n <small class=\"pb-2 escribir\" data-bs-toggle=\"modal\" href=\"#modalReview\">\n {{\"write-a-review\" | translate}}\n <i class=\"bi bi-pencil-square\"></i>\n </small>\n }\n </div>\n <div class=\"col-12 col-md-6 d-flex align-items-center justify-content-start justify-content-md-end\">\n <div class=\"puntaje d-flex\">\n <ng-template #number let-ratingValue=\"ratingValue\">\n <p class=\"puntos mb-0\">\n {{ratingValue}}\n </p>\n </ng-template>\n <app-rating-ec [ratingValue]=\"product.rating\" [template]=\"number\"></app-rating-ec>\n <div class=\"ms-2\">\n <div class=\"stars mb-1\">\n <app-rating-ec [ratingValue]=\"product.rating\"></app-rating-ec>\n </div>\n <small><strong>{{reviews.total}} {{\"reviews\" | translate}}</strong></small>\n </div>\n </div>\n </div>\n </div>\n </div>\n <hr>\n\n <div class=\"tab-content mt-4\" id=\"myTabContent\">\n <div class=\"row g-5\">\n @for (item of reviews.items; track $index) {\n <div class=\"col-12 col-sm-6 col-md-4\">\n <div class=\"row\">\n <div class=\"col-9 col-sm-10\">\n <div class=\"ranking\">\n <app-rating-ec [ratingValue]=\"item.rating\"></app-rating-ec>\n </div>\n <h4 class=\"text-uppercase\">{{item.title}}</h4>\n <div class=\"d-flex justify-content-between\">\n <div class=\"ususario\">\n <i class=\"bi bi-person-fill\"></i> {{ getAuthorName(item.author) }}\n </div>\n </div>\n <div class=\"resenia mt-2\">\n <p style=\"font-size: 14px;\"> {{item.comment}}</p>\n </div>\n </div>\n </div>\n\n </div>\n }\n @if (getPages() && getPages().length > 1) {\n <nav aria-label=\"Page navigation example\">\n <ul class=\"pagination custom-pagination\">\n <li class=\"page-item\">\n <a class=\"page-link cursor-pointer\" (click)=\"first()\" aria-label=\"Previous\">\n <span aria-hidden=\"true\">«</span>\n </a>\n </li>\n @for (page of getPages(); track $index) {\n <li class=\"page-item\">\n <a class=\"page-link cursor-pointer\" (click)=\"goPage(page)\">{{ page }}</a>\n </li>\n }\n <li class=\"page-item\">\n <a class=\"page-link cursor-pointer\" (click)=\"next()\" aria-label=\"Next\">\n <span aria-hidden=\"true\">»</span>\n </a>\n </li>\n </ul>\n </nav>\n\n }\n\n </div>\n </div>\n\n</div>", styles: [".custom-pagination{display:flex;justify-content:center;list-style:none;padding:0;margin-top:20px}.custom-pagination .page-item{margin:0 5px}.custom-pagination .page-link{color:#131716;background-color:#f3f3f3;border:1px solid #ccc;padding:8px 12px;border-radius:5px;text-decoration:none;transition:background-color .3s ease}.custom-pagination .page-link:hover{background-color:#0b0c0c;color:#fff}.custom-pagination .page-item.active .page-link{background-color:#131716;color:#fff;font-weight:700}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "component", type: RatingEcComponent, selector: "app-rating-ec", inputs: ["template", "type", "ratingValue"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
11352
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ReviewsEcComponent, isStandalone: true, selector: "app-reviews-ec", inputs: { product: "product" }, usesInheritance: true, ngImport: i0, template: "<div class=\"row px-3\">\n <div class=\"col-12 pb-2 pb-md-0\">\n <div class=\"row w-100\">\n <div class=\"col-12 col-md-6\">\n <h4 class=\"mb-0 pt-2 pb-1\">{{\"product-review\" | translate}}</h4>\n @if(isAuthenticated$ ){\n <small class=\"pb-2 escribir\" data-bs-toggle=\"modal\" href=\"#modalReview\">\n {{\"write-a-review\" | translate}}\n <i class=\"bi bi-pencil-square\"></i>\n </small>\n }\n </div>\n <div class=\"col-12 col-md-6 d-flex align-items-center justify-content-start justify-content-md-end\">\n <div class=\"puntaje d-flex\">\n <ng-template #number let-ratingValue=\"ratingValue\">\n <p class=\"puntos mb-0\">\n {{ratingValue}}\n </p>\n </ng-template>\n <app-rating-ec [ratingValue]=\"product.rating\" [template]=\"number\"></app-rating-ec>\n <div class=\"ms-2\">\n <div class=\"stars mb-1\">\n <app-rating-ec [ratingValue]=\"product.rating\"></app-rating-ec>\n </div>\n <small><strong>{{reviews.total}} {{\"reviews\" | translate}}</strong></small>\n </div>\n </div>\n </div>\n </div>\n </div>\n <hr>\n\n <div class=\"tab-content mt-4\" id=\"myTabContent\">\n <div class=\"row g-5\">\n @for (item of reviews.items; track $index) {\n <div class=\"col-12 col-sm-6 col-md-4\">\n <div class=\"row\">\n <div class=\"col-9 col-sm-10\">\n <div class=\"ranking\">\n <app-rating-ec [ratingValue]=\"item.rating\"></app-rating-ec>\n </div>\n <h4 class=\"text-uppercase\">{{item.title}}</h4>\n <div class=\"d-flex justify-content-between\">\n <div class=\"ususario\">\n <i class=\"bi bi-person-fill\"></i> {{ getAuthorName(item.author) }}\n </div>\n </div>\n <div class=\"resenia mt-2\">\n <p style=\"font-size: 14px;\"> {{item.comment}}</p>\n </div>\n </div>\n </div>\n\n </div>\n }\n @if (getPages() && getPages().length > 1) {\n <nav aria-label=\"Page navigation example\">\n <ul class=\"pagination custom-pagination\">\n <li class=\"page-item\">\n <a class=\"page-link cursor-pointer\" (click)=\"first()\" aria-label=\"Previous\">\n <span aria-hidden=\"true\">«</span>\n </a>\n </li>\n @for (page of getPages(); track $index) {\n <li class=\"page-item\">\n <a class=\"page-link cursor-pointer\" (click)=\"goPage(page)\">{{ page }}</a>\n </li>\n }\n <li class=\"page-item\">\n <a class=\"page-link cursor-pointer\" (click)=\"next()\" aria-label=\"Next\">\n <span aria-hidden=\"true\">»</span>\n </a>\n </li>\n </ul>\n </nav>\n\n }\n\n </div>\n </div>\n\n</div>", styles: [".custom-pagination{display:flex;justify-content:center;list-style:none;padding:0;margin-top:20px}.custom-pagination .page-item{margin:0 5px}.custom-pagination .page-link{color:#131716;background-color:#f3f3f3;border:1px solid #ccc;padding:8px 12px;border-radius:5px;text-decoration:none;transition:background-color .3s ease}.custom-pagination .page-link:hover{background-color:#0b0c0c;color:#fff}.custom-pagination .page-item.active .page-link{background-color:#131716;color:#fff;font-weight:700}.cursor-pointer{cursor:pointer}\n"], dependencies: [{ kind: "component", type: RatingEcComponent, selector: "app-rating-ec", inputs: ["template", "type", "ratingValue"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
12166
11353
|
}
|
|
12167
11354
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ReviewsEcComponent, decorators: [{
|
|
12168
11355
|
type: Component,
|
|
@@ -12276,13 +11463,13 @@ class ReviewsFormEcComponent extends ComponentHelper {
|
|
|
12276
11463
|
* @returns
|
|
12277
11464
|
*/
|
|
12278
11465
|
updateReviews = () => this.reviewsService.updateReviewsByCode(this.product.id);
|
|
12279
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ReviewsFormEcComponent, deps: [{ token: ToastService }, { token: i2.Router }, { token: CoreConstantsService }, { token: i1$
|
|
12280
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ReviewsFormEcComponent, isStandalone: true, selector: "app-reviews-form-ec", inputs: { product: "product", withAuthenticated: "withAuthenticated", max: "max" }, outputs: { ready: "ready" }, usesInheritance: true, ngImport: i0, template: "<form class=\"formResenia\" [formGroup]=\"reviews_form\" (submit)=\"toastReviewsForm($event)\">\n <div class=\"row\">\n <div class=\"col-4\">\n <label class=\"pt-2\">{{\"product\" | translate }}*</label>\n </div>\n <div class=\"col-8\">\n <p class=\"mt-1 mb-3\">{{ product.name }}</p>\n </div>\n </div>\n\n <!-- Calificaci\u00F3n -->\n <div class=\"row\">\n <div class=\"col-4\">\n <label class=\"pt-2\">{{\"rating\" | translate}}*</label>\n </div>\n <div class=\"col-8\">\n <div class=\"cont-star mt-1 mb-3\">\n @for(star of limit; track $index){\n <input type=\"radio\" class=\"d-none\" [id]=\"'star-' + (limit.length - $index)\" [value]=\"limit.length - $index\"\n formControlName=\"rating\">\n <label class=\"star-label\" [for]=\"'star-' + (limit.length - $index)\">\n <i class=\"bi bi-star-fill\"></i>\n </label>\n }\n </div>\n </div>\n </div>\n\n <!-- Resumen -->\n <div class=\"row\">\n <div class=\"col-4\">\n <label for=\"review-summary\" class=\"pt-2\">{{\"summary\" | translate }}*</label>\n </div>\n <div class=\"col-8\">\n <textarea id=\"review-summary\" class=\"w-100\" placeholder=\"\u00BFC\u00F3mo fue tu experiencia?\" formControlName=\"title\"></textarea>\n </div>\n </div>\n\n <!-- Detalle -->\n <div class=\"row\">\n <div class=\"col-4\">\n <label for=\"review-detail\" class=\"pt-2\">{{\"detail\" | translate }}*</label>\n </div>\n <div class=\"col-8\">\n <textarea id=\"review-detail\" class=\"w-100\" placeholder=\"Contanos por qu\u00E9\" formControlName=\"comment\"></textarea>\n <small class=\"text-uppercase\">(*) {{\"mandatory-fields\" | translate }}</small>\n </div>\n </div>\n\n <!-- Bot\u00F3n de env\u00EDo -->\n <div class=\"row\">\n <div class=\"col-4\"></div>\n <div class=\"col-8\">\n <button type=\"submit\" class=\"btn btn-dark py-2 px-4 rounded-0 mt-4\"\n [disabled]=\"reviews_form.invalid\">{{\"submit-review\" | translate }}</button>\n </div>\n </div> \n</form>", styles: [".cont-star{direction:rtl;unicode-bidi:bidi-override;display:flex;justify-content:end}.cont-star label{display:flex}.cont-star label i{color:#ccc!important;cursor:pointer;font-size:26px;line-height:30px}.cont-star label i:hover,.cont-star label:hover~label i{color:#ffc107!important}input[type=radio]:checked~label i{color:#ffc107!important}input[type=radio]:checked~label i:before,label:hover i:before{content:\"\\f586\"}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$
|
|
11466
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ReviewsFormEcComponent, deps: [{ token: ToastService }, { token: i2.Router }, { token: CoreConstantsService }, { token: i1$3.FormBuilder }, { token: ProductsService }, { token: AuthService }, { token: ReviewsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11467
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ReviewsFormEcComponent, isStandalone: true, selector: "app-reviews-form-ec", inputs: { product: "product", withAuthenticated: "withAuthenticated", max: "max" }, outputs: { ready: "ready" }, usesInheritance: true, ngImport: i0, template: "<form class=\"formResenia\" [formGroup]=\"reviews_form\" (submit)=\"toastReviewsForm($event)\">\n <div class=\"row\">\n <div class=\"col-4\">\n <label class=\"pt-2\">{{\"product\" | translate }}*</label>\n </div>\n <div class=\"col-8\">\n <p class=\"mt-1 mb-3\">{{ product.name }}</p>\n </div>\n </div>\n\n <!-- Calificaci\u00F3n -->\n <div class=\"row\">\n <div class=\"col-4\">\n <label class=\"pt-2\">{{\"rating\" | translate}}*</label>\n </div>\n <div class=\"col-8\">\n <div class=\"cont-star mt-1 mb-3\">\n @for(star of limit; track $index){\n <input type=\"radio\" class=\"d-none\" [id]=\"'star-' + (limit.length - $index)\" [value]=\"limit.length - $index\"\n formControlName=\"rating\">\n <label class=\"star-label\" [for]=\"'star-' + (limit.length - $index)\">\n <i class=\"bi bi-star-fill\"></i>\n </label>\n }\n </div>\n </div>\n </div>\n\n <!-- Resumen -->\n <div class=\"row\">\n <div class=\"col-4\">\n <label for=\"review-summary\" class=\"pt-2\">{{\"summary\" | translate }}*</label>\n </div>\n <div class=\"col-8\">\n <textarea id=\"review-summary\" class=\"w-100\" placeholder=\"\u00BFC\u00F3mo fue tu experiencia?\" formControlName=\"title\"></textarea>\n </div>\n </div>\n\n <!-- Detalle -->\n <div class=\"row\">\n <div class=\"col-4\">\n <label for=\"review-detail\" class=\"pt-2\">{{\"detail\" | translate }}*</label>\n </div>\n <div class=\"col-8\">\n <textarea id=\"review-detail\" class=\"w-100\" placeholder=\"Contanos por qu\u00E9\" formControlName=\"comment\"></textarea>\n <small class=\"text-uppercase\">(*) {{\"mandatory-fields\" | translate }}</small>\n </div>\n </div>\n\n <!-- Bot\u00F3n de env\u00EDo -->\n <div class=\"row\">\n <div class=\"col-4\"></div>\n <div class=\"col-8\">\n <button type=\"submit\" class=\"btn btn-dark py-2 px-4 rounded-0 mt-4\"\n [disabled]=\"reviews_form.invalid\">{{\"submit-review\" | translate }}</button>\n </div>\n </div> \n</form>", styles: [".cont-star{direction:rtl;unicode-bidi:bidi-override;display:flex;justify-content:end}.cont-star label{display:flex}.cont-star label i{color:#ccc!important;cursor:pointer;font-size:26px;line-height:30px}.cont-star label i:hover,.cont-star label:hover~label i{color:#ffc107!important}input[type=radio]:checked~label i{color:#ffc107!important}input[type=radio]:checked~label i:before,label:hover i:before{content:\"\\f586\"}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { 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: "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"] }] });
|
|
12281
11468
|
}
|
|
12282
11469
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ReviewsFormEcComponent, decorators: [{
|
|
12283
11470
|
type: Component,
|
|
12284
11471
|
args: [{ selector: 'app-reviews-form-ec', standalone: true, imports: [TranslateModule, ReactiveFormsModule], template: "<form class=\"formResenia\" [formGroup]=\"reviews_form\" (submit)=\"toastReviewsForm($event)\">\n <div class=\"row\">\n <div class=\"col-4\">\n <label class=\"pt-2\">{{\"product\" | translate }}*</label>\n </div>\n <div class=\"col-8\">\n <p class=\"mt-1 mb-3\">{{ product.name }}</p>\n </div>\n </div>\n\n <!-- Calificaci\u00F3n -->\n <div class=\"row\">\n <div class=\"col-4\">\n <label class=\"pt-2\">{{\"rating\" | translate}}*</label>\n </div>\n <div class=\"col-8\">\n <div class=\"cont-star mt-1 mb-3\">\n @for(star of limit; track $index){\n <input type=\"radio\" class=\"d-none\" [id]=\"'star-' + (limit.length - $index)\" [value]=\"limit.length - $index\"\n formControlName=\"rating\">\n <label class=\"star-label\" [for]=\"'star-' + (limit.length - $index)\">\n <i class=\"bi bi-star-fill\"></i>\n </label>\n }\n </div>\n </div>\n </div>\n\n <!-- Resumen -->\n <div class=\"row\">\n <div class=\"col-4\">\n <label for=\"review-summary\" class=\"pt-2\">{{\"summary\" | translate }}*</label>\n </div>\n <div class=\"col-8\">\n <textarea id=\"review-summary\" class=\"w-100\" placeholder=\"\u00BFC\u00F3mo fue tu experiencia?\" formControlName=\"title\"></textarea>\n </div>\n </div>\n\n <!-- Detalle -->\n <div class=\"row\">\n <div class=\"col-4\">\n <label for=\"review-detail\" class=\"pt-2\">{{\"detail\" | translate }}*</label>\n </div>\n <div class=\"col-8\">\n <textarea id=\"review-detail\" class=\"w-100\" placeholder=\"Contanos por qu\u00E9\" formControlName=\"comment\"></textarea>\n <small class=\"text-uppercase\">(*) {{\"mandatory-fields\" | translate }}</small>\n </div>\n </div>\n\n <!-- Bot\u00F3n de env\u00EDo -->\n <div class=\"row\">\n <div class=\"col-4\"></div>\n <div class=\"col-8\">\n <button type=\"submit\" class=\"btn btn-dark py-2 px-4 rounded-0 mt-4\"\n [disabled]=\"reviews_form.invalid\">{{\"submit-review\" | translate }}</button>\n </div>\n </div> \n</form>", styles: [".cont-star{direction:rtl;unicode-bidi:bidi-override;display:flex;justify-content:end}.cont-star label{display:flex}.cont-star label i{color:#ccc!important;cursor:pointer;font-size:26px;line-height:30px}.cont-star label i:hover,.cont-star label:hover~label i{color:#ffc107!important}input[type=radio]:checked~label i{color:#ffc107!important}input[type=radio]:checked~label i:before,label:hover i:before{content:\"\\f586\"}\n"] }]
|
|
12285
|
-
}], ctorParameters: () => [{ type: ToastService }, { type: i2.Router }, { type: CoreConstantsService }, { type: i1$
|
|
11472
|
+
}], ctorParameters: () => [{ type: ToastService }, { type: i2.Router }, { type: CoreConstantsService }, { type: i1$3.FormBuilder }, { type: ProductsService }, { type: AuthService }, { type: ReviewsService }], propDecorators: { product: [{
|
|
12286
11473
|
type: Input
|
|
12287
11474
|
}], withAuthenticated: [{
|
|
12288
11475
|
type: Input
|
|
@@ -12471,13 +11658,11 @@ class StoresEcComponent extends ComponentHelper {
|
|
|
12471
11658
|
});
|
|
12472
11659
|
const center = bounds.getCenter();
|
|
12473
11660
|
const style = [{ "elementType": "geometry", "stylers": [{ "color": "#212121" }] }, { "elementType": "labels.icon", "stylers": [{ "visibility": "off" }] }, { "elementType": "labels.text.fill", "stylers": [{ "color": "#757575" }] }, { "elementType": "labels.text.stroke", "stylers": [{ "color": "#212121" }] }, { "featureType": "administrative", "elementType": "geometry", "stylers": [{ "color": "#757575" }] }, { "featureType": "administrative.country", "elementType": "labels.text.fill", "stylers": [{ "color": "#9e9e9e" }] }, { "featureType": "administrative.locality", "elementType": "labels.text.fill", "stylers": [{ "color": "#bdbdbd" }] }, { "featureType": "poi", "elementType": "labels.text.fill", "stylers": [{ "color": "#757575" }] }, { "featureType": "poi.business", "stylers": [{ "visibility": "off" }] }, { "featureType": "poi.park", "elementType": "geometry", "stylers": [{ "color": "#181818" }] }, { "featureType": "poi.park", "elementType": "labels.text.fill", "stylers": [{ "color": "#616161" }] }, { "featureType": "poi.park", "elementType": "labels.text.stroke", "stylers": [{ "color": "#1b1b1b" }] }, { "featureType": "road", "elementType": "geometry.fill", "stylers": [{ "color": "#2c2c2c" }] }, { "featureType": "road", "elementType": "labels.icon", "stylers": [{ "visibility": "off" }] }, { "featureType": "road", "elementType": "labels.text.fill", "stylers": [{ "color": "#8a8a8a" }] }, { "featureType": "road.arterial", "elementType": "geometry", "stylers": [{ "color": "#373737" }] }, { "featureType": "road.arterial", "elementType": "labels", "stylers": [{ "visibility": "off" }] }, { "featureType": "road.highway", "elementType": "geometry", "stylers": [{ "color": "#3c3c3c" }] }, { "featureType": "road.highway", "elementType": "labels", "stylers": [{ "visibility": "off" }] }, { "featureType": "road.highway.controlled_access", "elementType": "geometry", "stylers": [{ "color": "#4e4e4e" }] }, { "featureType": "road.local", "stylers": [{ "visibility": "off" }] }, { "featureType": "road.local", "elementType": "labels.text.fill", "stylers": [{ "color": "#616161" }] }, { "featureType": "transit", "stylers": [{ "visibility": "off" }] }, { "featureType": "transit", "elementType": "labels.text.fill", "stylers": [{ "color": "#757575" }] }, { "featureType": "water", "elementType": "geometry", "stylers": [{ "color": "#000000" }] }, { "featureType": "water", "elementType": "labels.text.fill", "stylers": [{ "color": "#3d3d3d" }] }];
|
|
12474
|
-
|
|
12475
|
-
|
|
12476
|
-
|
|
12477
|
-
|
|
12478
|
-
|
|
12479
|
-
});
|
|
12480
|
-
}
|
|
11661
|
+
this.map = new google.maps.Map(document.getElementById('map'), {
|
|
11662
|
+
zoom: 12,
|
|
11663
|
+
center: center, // Centrar el mapa en el centro calculado
|
|
11664
|
+
styles: style // Aplica los estilos personalizados
|
|
11665
|
+
});
|
|
12481
11666
|
this.locations.forEach(location => {
|
|
12482
11667
|
const marker = new google.maps.Marker({
|
|
12483
11668
|
position: { lat: location.lat, lng: location.lng },
|
|
@@ -12491,12 +11676,8 @@ class StoresEcComponent extends ComponentHelper {
|
|
|
12491
11676
|
marker.set('id', location.id); // Associate marker with its ID
|
|
12492
11677
|
this.markers.push(marker);
|
|
12493
11678
|
marker.addListener('click', () => {
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
if (typeof document !== 'undefined') {
|
|
12497
|
-
elemento = document.getElementById(location.id);
|
|
12498
|
-
contenedor = document.getElementById('home');
|
|
12499
|
-
}
|
|
11679
|
+
const elemento = document.getElementById(location.id);
|
|
11680
|
+
const contenedor = document.getElementById('home');
|
|
12500
11681
|
if (elemento && contenedor) {
|
|
12501
11682
|
contenedor.scrollTo({
|
|
12502
11683
|
top: elemento.offsetTop - contenedor.offsetTop + contenedor.scrollTop,
|
|
@@ -12524,10 +11705,7 @@ class StoresEcComponent extends ComponentHelper {
|
|
|
12524
11705
|
showStoreOnMap(storeCode) {
|
|
12525
11706
|
this.stopBounce();
|
|
12526
11707
|
const marker = this.markers.find(m => m.get('id') === storeCode);
|
|
12527
|
-
|
|
12528
|
-
if (typeof document !== 'undefined') {
|
|
12529
|
-
elemento = document.getElementById(storeCode);
|
|
12530
|
-
}
|
|
11708
|
+
const elemento = document.getElementById(storeCode);
|
|
12531
11709
|
if (this.ultimoElementoSeleccionado !== null) {
|
|
12532
11710
|
// Quitar la clase del último elemento seleccionado
|
|
12533
11711
|
this.ultimoElementoSeleccionado.classList.remove('selected');
|
|
@@ -12546,18 +11724,16 @@ class StoresEcComponent extends ComponentHelper {
|
|
|
12546
11724
|
marker.setAnimation(null);
|
|
12547
11725
|
});
|
|
12548
11726
|
}
|
|
12549
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StoresEcComponent, deps: [{ token: StoresService }, { token: CoreConstantsService }, { token: i1$
|
|
11727
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StoresEcComponent, deps: [{ token: StoresService }, { token: CoreConstantsService }, { token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
12550
11728
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: StoresEcComponent, isStandalone: true, selector: "app-store-ec", usesInheritance: true, ngImport: i0, template: "<!-- <div class=\"row w-100 mx-auto my-4 px-3 bb-s bt-md-s py-1\">\n <strong>{{ 'stores' | translate }}</strong>\n</div>\n@if(stores){\n<div class=\"row\">\n <div class=\"col-12 col-md-3 order-1 order-md-1\">\n <div class=\"row\">\n <div class=\"form-group w-100\">\n <select (change)=\"selectChange($event.target.value)\" class=\"rounded-0 form-control form-control-sm\"\n id=\"exampleFormControlSelect1\">\n <option selected [value]=\"''\">Seleccione provincia</option>\n <option [value]=\"item.code\" *ngFor=\"let item of getProvices(stores)\"> {{item.name}}\n </option>\n </select>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-md-3 order-3 order-md-2\">\n <div class=\"container-fluid scrolleable\" *ngIf=\"filterStores && filterStores.length\">\n <div class=\"row mb-1\" *ngFor=\"let store of filterStores; let i = index\">\n <div class=\"col-12\">\n <h6 class=\"\"><strong>{{ store.name }}</strong></h6>\n <label>{{ store.address }}</label>\n <label>{{ store.phone }}</label>\n <div [innerHtml]=\"store.note\"></div>\n <div class=\"text-right\">\n\n <a *ngIf=\"store.urlMap\" (click)=\"updateMap (store.urlMap)\" class=\"custom-a\">Ver mapa</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-md-6 order-2 order-md-3 my-4 mt-md-0\">\n\n <iframe id=\"map-iframe\" [src]=\"urlmap\" frameborder=\"0\"></iframe>\n </div>\n</div>\n}@else {\n<div class=\"d-flex flex-row justify-content-center my-5 align-items-center alto-total\">\n <h5 class=\"text-center\">{{ 'no-stores' | translate }}</h5>\n</div>\n}\n\n\n\n<ng-template #loading>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 align-items-center\">\n <div class=\"d-flex flex-column justify-content-center align-items-center my-5\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </div>\n </div>\n</ng-template> -->", styles: [".scrolleable{height:70vh;overflow:auto}@media screen and (max-width: 768px){.scrolleable{height:auto}}.background-white{background-color:#fff}.alto-total{height:60vh}.custom-a{color:#000}#map-iframe{width:100%;border:0;height:100%}@media screen and (max-width: 425px){#map-iframe{height:400px}}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }] });
|
|
12551
11729
|
}
|
|
12552
11730
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: StoresEcComponent, decorators: [{
|
|
12553
11731
|
type: Component,
|
|
12554
11732
|
args: [{ selector: 'app-store-ec', standalone: true, imports: [TranslateModule], template: "<!-- <div class=\"row w-100 mx-auto my-4 px-3 bb-s bt-md-s py-1\">\n <strong>{{ 'stores' | translate }}</strong>\n</div>\n@if(stores){\n<div class=\"row\">\n <div class=\"col-12 col-md-3 order-1 order-md-1\">\n <div class=\"row\">\n <div class=\"form-group w-100\">\n <select (change)=\"selectChange($event.target.value)\" class=\"rounded-0 form-control form-control-sm\"\n id=\"exampleFormControlSelect1\">\n <option selected [value]=\"''\">Seleccione provincia</option>\n <option [value]=\"item.code\" *ngFor=\"let item of getProvices(stores)\"> {{item.name}}\n </option>\n </select>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-md-3 order-3 order-md-2\">\n <div class=\"container-fluid scrolleable\" *ngIf=\"filterStores && filterStores.length\">\n <div class=\"row mb-1\" *ngFor=\"let store of filterStores; let i = index\">\n <div class=\"col-12\">\n <h6 class=\"\"><strong>{{ store.name }}</strong></h6>\n <label>{{ store.address }}</label>\n <label>{{ store.phone }}</label>\n <div [innerHtml]=\"store.note\"></div>\n <div class=\"text-right\">\n\n <a *ngIf=\"store.urlMap\" (click)=\"updateMap (store.urlMap)\" class=\"custom-a\">Ver mapa</a>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-12 col-md-6 order-2 order-md-3 my-4 mt-md-0\">\n\n <iframe id=\"map-iframe\" [src]=\"urlmap\" frameborder=\"0\"></iframe>\n </div>\n</div>\n}@else {\n<div class=\"d-flex flex-row justify-content-center my-5 align-items-center alto-total\">\n <h5 class=\"text-center\">{{ 'no-stores' | translate }}</h5>\n</div>\n}\n\n\n\n<ng-template #loading>\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 align-items-center\">\n <div class=\"d-flex flex-column justify-content-center align-items-center my-5\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n </div>\n </div>\n</ng-template> -->", styles: [".scrolleable{height:70vh;overflow:auto}@media screen and (max-width: 768px){.scrolleable{height:auto}}.background-white{background-color:#fff}.alto-total{height:60vh}.custom-a{color:#000}#map-iframe{width:100%;border:0;height:100%}@media screen and (max-width: 425px){#map-iframe{height:400px}}\n"] }]
|
|
12555
|
-
}], ctorParameters: () => [{ type: StoresService }, { type: CoreConstantsService }, { type: i1$
|
|
11733
|
+
}], ctorParameters: () => [{ type: StoresService }, { type: CoreConstantsService }, { type: i1$4.DomSanitizer }] });
|
|
12556
11734
|
|
|
12557
11735
|
class PriceRangeFilterComponent {
|
|
12558
11736
|
_filtersService = inject(FiltersService);
|
|
12559
|
-
router = inject(Router);
|
|
12560
|
-
route = inject(ActivatedRoute);
|
|
12561
11737
|
priceGap = 1;
|
|
12562
11738
|
roundStep = 5;
|
|
12563
11739
|
filter;
|
|
@@ -12594,15 +11770,7 @@ class PriceRangeFilterComponent {
|
|
|
12594
11770
|
return;
|
|
12595
11771
|
const min = filter.currentMinPrice ?? filter.minPrice;
|
|
12596
11772
|
const max = filter.currentMaxPrice ?? filter.maxPrice;
|
|
12597
|
-
this.
|
|
12598
|
-
relativeTo: this.route,
|
|
12599
|
-
queryParams: {
|
|
12600
|
-
price_min: min !== filter.minPrice ? min : null,
|
|
12601
|
-
price_max: max !== filter.maxPrice ? max : null,
|
|
12602
|
-
page: null,
|
|
12603
|
-
},
|
|
12604
|
-
queryParamsHandling: 'merge'
|
|
12605
|
-
});
|
|
11773
|
+
this._filtersService.updatePriceRangeFilter(min, max);
|
|
12606
11774
|
}
|
|
12607
11775
|
getMinValue(filter) {
|
|
12608
11776
|
return (filter instanceof PriceRangeFilter && filter.currentMinPrice != null)
|
|
@@ -12689,7 +11857,7 @@ class PriceRangeFilterComponent {
|
|
|
12689
11857
|
return value;
|
|
12690
11858
|
}
|
|
12691
11859
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PriceRangeFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12692
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: PriceRangeFilterComponent, isStandalone: true, selector: "lib-price-range-filter", inputs: { filter: "filter" }, outputs: { rangeChanged: "rangeChanged" }, ngImport: i0, template: "<div class=\"slider\">\n <div class=\"slider\">\n <div class=\"progress\" [ngStyle]=\"getSliderStyle(filter)\">\n </div>\n </div>\n</div>\n<div class=\"range-input d-flex gap-2\">\n <input #rangeMin type=\"range\" class=\"range-min\" [min]=\"filter.minPrice\" [max]=\"filter.maxPrice\"\n [value]=\"getMinValue(filter)\" (input)=\"onRangeChange($event, 'min', filter)\"\n (change)=\"updatePriceRange(filter); scrollUp()\">\n <input #rangeMax type=\"range\" class=\"range-max\" [min]=\"filter.minPrice\" [max]=\"filter.maxPrice\"\n [value]=\"getMaxValue(filter)\" (input)=\"onRangeChange($event, 'max', filter)\"\n (change)=\"updatePriceRange(filter); scrollUp()\">\n</div>\n<!-- precios M\u00EDnimo / M\u00E1ximo -->\n<div class=\"price-container mt-2\">\n <div class=\"price-label-wrapper\">\n <span class=\"price-label\">M\u00EDnimo:</span>\n <span class=\"price-value\">\n {{ (getFormattedMinPrice(filter) | ecCurrencySymbol) || '0' }}\n </span>\n </div>\n <div class=\"price-label-wrapper\">\n <span class=\"price-label\">M\u00E1ximo:</span>\n <span class=\"price-value price-value-right\">\n {{ getFormattedMaxPrice(filter) | ecCurrencySymbol }}\n </span>\n </div>\n</div>", styles: [":root{--slider-bg: #ddd;--slider-progress-bg: #0FA3AF;--thumb-bg: #0FA3AF;--thumb-border: #fff;--text-color: #131716;--label-color: #0FA3AF;--shadow-color: rgba(15, 163, 175, .4)}.slider{height:6px;border-radius:5px;background:var(--slider-bg);position:relative;overflow:hidden}.slider .progress{height:6px;position:absolute;left:0;right:0;border-radius:5px;background:var(--slider-progress-bg)}.range-input{position:relative;margin-bottom:14px}.range-input input[type=range]{position:absolute;top:-5px;width:100%;height:5px;background:none;pointer-events:none;-webkit-appearance:none}.range-input input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;pointer-events:auto;height:20px;width:20px;border-radius:50%;background:var(--thumb-bg);border:3px solid var(--thumb-border);cursor:pointer;box-shadow:0 4px 8px #0003}.range-input input[type=range]::-moz-range-thumb{-moz-appearance:none;pointer-events:auto;height:20px;width:20px;border-radius:50%;background:var(--thumb-bg);border:3px solid var(--thumb-border);cursor:pointer;box-shadow:0 4px 8px #0003}.range-input input[type=range]:focus::-webkit-slider-thumb,.range-input input[type=range]:focus::-moz-range-thumb{box-shadow:0 0 0 4px var(--shadow-color);outline:none}.price-container{display:flex;flex-wrap:wrap;gap:1rem}.price-label-wrapper{display:flex;flex-direction:column;flex:0 1 auto;min-width:0}.price-label{font-weight:600;color:var(--label-color);margin-bottom:.25rem}.price-value{white-space:nowrap;font-weight:700;color:var(--text-color);overflow:hidden;text-overflow:ellipsis;font-size:14px}.price-value-right{text-align:right}\n"], dependencies: [{ kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1
|
|
11860
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: PriceRangeFilterComponent, isStandalone: true, selector: "lib-price-range-filter", inputs: { filter: "filter" }, outputs: { rangeChanged: "rangeChanged" }, ngImport: i0, template: "<div class=\"slider\">\n <div class=\"slider\">\n <div class=\"progress\" [ngStyle]=\"getSliderStyle(filter)\">\n </div>\n </div>\n</div>\n<div class=\"range-input d-flex gap-2\">\n <input #rangeMin type=\"range\" class=\"range-min\" [min]=\"filter.minPrice\" [max]=\"filter.maxPrice\"\n [value]=\"getMinValue(filter)\" (input)=\"onRangeChange($event, 'min', filter)\"\n (change)=\"updatePriceRange(filter); scrollUp()\">\n <input #rangeMax type=\"range\" class=\"range-max\" [min]=\"filter.minPrice\" [max]=\"filter.maxPrice\"\n [value]=\"getMaxValue(filter)\" (input)=\"onRangeChange($event, 'max', filter)\"\n (change)=\"updatePriceRange(filter); scrollUp()\">\n</div>\n<!-- precios M\u00EDnimo / M\u00E1ximo -->\n<div class=\"price-container mt-2\">\n <div class=\"price-label-wrapper\">\n <span class=\"price-label\">M\u00EDnimo:</span>\n <span class=\"price-value\">\n {{ (getFormattedMinPrice(filter) | ecCurrencySymbol) || '0' }}\n </span>\n </div>\n <div class=\"price-label-wrapper\">\n <span class=\"price-label\">M\u00E1ximo:</span>\n <span class=\"price-value price-value-right\">\n {{ getFormattedMaxPrice(filter) | ecCurrencySymbol }}\n </span>\n </div>\n</div>", styles: [":root{--slider-bg: #ddd;--slider-progress-bg: #0FA3AF;--thumb-bg: #0FA3AF;--thumb-border: #fff;--text-color: #131716;--label-color: #0FA3AF;--shadow-color: rgba(15, 163, 175, .4)}.slider{height:6px;border-radius:5px;background:var(--slider-bg);position:relative;overflow:hidden}.slider .progress{height:6px;position:absolute;left:0;right:0;border-radius:5px;background:var(--slider-progress-bg)}.range-input{position:relative;margin-bottom:14px}.range-input input[type=range]{position:absolute;top:-5px;width:100%;height:5px;background:none;pointer-events:none;-webkit-appearance:none}.range-input input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;pointer-events:auto;height:20px;width:20px;border-radius:50%;background:var(--thumb-bg);border:3px solid var(--thumb-border);cursor:pointer;box-shadow:0 4px 8px #0003}.range-input input[type=range]::-moz-range-thumb{-moz-appearance:none;pointer-events:auto;height:20px;width:20px;border-radius:50%;background:var(--thumb-bg);border:3px solid var(--thumb-border);cursor:pointer;box-shadow:0 4px 8px #0003}.range-input input[type=range]:focus::-webkit-slider-thumb,.range-input input[type=range]:focus::-moz-range-thumb{box-shadow:0 0 0 4px var(--shadow-color);outline:none}.price-container{display:flex;flex-wrap:wrap;gap:1rem}.price-label-wrapper{display:flex;flex-direction:column;flex:0 1 auto;min-width:0}.price-label{font-weight:600;color:var(--label-color);margin-bottom:.25rem}.price-value{white-space:nowrap;font-weight:700;color:var(--text-color);overflow:hidden;text-overflow:ellipsis;font-size:14px}.price-value-right{text-align:right}\n"], dependencies: [{ kind: "pipe", type: EcCurrencySymbolPipe, name: "ecCurrencySymbol" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12693
11861
|
}
|
|
12694
11862
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: PriceRangeFilterComponent, decorators: [{
|
|
12695
11863
|
type: Component,
|
|
@@ -12748,44 +11916,6 @@ const authInterceptor = (req, next) => {
|
|
|
12748
11916
|
return next(req);
|
|
12749
11917
|
};
|
|
12750
11918
|
|
|
12751
|
-
/**
|
|
12752
|
-
* Interceptor que garantiza que las peticiones HTTP no se hagan hasta que
|
|
12753
|
-
* el runtime config esté completamente cargado
|
|
12754
|
-
* Evita que se hagan peticiones con URLs incorrectas
|
|
12755
|
-
*/
|
|
12756
|
-
const runtimeConfigInterceptor = (req, next) => {
|
|
12757
|
-
const runtimeConfigService = inject(RuntimeConfigService);
|
|
12758
|
-
// Si la petición es para obtener el runtime config, la dejamos pasar inmediatamente
|
|
12759
|
-
if (req.url.includes('/runtime-config.json')) {
|
|
12760
|
-
return next(req);
|
|
12761
|
-
}
|
|
12762
|
-
// Si la petición es para assets estáticos, la dejamos pasar
|
|
12763
|
-
if (req.url.includes('/assets/') || req.url.includes('.json') || req.url.includes('.css') || req.url.includes('.js')) {
|
|
12764
|
-
return next(req);
|
|
12765
|
-
}
|
|
12766
|
-
// Para las demás peticiones, esperamos a que el config esté listo
|
|
12767
|
-
return runtimeConfigService.config$.pipe(filter$1(config => config !== null), // Esperamos hasta que haya config
|
|
12768
|
-
take$1(1), // Solo tomamos el primer valor válido
|
|
12769
|
-
switchMap$1(config => {
|
|
12770
|
-
// Si la URL ya es completa (empieza con http), la dejamos como está
|
|
12771
|
-
if (req.url.startsWith('http')) {
|
|
12772
|
-
return next(req);
|
|
12773
|
-
}
|
|
12774
|
-
// Si es una URL relativa que debería ir al API, la completamos
|
|
12775
|
-
if (req.url.startsWith('/api/') || req.url.startsWith('api/')) {
|
|
12776
|
-
const apiUrl = config.apiUrl;
|
|
12777
|
-
const cleanUrl = req.url.startsWith('/') ? req.url.substring(1) : req.url;
|
|
12778
|
-
const fullUrl = `${apiUrl}${cleanUrl}`;
|
|
12779
|
-
const modifiedReq = req.clone({
|
|
12780
|
-
url: fullUrl
|
|
12781
|
-
});
|
|
12782
|
-
return next(modifiedReq);
|
|
12783
|
-
}
|
|
12784
|
-
// Para otras URLs, las dejamos pasar sin modificar
|
|
12785
|
-
return next(req);
|
|
12786
|
-
}));
|
|
12787
|
-
};
|
|
12788
|
-
|
|
12789
11919
|
class ProductStockDirective {
|
|
12790
11920
|
templateRef;
|
|
12791
11921
|
viewContainer;
|
|
@@ -12987,5 +12117,5 @@ const directives = [
|
|
|
12987
12117
|
* Generated bundle index. Do not edit.
|
|
12988
12118
|
*/
|
|
12989
12119
|
|
|
12990
|
-
export { AccountEcComponent, AddressingService, AnalyticsService, AuthEcComponent, AuthService, AuthStorageService,
|
|
12120
|
+
export { AccountEcComponent, AddressingService, AnalyticsService, AuthEcComponent, AuthService, AuthStorageService, BlockBannerBoxEcComponent, BlockBannerFullEcComponent, BlockFormContactEcComponent, BlockHtmlEcComponent, BlockNewsletterEcComponent, BlockProductsEcComponent, BlocksEcComponent, BlocksRepositoryService, BlocksService, BreadcrumbEcComponent, CartEcComponent, CartItemEcComponent, CartService, ChannelService, CheckoutEcComponent, CheckoutService, CollectionEcComponent, ConfirmAccountEcComponent, ContactEcComponent, CoreConstantsService, CouponEcComponent, CurrencyService, DopplerService, ENVIRONMENT_TOKEN, EcCurrencySymbolPipe, EcSafeHtmlPipe, FacebookPixelService, FaqsEcComponent, FiltersEcComponent, FiltersService, FiltersSortEcComponent, FooterEcComponent, ForgotPasswordEcComponent, FormService, GTMService, GoogleAnalyticsService, HeaderEcComponent, HomeEcComponent, LoadingFullEcComponent, LoadingInlineEcComponent, LoadingSectionEcComponent, LocalStorageService, LoginFormEcComponent, MagnizoomEcComponent, MetricoolPixelService, NgxLocalStorageService, OptionsService, OrderEcComponent, OrderUtilityService, OrdersListEcComponent, OrdersService, PaginationService, ParametersService, ParamsContext, PasswordResetEcComponent, PaymentService, PriceEcComponent, PriceRangeFilterComponent, ProductDetailEcComponent, ProductDetailService, ProductEcComponent, ProductOffDirective, ProductStockDirective, ProductsService, ReCaptchaEcComponent, ReCaptchaService, RedsysCatchEcComponent, RegisterFormEcComponent, RegisterWholesalerFormEcComponent, RelatedProductsEcComponent, ReviewsEcComponent, ReviewsFormEcComponent, SectionContainerEcComponent, ShareEcComponent, ShipmentService, SidebarEcComponent, StoresEcComponent, SuccessEcComponent, TestService, ToastService, VariantsEcComponent, authGuard, authInterceptor, directives, provideEnvironment };
|
|
12991
12121
|
//# sourceMappingURL=ng-easycommerce-v18.mjs.map
|