ng-easycommerce-v18 0.3.11-beta.2 → 0.3.12-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 +4 -0
- package/esm2022/lib/classes/filters/filter.mjs +2 -27
- package/esm2022/lib/ec-components/abstractions-components/menu-ec.component.mjs +9 -1
- package/esm2022/lib/ec-components/blocks-ec/block-products-ec/block-products-ec.component.mjs +3 -5
- package/esm2022/lib/ec-components/filters-ec/filters-ec.component.mjs +9 -1
- package/esm2022/lib/ec-components/header-ec/header-ec.component.mjs +23 -34
- package/esm2022/lib/ec-components/related-products-ec/related-products-ec.component.mjs +4 -6
- package/esm2022/lib/ec-components/widgets-ec/index.mjs +2 -1
- package/esm2022/lib/ec-components/widgets-ec/magnizoom-ec/magnizoom-ec.component.mjs +2 -4
- package/esm2022/lib/ec-components/widgets-ec/redsys-catch-ec/redsys-catch-ec.component.mjs +138 -0
- package/esm2022/lib/ec-services/analytics/facebook-pixel.service.mjs +2 -4
- package/esm2022/lib/ec-services/analytics/google-analytics.service.mjs +2 -4
- package/esm2022/lib/ec-services/options.service.mjs +3 -27
- package/fesm2022/ng-easycommerce-v18.mjs +198 -123
- package/fesm2022/ng-easycommerce-v18.mjs.map +1 -1
- package/lib/ec-components/abstractions-components/menu-ec.component.d.ts +6 -0
- package/lib/ec-components/filters-ec/filters-ec.component.d.ts +6 -0
- package/lib/ec-components/header-ec/header-ec.component.d.ts +0 -1
- package/lib/ec-components/widgets-ec/index.d.ts +1 -0
- package/lib/ec-components/widgets-ec/redsys-catch-ec/redsys-catch-ec.component.d.ts +26 -0
- package/lib/ec-services/options.service.d.ts +0 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
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, computed, Renderer2, ChangeDetectionStrategy, Directive
|
|
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
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, isPlatformBrowser, AsyncPipe, CommonModule, TitleCasePipe, JsonPipe, UpperCasePipe, Location } from '@angular/common';
|
|
5
5
|
import { take, BehaviorSubject, shareReplay, map, catchError, of, filter, ReplaySubject, firstValueFrom, concatMap, throwError, switchMap, combineLatest } from 'rxjs';
|
|
@@ -533,10 +533,6 @@ class OptionsService {
|
|
|
533
533
|
* Maneja las peticiones a la API
|
|
534
534
|
*/
|
|
535
535
|
connection = inject(ConnectionService);
|
|
536
|
-
/**
|
|
537
|
-
* Platform ID para verificar si estamos en el navegador
|
|
538
|
-
*/
|
|
539
|
-
platformId = inject(PLATFORM_ID);
|
|
540
536
|
/**
|
|
541
537
|
* Constantes del core
|
|
542
538
|
*/
|
|
@@ -647,26 +643,7 @@ class OptionsService {
|
|
|
647
643
|
* @returns
|
|
648
644
|
*/
|
|
649
645
|
removeAccents(str) {
|
|
650
|
-
|
|
651
|
-
return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
652
|
-
}
|
|
653
|
-
// Fallback para SSR - remover acentos manualmente
|
|
654
|
-
return str.replace(/[àáâãäå]/g, 'a')
|
|
655
|
-
.replace(/[èéêë]/g, 'e')
|
|
656
|
-
.replace(/[ìíîï]/g, 'i')
|
|
657
|
-
.replace(/[òóôõö]/g, 'o')
|
|
658
|
-
.replace(/[ùúûü]/g, 'u')
|
|
659
|
-
.replace(/[ýÿ]/g, 'y')
|
|
660
|
-
.replace(/[ñ]/g, 'n')
|
|
661
|
-
.replace(/[ç]/g, 'c')
|
|
662
|
-
.replace(/[ÀÁÂÃÄÅ]/g, 'A')
|
|
663
|
-
.replace(/[ÈÉÊË]/g, 'E')
|
|
664
|
-
.replace(/[ÌÍÎÏ]/g, 'I')
|
|
665
|
-
.replace(/[ÒÓÔÕÖ]/g, 'O')
|
|
666
|
-
.replace(/[ÙÚÛÜ]/g, 'U')
|
|
667
|
-
.replace(/[ÝŸ]/g, 'Y')
|
|
668
|
-
.replace(/[Ñ]/g, 'N')
|
|
669
|
-
.replace(/[Ç]/g, 'C');
|
|
646
|
+
return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
670
647
|
}
|
|
671
648
|
/**
|
|
672
649
|
* Realiza un mapeo de los datos para darle un formato mas entendible a la
|
|
@@ -1049,9 +1026,7 @@ class FacebookPixelService {
|
|
|
1049
1026
|
this.renderer.appendChild(this.document?.body, new_analityc_script);
|
|
1050
1027
|
this.enabled = true;
|
|
1051
1028
|
}
|
|
1052
|
-
|
|
1053
|
-
setTimeout(() => this.callEvent('initialize'), 1000);
|
|
1054
|
-
}
|
|
1029
|
+
setTimeout(() => this.callEvent('initialize'), 1000);
|
|
1055
1030
|
}
|
|
1056
1031
|
/**
|
|
1057
1032
|
* Ejecuta el evento pasado por parametro.
|
|
@@ -1268,9 +1243,7 @@ class GoogleAnalyticsService {
|
|
|
1268
1243
|
this.renderer.appendChild(this.document?.head, declaration);
|
|
1269
1244
|
this.enabled = true;
|
|
1270
1245
|
}
|
|
1271
|
-
|
|
1272
|
-
setTimeout(() => this.startListeningPageViews(gtm_id), 1000);
|
|
1273
|
-
}
|
|
1246
|
+
setTimeout(() => this.startListeningPageViews(gtm_id), 1000);
|
|
1274
1247
|
}
|
|
1275
1248
|
/**
|
|
1276
1249
|
*
|
|
@@ -2671,31 +2644,6 @@ class User {
|
|
|
2671
2644
|
}
|
|
2672
2645
|
}
|
|
2673
2646
|
|
|
2674
|
-
/**
|
|
2675
|
-
* Función auxiliar para remover acentos de forma segura para SSR
|
|
2676
|
-
*/
|
|
2677
|
-
function safeRemoveAccents(str) {
|
|
2678
|
-
if (typeof window !== 'undefined' && typeof String.prototype.normalize === 'function') {
|
|
2679
|
-
return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
2680
|
-
}
|
|
2681
|
-
// Fallback para SSR - remover acentos manualmente
|
|
2682
|
-
return str.replace(/[àáâãäå]/g, 'a')
|
|
2683
|
-
.replace(/[èéêë]/g, 'e')
|
|
2684
|
-
.replace(/[ìíîï]/g, 'i')
|
|
2685
|
-
.replace(/[òóôõö]/g, 'o')
|
|
2686
|
-
.replace(/[ùúûü]/g, 'u')
|
|
2687
|
-
.replace(/[ýÿ]/g, 'y')
|
|
2688
|
-
.replace(/[ñ]/g, 'n')
|
|
2689
|
-
.replace(/[ç]/g, 'c')
|
|
2690
|
-
.replace(/[ÀÁÂÃÄÅ]/g, 'A')
|
|
2691
|
-
.replace(/[ÈÉÊË]/g, 'E')
|
|
2692
|
-
.replace(/[ÌÍÎÏ]/g, 'I')
|
|
2693
|
-
.replace(/[ÒÓÔÕÖ]/g, 'O')
|
|
2694
|
-
.replace(/[ÙÚÛÜ]/g, 'U')
|
|
2695
|
-
.replace(/[ÝŸ]/g, 'Y')
|
|
2696
|
-
.replace(/[Ñ]/g, 'N')
|
|
2697
|
-
.replace(/[Ç]/g, 'C');
|
|
2698
|
-
}
|
|
2699
2647
|
class Filter {
|
|
2700
2648
|
data = [];
|
|
2701
2649
|
multi = false;
|
|
@@ -2715,7 +2663,7 @@ class Filter {
|
|
|
2715
2663
|
throw new Error("Method not implemented.");
|
|
2716
2664
|
}
|
|
2717
2665
|
removeAccents = (str) => {
|
|
2718
|
-
return
|
|
2666
|
+
return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
2719
2667
|
};
|
|
2720
2668
|
setSelected(element, value) {
|
|
2721
2669
|
//console.log(element, value);
|
|
@@ -6052,6 +6000,14 @@ class MenuEcComponent {
|
|
|
6052
6000
|
});
|
|
6053
6001
|
}));
|
|
6054
6002
|
}
|
|
6003
|
+
/**
|
|
6004
|
+
* Verifica si una categoría tiene la propiedad isVisible y está marcada como visible
|
|
6005
|
+
* @param category - La categoría a verificar
|
|
6006
|
+
* @returns true si la categoría es visible, false en caso contrario
|
|
6007
|
+
*/
|
|
6008
|
+
hasVisibleProperty(category) {
|
|
6009
|
+
return category.isVisible === true;
|
|
6010
|
+
}
|
|
6055
6011
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MenuEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6056
6012
|
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 });
|
|
6057
6013
|
}
|
|
@@ -6211,7 +6167,6 @@ class HeaderEcComponent extends MenuEcComponent {
|
|
|
6211
6167
|
coreConstantsService = inject(CoreConstantsService);
|
|
6212
6168
|
router = inject(Router);
|
|
6213
6169
|
cdr = inject(ChangeDetectorRef); // Inyectamos ChangeDetectorRef para forzar la actualización
|
|
6214
|
-
platformId = inject(PLATFORM_ID);
|
|
6215
6170
|
ngOnInit() {
|
|
6216
6171
|
this.channel = this.coreConstantsService.getChannel();
|
|
6217
6172
|
this.onWindowScroll();
|
|
@@ -6234,21 +6189,17 @@ class HeaderEcComponent extends MenuEcComponent {
|
|
|
6234
6189
|
});
|
|
6235
6190
|
}
|
|
6236
6191
|
onWindowScroll() {
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
this.isScrolled = scrollTop > 80;
|
|
6240
|
-
}
|
|
6192
|
+
const scrollTop = window.scrollY;
|
|
6193
|
+
this.isScrolled = scrollTop > 80;
|
|
6241
6194
|
}
|
|
6242
6195
|
isHomeFunction() {
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
if (
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
headerElement.classList.remove('show-menu');
|
|
6251
|
-
}
|
|
6196
|
+
const headerElement = document.querySelector('header');
|
|
6197
|
+
if (headerElement) {
|
|
6198
|
+
if (this.router.url !== '/home') {
|
|
6199
|
+
headerElement.classList.add('show-menu');
|
|
6200
|
+
}
|
|
6201
|
+
else {
|
|
6202
|
+
headerElement.classList.remove('show-menu');
|
|
6252
6203
|
}
|
|
6253
6204
|
}
|
|
6254
6205
|
}
|
|
@@ -6272,30 +6223,26 @@ class HeaderEcComponent extends MenuEcComponent {
|
|
|
6272
6223
|
}
|
|
6273
6224
|
};
|
|
6274
6225
|
borrarInput(inputId) {
|
|
6275
|
-
if (
|
|
6276
|
-
|
|
6277
|
-
|
|
6226
|
+
if (inputId) {
|
|
6227
|
+
const input = document.getElementById(inputId);
|
|
6228
|
+
if (input) {
|
|
6229
|
+
input.value = '';
|
|
6230
|
+
}
|
|
6231
|
+
}
|
|
6232
|
+
else {
|
|
6233
|
+
const inputs = ['searchInput1'];
|
|
6234
|
+
inputs.forEach((id) => {
|
|
6235
|
+
const input = document.getElementById(id);
|
|
6278
6236
|
if (input) {
|
|
6279
6237
|
input.value = '';
|
|
6280
6238
|
}
|
|
6281
|
-
}
|
|
6282
|
-
else {
|
|
6283
|
-
const inputs = ['searchInput1'];
|
|
6284
|
-
inputs.forEach((id) => {
|
|
6285
|
-
const input = document.getElementById(id);
|
|
6286
|
-
if (input) {
|
|
6287
|
-
input.value = '';
|
|
6288
|
-
}
|
|
6289
|
-
});
|
|
6290
|
-
}
|
|
6239
|
+
});
|
|
6291
6240
|
}
|
|
6292
6241
|
this.searchValue = '';
|
|
6293
6242
|
this.coreConstantsService.searchValue = '';
|
|
6294
6243
|
this.getCollectionSearch();
|
|
6295
6244
|
}
|
|
6296
6245
|
setupMobileMenu() {
|
|
6297
|
-
if (!isPlatformBrowser(this.platformId))
|
|
6298
|
-
return;
|
|
6299
6246
|
// console.log('setupMobileMenu called');
|
|
6300
6247
|
const menuMobile = document.querySelector('.menuMobile');
|
|
6301
6248
|
if (!(menuMobile instanceof HTMLElement))
|
|
@@ -6331,8 +6278,6 @@ class HeaderEcComponent extends MenuEcComponent {
|
|
|
6331
6278
|
});
|
|
6332
6279
|
}
|
|
6333
6280
|
setupSearchInputs() {
|
|
6334
|
-
if (!isPlatformBrowser(this.platformId))
|
|
6335
|
-
return;
|
|
6336
6281
|
const inputs = ['searchInput1', 'searchInput2'];
|
|
6337
6282
|
inputs.forEach(id => {
|
|
6338
6283
|
const input = document.getElementById(id);
|
|
@@ -7079,7 +7024,7 @@ class BlockProductsEcComponent extends BlockEcComponent {
|
|
|
7079
7024
|
* Permite personalización de las imágenes de las flechas mediante @Input.
|
|
7080
7025
|
*/
|
|
7081
7026
|
setupSwiperNavigation() {
|
|
7082
|
-
if (this.meta?.styles?.carrousel !== false
|
|
7027
|
+
if (this.meta?.styles?.carrousel !== false) {
|
|
7083
7028
|
// Usar setTimeout para asegurar que el swiper esté inicializado
|
|
7084
7029
|
setTimeout(() => {
|
|
7085
7030
|
this.initializeSwiperWithCustomNavigation();
|
|
@@ -7091,8 +7036,6 @@ class BlockProductsEcComponent extends BlockEcComponent {
|
|
|
7091
7036
|
* Esta función puede ser movida al componente base para reutilización.
|
|
7092
7037
|
*/
|
|
7093
7038
|
initializeSwiperWithCustomNavigation() {
|
|
7094
|
-
if (!isPlatformBrowser(this.platformId))
|
|
7095
|
-
return;
|
|
7096
7039
|
const prevButton = document.getElementById(`${this.meta?.code}-prev`);
|
|
7097
7040
|
const nextButton = document.getElementById(`${this.meta?.code}-next`);
|
|
7098
7041
|
const swiperElement = document.getElementById(this.meta?.code);
|
|
@@ -7452,9 +7395,7 @@ class MagnizoomEcComponent {
|
|
|
7452
7395
|
this.image = this.document.createElement('img');
|
|
7453
7396
|
this.image.onload = () => {
|
|
7454
7397
|
this.lensSize = { width: this.image.width / 2, height: this.image.height / 2 };
|
|
7455
|
-
|
|
7456
|
-
setTimeout(() => this.render());
|
|
7457
|
-
}
|
|
7398
|
+
setTimeout(() => this.render());
|
|
7458
7399
|
};
|
|
7459
7400
|
this.image.src = src;
|
|
7460
7401
|
}
|
|
@@ -7584,6 +7525,157 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
7584
7525
|
args: ['mainCanvas', { static: true }]
|
|
7585
7526
|
}] } });
|
|
7586
7527
|
|
|
7528
|
+
class ComponentHelper {
|
|
7529
|
+
constructor() {
|
|
7530
|
+
this.ecOnConstruct();
|
|
7531
|
+
}
|
|
7532
|
+
ecOnInit = (params = {}) => {
|
|
7533
|
+
};
|
|
7534
|
+
ecOnConstruct = (params = {}) => {
|
|
7535
|
+
};
|
|
7536
|
+
hasParams = (params, searched) => {
|
|
7537
|
+
if (!params || !searched)
|
|
7538
|
+
return false;
|
|
7539
|
+
const q = searched.trim().toLowerCase();
|
|
7540
|
+
return params.some(p => {
|
|
7541
|
+
const code = p?.['code']?.toString().toLowerCase() ?? '';
|
|
7542
|
+
// Primero chequeo exacto, y si no, parcial
|
|
7543
|
+
return code === q || code.includes(q);
|
|
7544
|
+
});
|
|
7545
|
+
};
|
|
7546
|
+
navigateOnRouter(router, url) {
|
|
7547
|
+
router.navigateByUrl(`/${url}`);
|
|
7548
|
+
}
|
|
7549
|
+
}
|
|
7550
|
+
|
|
7551
|
+
class RedsysCatchEcComponent extends ComponentHelper {
|
|
7552
|
+
activedRoute;
|
|
7553
|
+
router;
|
|
7554
|
+
checkoutService;
|
|
7555
|
+
renderer;
|
|
7556
|
+
elementRef;
|
|
7557
|
+
document;
|
|
7558
|
+
message = '';
|
|
7559
|
+
subscription = null;
|
|
7560
|
+
constructor(activedRoute, router, checkoutService, renderer, elementRef, document) {
|
|
7561
|
+
super();
|
|
7562
|
+
this.activedRoute = activedRoute;
|
|
7563
|
+
this.router = router;
|
|
7564
|
+
this.checkoutService = checkoutService;
|
|
7565
|
+
this.renderer = renderer;
|
|
7566
|
+
this.elementRef = elementRef;
|
|
7567
|
+
this.document = document;
|
|
7568
|
+
this.hideHeaderFooter();
|
|
7569
|
+
this.ecOnConstruct();
|
|
7570
|
+
}
|
|
7571
|
+
ngOnInit() {
|
|
7572
|
+
this.subscription = combineLatest([
|
|
7573
|
+
this.activedRoute.params,
|
|
7574
|
+
this.activedRoute.queryParams
|
|
7575
|
+
]).subscribe(([queryRouter, queryParams]) => {
|
|
7576
|
+
let state;
|
|
7577
|
+
state = queryRouter['state'];
|
|
7578
|
+
if (state && state === 'statuspayment') {
|
|
7579
|
+
state = queryParams['status'];
|
|
7580
|
+
}
|
|
7581
|
+
console.log('PARAMETROS STATE -> ', state);
|
|
7582
|
+
this.handlePaymentState(state, queryParams);
|
|
7583
|
+
});
|
|
7584
|
+
this.ecOnInit();
|
|
7585
|
+
}
|
|
7586
|
+
ngOnDestroy() {
|
|
7587
|
+
if (this.subscription) {
|
|
7588
|
+
this.subscription.unsubscribe();
|
|
7589
|
+
}
|
|
7590
|
+
this.showHeaderFooter();
|
|
7591
|
+
// this.ecOnDestroy(); // Removido si no existe en ComponentHelper
|
|
7592
|
+
}
|
|
7593
|
+
hideHeaderFooter() {
|
|
7594
|
+
// Usar Renderer2 en lugar de jQuery para manipular el DOM
|
|
7595
|
+
const header = this.document.querySelector('header');
|
|
7596
|
+
const footer = this.document.querySelector('footer');
|
|
7597
|
+
if (header) {
|
|
7598
|
+
this.renderer.setStyle(header, 'display', 'none');
|
|
7599
|
+
}
|
|
7600
|
+
if (footer) {
|
|
7601
|
+
this.renderer.setStyle(footer, 'display', 'none');
|
|
7602
|
+
}
|
|
7603
|
+
}
|
|
7604
|
+
showHeaderFooter() {
|
|
7605
|
+
// Restaurar la visibilidad al destruir el componente
|
|
7606
|
+
const header = this.document.querySelector('header');
|
|
7607
|
+
const footer = this.document.querySelector('footer');
|
|
7608
|
+
if (header) {
|
|
7609
|
+
this.renderer.removeStyle(header, 'display');
|
|
7610
|
+
}
|
|
7611
|
+
if (footer) {
|
|
7612
|
+
this.renderer.removeStyle(footer, 'display');
|
|
7613
|
+
}
|
|
7614
|
+
}
|
|
7615
|
+
handlePaymentState(state, queryParams) {
|
|
7616
|
+
switch (state) {
|
|
7617
|
+
case '200':
|
|
7618
|
+
this.setStateInLocal('Su pago fue procesado con éxito.', 'success');
|
|
7619
|
+
this.storeTotalAmount(queryParams);
|
|
7620
|
+
break;
|
|
7621
|
+
case 'success':
|
|
7622
|
+
this.setStateInLocal('Su pago fue procesado con éxito.', state);
|
|
7623
|
+
this.storeTotalAmount(queryParams);
|
|
7624
|
+
break;
|
|
7625
|
+
case 'pending':
|
|
7626
|
+
this.setStateInLocal('Su pago fue procesado con éxito.', state);
|
|
7627
|
+
break;
|
|
7628
|
+
case 'failure':
|
|
7629
|
+
this.setStateInLocal('Se ha cancelado el proceso de pago.', state);
|
|
7630
|
+
this.storeTotalAmount(queryParams);
|
|
7631
|
+
break;
|
|
7632
|
+
case 'cancel':
|
|
7633
|
+
this.setStateInLocal('Se ha cancelado el proceso de pago.', state);
|
|
7634
|
+
break;
|
|
7635
|
+
case 'ok':
|
|
7636
|
+
this.setStateInSesion('Su pago fue procesado con éxito.', state);
|
|
7637
|
+
break;
|
|
7638
|
+
case 'challenge':
|
|
7639
|
+
this.setStateInSesion('Redirigiendo a autenticación del banco emisor.', state);
|
|
7640
|
+
break;
|
|
7641
|
+
case 'error':
|
|
7642
|
+
this.setStateInSesion('Algo no salio bien en la validación de sus datos.', state);
|
|
7643
|
+
break;
|
|
7644
|
+
case '0':
|
|
7645
|
+
this.setStateInLocal('Se ha cancelado el proceso de pago.', 'failure');
|
|
7646
|
+
break;
|
|
7647
|
+
default:
|
|
7648
|
+
break;
|
|
7649
|
+
}
|
|
7650
|
+
}
|
|
7651
|
+
storeTotalAmount(queryParams) {
|
|
7652
|
+
const totalAmount = queryParams['total_amount'];
|
|
7653
|
+
if (totalAmount) {
|
|
7654
|
+
localStorage.setItem('total_amount', totalAmount);
|
|
7655
|
+
}
|
|
7656
|
+
}
|
|
7657
|
+
setStateInLocal = (mensaje, state) => {
|
|
7658
|
+
this.message = mensaje;
|
|
7659
|
+
localStorage.setItem('state', state);
|
|
7660
|
+
sessionStorage.setItem('modalnews', 'false');
|
|
7661
|
+
};
|
|
7662
|
+
setStateInSesion = (mensaje, state) => {
|
|
7663
|
+
this.message = mensaje;
|
|
7664
|
+
sessionStorage.setItem('state', state);
|
|
7665
|
+
localStorage.setItem('state', state);
|
|
7666
|
+
sessionStorage.setItem('modalnews', 'false');
|
|
7667
|
+
};
|
|
7668
|
+
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 }], target: i0.ɵɵFactoryTarget.Component });
|
|
7669
|
+
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\">\r\n <div class=\"row\">\r\n <div class=\"col align-self-center\">\r\n <h4 class=\"titpage center-block text-center font-nexa font-lg my-3\">{{ message | uppercase }}</h4>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col align-self-center\">\r\n <h5 class=\"center-block text-center font-nexa my-3\">Redirigiendo en segundos...</h5>\r\n <br>\r\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </div>\r\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" }] });
|
|
7670
|
+
}
|
|
7671
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RedsysCatchEcComponent, decorators: [{
|
|
7672
|
+
type: Component,
|
|
7673
|
+
args: [{ selector: 'app-redsys-catch-ec', standalone: true, imports: [CommonModule, LoadingFullEcComponent], template: "<div id=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col align-self-center\">\r\n <h4 class=\"titpage center-block text-center font-nexa font-lg my-3\">{{ message | uppercase }}</h4>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col align-self-center\">\r\n <h5 class=\"center-block text-center font-nexa my-3\">Redirigiendo en segundos...</h5>\r\n <br>\r\n <div class=\"d-flex flex-column jusitfy-content-center align-items-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n </div>\r\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"] }]
|
|
7674
|
+
}], ctorParameters: () => [{ type: i2.ActivatedRoute }, { type: i2.Router }, { type: CheckoutService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: Document, decorators: [{
|
|
7675
|
+
type: Inject,
|
|
7676
|
+
args: [DOCUMENT]
|
|
7677
|
+
}] }] });
|
|
7678
|
+
|
|
7587
7679
|
// export * from './rating-ec/rating-ec.component';
|
|
7588
7680
|
|
|
7589
7681
|
class BlockFormContactEcComponent extends BlockEcComponent {
|
|
@@ -8315,29 +8407,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8315
8407
|
type: Output
|
|
8316
8408
|
}] } });
|
|
8317
8409
|
|
|
8318
|
-
class ComponentHelper {
|
|
8319
|
-
constructor() {
|
|
8320
|
-
this.ecOnConstruct();
|
|
8321
|
-
}
|
|
8322
|
-
ecOnInit = (params = {}) => {
|
|
8323
|
-
};
|
|
8324
|
-
ecOnConstruct = (params = {}) => {
|
|
8325
|
-
};
|
|
8326
|
-
hasParams = (params, searched) => {
|
|
8327
|
-
if (!params || !searched)
|
|
8328
|
-
return false;
|
|
8329
|
-
const q = searched.trim().toLowerCase();
|
|
8330
|
-
return params.some(p => {
|
|
8331
|
-
const code = p?.['code']?.toString().toLowerCase() ?? '';
|
|
8332
|
-
// Primero chequeo exacto, y si no, parcial
|
|
8333
|
-
return code === q || code.includes(q);
|
|
8334
|
-
});
|
|
8335
|
-
};
|
|
8336
|
-
navigateOnRouter(router, url) {
|
|
8337
|
-
router.navigateByUrl(`/${url}`);
|
|
8338
|
-
}
|
|
8339
|
-
}
|
|
8340
|
-
|
|
8341
8410
|
class PasswordResetEcComponent extends ComponentHelper {
|
|
8342
8411
|
authService;
|
|
8343
8412
|
toastr;
|
|
@@ -8547,6 +8616,14 @@ class FiltersEcComponent {
|
|
|
8547
8616
|
});
|
|
8548
8617
|
}) ?? false;
|
|
8549
8618
|
}
|
|
8619
|
+
/**
|
|
8620
|
+
* Verifica si una categoría tiene la propiedad isVisible y está marcada como visible
|
|
8621
|
+
* @param category - La categoría a verificar
|
|
8622
|
+
* @returns true si la categoría es visible, false en caso contrario
|
|
8623
|
+
*/
|
|
8624
|
+
hasVisibleProperty(category) {
|
|
8625
|
+
return category.isVisible === true;
|
|
8626
|
+
}
|
|
8550
8627
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FiltersEcComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8551
8628
|
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>\r\n", styles: [""] });
|
|
8552
8629
|
}
|
|
@@ -10492,11 +10569,9 @@ class RelatedProductsEcComponent extends BlockEcComponent {
|
|
|
10492
10569
|
this._relatedProductsSubject.next(relatedProducts);
|
|
10493
10570
|
res.map((products) => this._analyticsService.callEvent('view_item_list', { products: products.items, item_list_name: products.title || 'Related Products', item_list_id: products.id || 'related-products' }));
|
|
10494
10571
|
// Inicializar swiper después de que los datos estén disponibles
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
}, 100);
|
|
10499
|
-
}
|
|
10572
|
+
setTimeout(() => {
|
|
10573
|
+
this.initSwiper();
|
|
10574
|
+
}, 100);
|
|
10500
10575
|
});
|
|
10501
10576
|
}
|
|
10502
10577
|
initSwiper() {
|
|
@@ -11748,5 +11823,5 @@ const directives = [
|
|
|
11748
11823
|
* Generated bundle index. Do not edit.
|
|
11749
11824
|
*/
|
|
11750
11825
|
|
|
11751
|
-
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, RegisterFormEcComponent, RegisterWholesalerFormEcComponent, RelatedProductsEcComponent, ReviewsEcComponent, ReviewsFormEcComponent, SectionContainerEcComponent, ShareEcComponent, ShipmentService, SidebarEcComponent, StoresEcComponent, SuccessEcComponent, TestService, ToastService, VariantsEcComponent, authGuard, authInterceptor, directives, provideEnvironment };
|
|
11826
|
+
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 };
|
|
11752
11827
|
//# sourceMappingURL=ng-easycommerce-v18.mjs.map
|