ng-easycommerce-v18 0.2.14 → 0.2.16
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 +6 -2
- package/assets/decidirFormEc.html +514 -0
- package/assets/images/cards-occasional.png +0 -0
- package/assets/images/cards-occasional.svg +21 -0
- package/assets/images/decidir-logo.png +0 -0
- package/assets/images/decidir-logo.svg +0 -0
- package/esm2022/lib/ec-components/checkout-ec/payment-ec/payment-ec.component.mjs +22 -7
- package/esm2022/lib/ec-components/widgets-ec/decidir-ec/decidir-ec.component.mjs +214 -0
- package/esm2022/lib/ec-services/cart.service.mjs +46 -17
- package/esm2022/lib/ec-services/checkout.service.mjs +1 -1
- package/esm2022/lib/ec-services/payment.service.mjs +3 -1
- package/fesm2022/ng-easycommerce-v18.mjs +266 -22
- package/fesm2022/ng-easycommerce-v18.mjs.map +1 -1
- package/lib/ec-components/checkout-ec/payment-ec/payment-ec.component.d.ts +4 -1
- package/lib/ec-components/widgets-ec/decidir-ec/decidir-ec.component.d.ts +59 -0
- package/lib/ec-services/cart.service.d.ts +5 -4
- package/lib/ec-services/checkout.service.d.ts +1 -1
- package/lib/ec-services/payment.service.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { PaymentService } from '../../../ec-services';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class PaymentEcComponent implements OnInit {
|
|
4
|
-
|
|
5
|
+
_paymentService: PaymentService;
|
|
5
6
|
private _checkoutService;
|
|
7
|
+
private _cartService;
|
|
6
8
|
private _methodDataSubject;
|
|
7
9
|
private _loadingSubject;
|
|
8
10
|
methods$: import("rxjs").Observable<any[]>;
|
|
9
11
|
loading$: import("rxjs").Observable<boolean>;
|
|
10
12
|
methodData$: import("rxjs").Observable<any>;
|
|
11
13
|
loadingInternal: boolean;
|
|
14
|
+
total_amount: number;
|
|
12
15
|
constructor();
|
|
13
16
|
ngOnInit(): void;
|
|
14
17
|
setActive($event: any): void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { OnInit, Renderer2, OnChanges, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute } from '@angular/router';
|
|
3
|
+
import { ComponentHelper } from "../../../classes/component-helper";
|
|
4
|
+
import { ConnectionService } from '../../../api/connection.service';
|
|
5
|
+
import { ToastService } from '../../../ec-services/toast.service';
|
|
6
|
+
import { CoreConstantsService, ApiConstantsService } from '../../../constants';
|
|
7
|
+
import { CartService } from '../../../ec-services/cart.service';
|
|
8
|
+
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
|
9
|
+
import { ParametersService } from '../../../ec-services/parameters.service';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
export declare class DecidirEcComponent extends ComponentHelper implements OnInit, OnDestroy, OnChanges {
|
|
12
|
+
renderer: Renderer2;
|
|
13
|
+
connection: ConnectionService;
|
|
14
|
+
toastrService: ToastService;
|
|
15
|
+
consts: CoreConstantsService;
|
|
16
|
+
apiConsts: ApiConstantsService;
|
|
17
|
+
cartService: CartService;
|
|
18
|
+
activedRoute: ActivatedRoute;
|
|
19
|
+
sanitizer: DomSanitizer;
|
|
20
|
+
paramsService: ParametersService;
|
|
21
|
+
paymentServiceInst: any;
|
|
22
|
+
method: {
|
|
23
|
+
description?: string;
|
|
24
|
+
instructions?: string;
|
|
25
|
+
code?: string;
|
|
26
|
+
} | null;
|
|
27
|
+
total_amount: number;
|
|
28
|
+
allData: any;
|
|
29
|
+
user_data: null;
|
|
30
|
+
ready: EventEmitter<any>;
|
|
31
|
+
protected modalRef: any | null;
|
|
32
|
+
protected dataDecidir: any;
|
|
33
|
+
loading: boolean;
|
|
34
|
+
isDobleAuth: boolean;
|
|
35
|
+
urls: any[];
|
|
36
|
+
url: SafeResourceUrl | undefined;
|
|
37
|
+
closeModal: string;
|
|
38
|
+
paramsMensaje: string;
|
|
39
|
+
ventana: any;
|
|
40
|
+
params: any;
|
|
41
|
+
showModal: boolean;
|
|
42
|
+
protected dataRedirect: () => string;
|
|
43
|
+
constructor(renderer: Renderer2, connection: ConnectionService, toastrService: ToastService, consts: CoreConstantsService, apiConsts: ApiConstantsService, cartService: CartService, activedRoute: ActivatedRoute, sanitizer: DomSanitizer, paramsService: ParametersService);
|
|
44
|
+
ngOnInit(): void;
|
|
45
|
+
ngOnDestroy(): void;
|
|
46
|
+
ngOnChanges(): void;
|
|
47
|
+
openModal(): void;
|
|
48
|
+
clearStorageState: () => void;
|
|
49
|
+
clickClose: () => void;
|
|
50
|
+
showMessage: () => void;
|
|
51
|
+
callState: () => void;
|
|
52
|
+
processError: (err: any) => void;
|
|
53
|
+
getCheckoutDecidir: () => void;
|
|
54
|
+
handleIframeMessage: (event: MessageEvent) => void;
|
|
55
|
+
processPayment: (paymentData: any) => void;
|
|
56
|
+
resizeIframe: (obj: any) => void;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DecidirEcComponent, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DecidirEcComponent, "app-decidir-ec", never, { "paymentServiceInst": { "alias": "paymentServiceInst"; "required": false; }; "method": { "alias": "method"; "required": false; }; "total_amount": { "alias": "total_amount"; "required": false; }; "allData": { "alias": "allData"; "required": false; }; "user_data": { "alias": "user_data"; "required": false; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
59
|
+
}
|
|
@@ -44,12 +44,13 @@ export declare class CartService {
|
|
|
44
44
|
couponApi(): string;
|
|
45
45
|
constructor();
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Sincroniza el carrito cuando el usuario hace login
|
|
48
|
+
* Implementa la lógica de Angular 9 para preservar el carrito del invitado
|
|
48
49
|
*/
|
|
49
|
-
private
|
|
50
|
+
private syncCartOnLogin;
|
|
50
51
|
/**
|
|
51
|
-
* Obtiene el carrito desde el backend
|
|
52
|
-
*
|
|
52
|
+
* Obtiene el carrito desde el backend con lógica de sincronización
|
|
53
|
+
* Envía el token si hay carrito local para fusionar carritos
|
|
53
54
|
*/
|
|
54
55
|
private getCart;
|
|
55
56
|
/**
|
|
@@ -17,6 +17,8 @@ export declare class PaymentService {
|
|
|
17
17
|
putPayment(method: any): Promise<any>;
|
|
18
18
|
getPreference(shipment_data: any): Promise<any>;
|
|
19
19
|
setPayment(data: any): void;
|
|
20
|
+
getUserData: () => any;
|
|
21
|
+
getShipmentData: () => any;
|
|
20
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentService, never>;
|
|
21
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<PaymentService>;
|
|
22
24
|
}
|