ng-easycommerce-v18 0.2.29 → 0.3.1-9.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 +45 -0
- package/assets/ec-i18n/ct.json +1 -0
- package/assets/ec-i18n/en.json +88 -83
- package/assets/ec-i18n/es.json +6 -1
- package/assets/ec-i18n/fr.json +1 -0
- package/assets/ec-i18n/gl.json +1 -0
- package/assets/ec-i18n/pr.json +1 -0
- package/esm2022/lib/classes/component-helper.mjs +11 -2
- package/esm2022/lib/constants/core.constants.service.mjs +107 -2
- package/esm2022/lib/ec-components/abstractions-components/menu-ec.component.mjs +9 -1
- package/esm2022/lib/ec-components/auth-ec/login-form-ec/login-form-ec.component.mjs +5 -1
- package/esm2022/lib/ec-components/auth-ec/register-form-ec/register-form-ec.component.mjs +5 -1
- package/esm2022/lib/ec-components/blocks-ec/block-newsletter-ec/block-newsletter-ec.component.mjs +9 -3
- package/esm2022/lib/ec-components/cart-ec/cart-ec.component.mjs +8 -2
- package/esm2022/lib/ec-components/cart-ec/cart-item-ec/cart-item-ec.component.mjs +42 -10
- package/esm2022/lib/ec-components/checkout-ec/payment-ec/payment-methods/mp-redirect-ec/mp-redirect-ec.component.mjs +141 -75
- package/esm2022/lib/ec-components/filters-ec/filters-ec.component.mjs +9 -1
- package/esm2022/lib/ec-components/header-ec/header-ec.component.mjs +53 -2
- package/esm2022/lib/ec-components/product-detail-ec/product-detail-ec.component.mjs +23 -15
- package/esm2022/lib/ec-components/product-ec/product-ec.component.mjs +143 -5
- package/esm2022/lib/ec-components/widgets-ec/decidir-ec/decidir-ec.component.mjs +3 -3
- package/esm2022/lib/ec-components/widgets-ec/index.mjs +2 -1
- package/esm2022/lib/ec-components/widgets-ec/redsys-catch-ec/redsys-catch-ec.component.mjs +193 -0
- package/esm2022/lib/ec-services/cart.service.mjs +23 -5
- package/esm2022/lib/ec-services/checkout.service.mjs +46 -21
- package/esm2022/lib/ec-services/form.service.mjs +13 -1
- package/esm2022/lib/ec-services/order-utility.service.mjs +12 -6
- package/esm2022/lib/ec-services/product-detail.service.mjs +11 -1
- package/esm2022/lib/interfaces/environment.mjs +1 -1
- package/esm2022/lib/interfaces/product.mjs +1 -1
- package/fesm2022/ng-easycommerce-v18.mjs +843 -147
- package/fesm2022/ng-easycommerce-v18.mjs.map +1 -1
- package/lib/classes/component-helper.d.ts +1 -1
- package/lib/constants/core.constants.service.d.ts +24 -0
- package/lib/ec-components/abstractions-components/menu-ec.component.d.ts +6 -0
- package/lib/ec-components/auth-ec/login-form-ec/login-form-ec.component.d.ts +2 -0
- package/lib/ec-components/auth-ec/register-form-ec/register-form-ec.component.d.ts +2 -0
- package/lib/ec-components/cart-ec/cart-ec.component.d.ts +3 -0
- package/lib/ec-components/cart-ec/cart-item-ec/cart-item-ec.component.d.ts +6 -1
- package/lib/ec-components/checkout-ec/payment-ec/payment-methods/mp-redirect-ec/mp-redirect-ec.component.d.ts +38 -16
- package/lib/ec-components/filters-ec/filters-ec.component.d.ts +6 -0
- package/lib/ec-components/header-ec/header-ec.component.d.ts +16 -2
- package/lib/ec-components/product-detail-ec/product-detail-ec.component.d.ts +2 -1
- package/lib/ec-components/product-ec/product-ec.component.d.ts +14 -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 +47 -0
- package/lib/ec-services/cart.service.d.ts +1 -1
- package/lib/ec-services/form.service.d.ts +6 -0
- package/lib/interfaces/environment.d.ts +1 -0
- package/lib/interfaces/product.d.ts +6 -0
- package/package.json +1 -1
|
@@ -4,6 +4,6 @@ export declare class ComponentHelper {
|
|
|
4
4
|
constructor();
|
|
5
5
|
ecOnInit: (params?: {}) => void;
|
|
6
6
|
ecOnConstruct: (params?: {}) => void;
|
|
7
|
-
hasParams: (params: Params[], searched: string) => boolean;
|
|
7
|
+
hasParams: (params: Params[] | null | undefined, searched: string) => boolean;
|
|
8
8
|
navigateOnRouter(router: Router, url: string): void;
|
|
9
9
|
}
|
|
@@ -15,6 +15,14 @@ export declare class CoreConstantsService {
|
|
|
15
15
|
* Provee el ID de la plataforma en donde se esta ejecutando el codigo, esto sirve para poder diferenciar si es de un servidor o un navegador web.
|
|
16
16
|
*/
|
|
17
17
|
private platformId;
|
|
18
|
+
/**
|
|
19
|
+
* Document token para acceso SSR-compatible al documento
|
|
20
|
+
*/
|
|
21
|
+
private document;
|
|
22
|
+
/**
|
|
23
|
+
* Contiene los datos provisto por el frontend en el archivo environment.ts
|
|
24
|
+
*/
|
|
25
|
+
private environment;
|
|
18
26
|
/**
|
|
19
27
|
* Guarda la variable window del web browser.
|
|
20
28
|
*/
|
|
@@ -50,6 +58,22 @@ export declare class CoreConstantsService {
|
|
|
50
58
|
* @returns
|
|
51
59
|
*/
|
|
52
60
|
url: () => string;
|
|
61
|
+
/**
|
|
62
|
+
* URL del sitio frontend - Compatible con Angular SSR
|
|
63
|
+
*/
|
|
64
|
+
get FRONTEND_URL(): string;
|
|
65
|
+
/**
|
|
66
|
+
* Retorna la URL completa del frontend con una ruta opcional
|
|
67
|
+
* @param path - Ruta opcional para agregar a la URL base
|
|
68
|
+
* @returns {string} URL completa del frontend
|
|
69
|
+
*/
|
|
70
|
+
getFrontendUrl: (path?: string) => string;
|
|
71
|
+
/**
|
|
72
|
+
* Retorna la URL absoluta de una imagen para meta tags (compatible con SSR)
|
|
73
|
+
* @param postMedia - Ruta de la imagen
|
|
74
|
+
* @returns {string} URL absoluta de la imagen
|
|
75
|
+
*/
|
|
76
|
+
getAbsoluteImageUrl: (postMedia?: string) => string;
|
|
53
77
|
/**
|
|
54
78
|
* Retorna la url de las imagenes de los banners
|
|
55
79
|
* @returns
|
|
@@ -69,6 +69,12 @@ export declare class MenuEcComponent {
|
|
|
69
69
|
* @param stackPlace 'start' | 'end' (por defecto 'end')
|
|
70
70
|
*/
|
|
71
71
|
addSectionChildren(sectionCode: string, children: any[], stackPlace?: 'start' | 'end'): void;
|
|
72
|
+
/**
|
|
73
|
+
* Verifica si una categoría tiene la propiedad isVisible y está marcada como visible
|
|
74
|
+
* @param category - La categoría a verificar
|
|
75
|
+
* @returns true si la categoría es visible, false en caso contrario
|
|
76
|
+
*/
|
|
77
|
+
hasVisibleProperty(category: Category): boolean;
|
|
72
78
|
static ɵfac: i0.ɵɵFactoryDeclaration<MenuEcComponent, never>;
|
|
73
79
|
static ɵcmp: i0.ɵɵComponentDeclaration<MenuEcComponent, "lib-footer-ec", never, {}, {}, never, never, true, never>;
|
|
74
80
|
}
|
|
@@ -6,6 +6,7 @@ export declare class LoginFormEcComponent {
|
|
|
6
6
|
private _formBuilder;
|
|
7
7
|
private _toastService;
|
|
8
8
|
private _router;
|
|
9
|
+
showPassword: boolean;
|
|
9
10
|
/**
|
|
10
11
|
* Parametro para indicar si tras loguear
|
|
11
12
|
* debe redireccionar o no.
|
|
@@ -38,6 +39,7 @@ export declare class LoginFormEcComponent {
|
|
|
38
39
|
* De lo contrario redirige al contenido de la variable `redirectTo`.
|
|
39
40
|
*/
|
|
40
41
|
redirectHome(): void;
|
|
42
|
+
togglePassword(): void;
|
|
41
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoginFormEcComponent, never>;
|
|
42
44
|
static ɵcmp: i0.ɵɵComponentDeclaration<LoginFormEcComponent, "app-login-form-ec", never, { "redirect": { "alias": "redirect"; "required": false; }; "redirectTo": { "alias": "redirectTo"; "required": false; }; "inCart": { "alias": "inCart"; "required": false; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
43
45
|
}
|
|
@@ -8,6 +8,7 @@ export declare class RegisterFormEcComponent {
|
|
|
8
8
|
private _analyticsService;
|
|
9
9
|
private _formBuilder;
|
|
10
10
|
private channelConfigService;
|
|
11
|
+
showPassword: boolean;
|
|
11
12
|
/**
|
|
12
13
|
* Indica si debe redireccionar o se queda en la misma pantalla
|
|
13
14
|
*/
|
|
@@ -41,6 +42,7 @@ export declare class RegisterFormEcComponent {
|
|
|
41
42
|
* @returns
|
|
42
43
|
*/
|
|
43
44
|
register(event: Event): void;
|
|
45
|
+
togglePassword(): void;
|
|
44
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<RegisterFormEcComponent, never>;
|
|
45
47
|
static ɵcmp: i0.ɵɵComponentDeclaration<RegisterFormEcComponent, "app-register-form-ec", never, { "redirect": { "alias": "redirect"; "required": false; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
46
48
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Injector } from '@angular/core';
|
|
1
2
|
import { Router } from '@angular/router';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class CartEcComponent {
|
|
@@ -15,6 +16,8 @@ export declare class CartEcComponent {
|
|
|
15
16
|
isAuthenticated$: boolean;
|
|
16
17
|
getTotalAmount: import("rxjs").Observable<any>;
|
|
17
18
|
couponCode$: import("rxjs").Observable<string | null>;
|
|
19
|
+
hideTaxes: boolean;
|
|
20
|
+
injector: Injector;
|
|
18
21
|
constructor();
|
|
19
22
|
removeCoupon(): void;
|
|
20
23
|
redirectCheckout(): boolean;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Parameter } from '../../../interfaces';
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
3
5
|
export declare class CartItemEcComponent implements OnInit {
|
|
4
6
|
item: any;
|
|
@@ -6,6 +8,7 @@ export declare class CartItemEcComponent implements OnInit {
|
|
|
6
8
|
private _cartService;
|
|
7
9
|
private _toastService;
|
|
8
10
|
private _constants;
|
|
11
|
+
private parametersService;
|
|
9
12
|
mediaUrl: string;
|
|
10
13
|
quantity: number;
|
|
11
14
|
variantsToShow: string[];
|
|
@@ -13,12 +16,14 @@ export declare class CartItemEcComponent implements OnInit {
|
|
|
13
16
|
isQuantityUpdating: boolean;
|
|
14
17
|
ngOnInit(): void;
|
|
15
18
|
updateQuantity(stock: number): void;
|
|
16
|
-
less(stock: number, value?: number): void;
|
|
17
19
|
plus(stock: number, value?: number): void;
|
|
20
|
+
less(stock: number, value?: number): void;
|
|
18
21
|
deleteCartItem(): void;
|
|
19
22
|
getVariants(product: any): any;
|
|
20
23
|
createDiscountMessage(saleprice: number, price: number): string;
|
|
21
24
|
checkStock(product: any): any;
|
|
25
|
+
parameters$: Observable<Parameter[] | null>;
|
|
26
|
+
hasParams: (params: any, code: string) => any;
|
|
22
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<CartItemEcComponent, never>;
|
|
23
28
|
static ɵcmp: i0.ɵɵComponentDeclaration<CartItemEcComponent, "app-cart-item-ec", never, { "item": { "alias": "item"; "required": true; }; "inSidebar": { "alias": "inSidebar"; "required": false; }; }, {}, never, never, true, never>;
|
|
24
29
|
}
|
|
@@ -1,30 +1,52 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnInit, OnDestroy } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
|
|
3
|
+
type Phase = 'idle' | 'paying' | 'finalizing';
|
|
4
|
+
export declare class MpRedirectEcComponent implements OnInit, OnDestroy {
|
|
4
5
|
private _paymentService;
|
|
5
6
|
private _toastService;
|
|
7
|
+
private platformId;
|
|
8
|
+
private finished;
|
|
6
9
|
method: null;
|
|
7
10
|
total_amount: number;
|
|
8
11
|
allData: any;
|
|
9
|
-
ready: EventEmitter<
|
|
12
|
+
ready: EventEmitter<boolean>;
|
|
10
13
|
protected preference: any;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
|
|
14
|
+
url?: string;
|
|
15
|
+
phase: Phase;
|
|
16
|
+
get isIdle(): boolean;
|
|
17
|
+
get isPaying(): boolean;
|
|
18
|
+
get isFinalizing(): boolean;
|
|
19
|
+
private ventana;
|
|
20
|
+
private windowRef?;
|
|
21
|
+
private sid;
|
|
22
|
+
private bc?;
|
|
23
|
+
private pollTimer?;
|
|
24
|
+
private pollStartedAt;
|
|
19
25
|
ngOnInit(): void;
|
|
26
|
+
ngOnDestroy(): void;
|
|
27
|
+
/** Cancela manualmente el pago y finaliza el flujo con estado "cancel". */
|
|
20
28
|
clickClose: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* Inicia el pago abriendo `init_point` en una ventana/pestaña nueva.
|
|
31
|
+
* Genera un SID y lo persiste para casar la respuesta del catch.
|
|
32
|
+
* Si el popup es bloqueado, hace fallback navegando en la misma pestaña.
|
|
33
|
+
*/
|
|
21
34
|
iniciar: () => void;
|
|
22
|
-
|
|
23
|
-
|
|
35
|
+
private onWindowMessage;
|
|
36
|
+
private onStorage;
|
|
37
|
+
private onMpMessage;
|
|
38
|
+
private checkLocalStorageOnce;
|
|
39
|
+
/** Cierra el flujo de pago con el estado final y notifica al padre. */
|
|
40
|
+
private finishWithState;
|
|
41
|
+
private genSid;
|
|
42
|
+
private processError;
|
|
43
|
+
/** Limpia posibles residuos de estado en storages. */
|
|
24
44
|
clearStorageState: () => void;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
45
|
+
/** Obtiene la preferencia e inicializa `url` (init_point). */
|
|
46
|
+
private getPreference;
|
|
47
|
+
private setError;
|
|
48
|
+
private renderMP;
|
|
28
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<MpRedirectEcComponent, never>;
|
|
29
50
|
static ɵcmp: i0.ɵɵComponentDeclaration<MpRedirectEcComponent, "app-mp-redirect-ec", never, { "method": { "alias": "method"; "required": false; }; "total_amount": { "alias": "total_amount"; "required": false; }; "allData": { "alias": "allData"; "required": false; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
30
51
|
}
|
|
52
|
+
export {};
|
|
@@ -30,6 +30,12 @@ export declare class FiltersEcComponent {
|
|
|
30
30
|
close: () => boolean;
|
|
31
31
|
scrollUp: () => boolean;
|
|
32
32
|
hasAppliedFilters(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Verifica si una categoría tiene la propiedad isVisible y está marcada como visible
|
|
35
|
+
* @param category - La categoría a verificar
|
|
36
|
+
* @returns true si la categoría es visible, false en caso contrario
|
|
37
|
+
*/
|
|
38
|
+
hasVisibleProperty(category: FilterElement): boolean;
|
|
33
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<FiltersEcComponent, never>;
|
|
34
40
|
static ɵcmp: i0.ɵɵComponentDeclaration<FiltersEcComponent, "lib-filters-ec", never, { "setSelect": { "alias": "setSelect"; "required": false; }; }, {}, never, never, true, never>;
|
|
35
41
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
|
1
2
|
import { MenuEcComponent } from '../abstractions-components';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import { AuthService } from '../../ec-services';
|
|
5
|
+
import { Router } from '@angular/router';
|
|
6
|
+
import { ChannelService } from '../../ec-services';
|
|
2
7
|
import * as i0 from "@angular/core";
|
|
3
8
|
/**
|
|
4
9
|
* Componente que se encarga de manejar la funcionalidad del Header.
|
|
@@ -11,8 +16,14 @@ export declare class HeaderEcComponent extends MenuEcComponent {
|
|
|
11
16
|
isScrolled: boolean;
|
|
12
17
|
showPricesOnlyToLoggedUsers: boolean;
|
|
13
18
|
hidePrices: boolean;
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
__authService: AuthService;
|
|
20
|
+
_channelService: ChannelService;
|
|
21
|
+
changeDetector: ChangeDetectorRef;
|
|
22
|
+
appRouter: Router;
|
|
23
|
+
platformId: Object;
|
|
24
|
+
mobileDropdownOpen: import("@angular/core").WritableSignal<boolean>;
|
|
25
|
+
isMenuOpen: import("@angular/core").WritableSignal<boolean>;
|
|
26
|
+
logged$: Observable<boolean>;
|
|
16
27
|
isAuthenticated$: boolean;
|
|
17
28
|
constructor();
|
|
18
29
|
private coreConstantsService;
|
|
@@ -32,6 +43,9 @@ export declare class HeaderEcComponent extends MenuEcComponent {
|
|
|
32
43
|
borrarInput(inputId?: string): void;
|
|
33
44
|
setupMobileMenu(): void;
|
|
34
45
|
setupSearchInputs(): void;
|
|
46
|
+
togglePanel(id: string): void;
|
|
47
|
+
openPanels: import("@angular/core").WritableSignal<Record<string, boolean>>;
|
|
48
|
+
collapseAllMenus(): void;
|
|
35
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<HeaderEcComponent, never>;
|
|
36
50
|
static ɵcmp: i0.ɵɵComponentDeclaration<HeaderEcComponent, "lib-header-ec", never, {}, {}, never, never, true, never>;
|
|
37
51
|
}
|
|
@@ -25,6 +25,7 @@ export declare class ProductDetailEcComponent implements OnInit, OnDestroy {
|
|
|
25
25
|
private routeSubscription?;
|
|
26
26
|
private route;
|
|
27
27
|
private currentProductId?;
|
|
28
|
+
private _router;
|
|
28
29
|
ngOnDestroy(): void;
|
|
29
30
|
mediaUrl: string;
|
|
30
31
|
code: string;
|
|
@@ -48,7 +49,7 @@ export declare class ProductDetailEcComponent implements OnInit, OnDestroy {
|
|
|
48
49
|
sanitizedHtml(html: string): SafeHtml;
|
|
49
50
|
addToCart(): void;
|
|
50
51
|
plus(stock?: number, multipleQuantity?: number): void;
|
|
51
|
-
less(multipleQuantity?:
|
|
52
|
+
less(multipleQuantity?: number): void;
|
|
52
53
|
checkStock(stock: number): void;
|
|
53
54
|
goToSection(section: string): void;
|
|
54
55
|
resetForm: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnInit, Injector } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnInit, Injector, WritableSignal } from '@angular/core';
|
|
2
2
|
import { Product } from '../../interfaces';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
@@ -8,6 +8,10 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
export declare class ProductEcComponent implements OnInit {
|
|
9
9
|
injector: Injector;
|
|
10
10
|
private routerService;
|
|
11
|
+
private _cartService;
|
|
12
|
+
private _toastService;
|
|
13
|
+
isAddingToCart: WritableSignal<boolean>;
|
|
14
|
+
quantity: WritableSignal<number>;
|
|
11
15
|
/**
|
|
12
16
|
* Navega al detalle del producto y sube al inicio de la página
|
|
13
17
|
* @param productId ID del producto
|
|
@@ -43,6 +47,15 @@ export declare class ProductEcComponent implements OnInit {
|
|
|
43
47
|
get shouldShowPrice(): boolean;
|
|
44
48
|
get hasDiscount(): boolean;
|
|
45
49
|
get discountPercentage(): number | null;
|
|
50
|
+
plus(stock?: number, multipleQuantity?: number): void;
|
|
51
|
+
less(multipleQuantity?: number): void;
|
|
52
|
+
addToCart(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Valida las restricciones de cantidad del producto
|
|
55
|
+
*/
|
|
56
|
+
private validateQuantity;
|
|
57
|
+
checkStock(stock: number): void;
|
|
58
|
+
onQuantityChange(event: Event): void;
|
|
46
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<ProductEcComponent, never>;
|
|
47
60
|
static ɵcmp: i0.ɵɵComponentDeclaration<ProductEcComponent, "app-product-ec", never, { "product": { "alias": "product"; "required": true; }; "isProductBox": { "alias": "isProductBox"; "required": false; }; "isCollection": { "alias": "isCollection"; "required": false; }; }, { "loaded": "loaded"; }, never, never, true, never>;
|
|
48
61
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { OnInit, OnDestroy, Renderer2, ElementRef } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { ComponentHelper } from '../../../classes/component-helper';
|
|
4
|
+
import { CheckoutService } from '../../../ec-services';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Catch genérico para redirecciones de pagos.
|
|
8
|
+
* - Normaliza el estado recibido por params/query.
|
|
9
|
+
* - Informa el resultado al opener (postMessage), BroadcastChannel y localStorage.
|
|
10
|
+
* - Intenta cerrarse; si el cierre falla, redirige según el estado.
|
|
11
|
+
*/
|
|
12
|
+
export declare class RedsysCatchEcComponent extends ComponentHelper implements OnInit, OnDestroy {
|
|
13
|
+
activedRoute: ActivatedRoute;
|
|
14
|
+
router: Router;
|
|
15
|
+
checkoutService: CheckoutService;
|
|
16
|
+
private renderer;
|
|
17
|
+
private elementRef;
|
|
18
|
+
private document;
|
|
19
|
+
private platformId;
|
|
20
|
+
message: string;
|
|
21
|
+
private subscription;
|
|
22
|
+
private sid;
|
|
23
|
+
private bc?;
|
|
24
|
+
constructor(activedRoute: ActivatedRoute, router: Router, checkoutService: CheckoutService, renderer: Renderer2, elementRef: ElementRef, document: Document, platformId: any);
|
|
25
|
+
ngOnInit(): void;
|
|
26
|
+
ngOnDestroy(): void;
|
|
27
|
+
/** Guarda total_amount si viene desde el PSP. */
|
|
28
|
+
private storeTotalAmount;
|
|
29
|
+
/** Setea mensaje y estado en storages. */
|
|
30
|
+
private setStateInLocal;
|
|
31
|
+
/** Normaliza estados heterogéneos de distintos gateways. */
|
|
32
|
+
private normalizeState;
|
|
33
|
+
/**
|
|
34
|
+
* Informa el resultado: postMessage al opener, BroadcastChannel y localStorage
|
|
35
|
+
* (este último permite polling en la pestaña madre).
|
|
36
|
+
*/
|
|
37
|
+
private signalState;
|
|
38
|
+
/** Intenta cerrar la pestaña actual; si falla, ejecuta el callback de fallback. */
|
|
39
|
+
private tryCloseSelf;
|
|
40
|
+
/** Oculta header/footer para esta pantalla mínima. */
|
|
41
|
+
private hideHeaderFooter;
|
|
42
|
+
/** Restaura header/footer al salir. */
|
|
43
|
+
private showHeaderFooter;
|
|
44
|
+
private setStateInSession;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RedsysCatchEcComponent, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RedsysCatchEcComponent, "app-redsys-catch-ec", never, {}, {}, never, never, true, never>;
|
|
47
|
+
}
|
|
@@ -115,7 +115,7 @@ export declare class CartService {
|
|
|
115
115
|
* @param item el item a actualizar.
|
|
116
116
|
* @param quantity la cantidad nueva.
|
|
117
117
|
*/
|
|
118
|
-
updateItemQuantity(item: CartItem, quantity: number):
|
|
118
|
+
updateItemQuantity(item: CartItem, quantity: number): boolean;
|
|
119
119
|
/**
|
|
120
120
|
* Maneja el error en caso de que no se pueda agregar al carrito el producto.
|
|
121
121
|
* @param err
|
|
@@ -29,6 +29,12 @@ export declare class FormService {
|
|
|
29
29
|
* @returns
|
|
30
30
|
*/
|
|
31
31
|
sendResponse(response_obj: any): Observable<any>;
|
|
32
|
+
/**
|
|
33
|
+
* @description contiene un arreglo de string cuyo contenido son los codigos de los paises a excluir.
|
|
34
|
+
* @example ['GB']
|
|
35
|
+
*/
|
|
36
|
+
excludedCountries: string[];
|
|
37
|
+
allowedCountries: string[];
|
|
32
38
|
/**
|
|
33
39
|
* Obtiene los paises y los guarda en un observable.
|
|
34
40
|
* @returns
|
|
@@ -5,6 +5,9 @@ export interface OptionValue {
|
|
|
5
5
|
name: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
selected?: boolean;
|
|
8
|
+
maximumItemsQuantity?: number;
|
|
9
|
+
minimumItemsQuantity?: number;
|
|
10
|
+
multipleQuantity?: number;
|
|
8
11
|
}
|
|
9
12
|
export interface Options {
|
|
10
13
|
code: string;
|
|
@@ -34,6 +37,9 @@ export interface Product {
|
|
|
34
37
|
productWithUniqueVariant?: Product[];
|
|
35
38
|
stock?: number;
|
|
36
39
|
variant_id?: number;
|
|
40
|
+
maximumItemsQuantity?: number;
|
|
41
|
+
minimumItemsQuantity?: number;
|
|
42
|
+
multipleQuantity?: number;
|
|
37
43
|
}
|
|
38
44
|
export interface ProductToCartItem {
|
|
39
45
|
productCode?: string;
|