ng-easycommerce 0.1.1 → 1.1.2
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/assets/ec-i18n/ct.json +2 -0
- package/assets/ec-i18n/en.json +2 -0
- package/assets/ec-i18n/es.json +2 -0
- package/assets/ec-i18n/fr.json +2 -0
- package/assets/ec-i18n/gl.json +2 -0
- package/assets/ec-i18n/pr.json +2 -0
- package/bundles/ng-easycommerce.umd.js +84 -20
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/account-ec/order-ec/order-ec.component.js +2 -2
- package/esm2015/lib/ec-component/checkout-ec/checkout-ec.component.js +6 -2
- package/esm2015/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +6 -2
- package/esm2015/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +24 -9
- package/esm2015/lib/ec-component/checkout-ec/payment-ec-single/payment-ec-single.component.js +11 -3
- package/esm2015/lib/interfaces/checkout-data.js +1 -1
- package/esm2015/lib/services/cart.service.js +9 -1
- package/esm2015/lib/services/checkout/checkout.service.js +3 -1
- package/esm2015/lib/utils/order-util.service.js +22 -2
- package/esm5/lib/ec-component/account-ec/order-ec/order-ec.component.js +2 -2
- package/esm5/lib/ec-component/checkout-ec/checkout-ec.component.js +6 -2
- package/esm5/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +6 -2
- package/esm5/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.js +29 -14
- package/esm5/lib/ec-component/checkout-ec/payment-ec-single/payment-ec-single.component.js +11 -3
- package/esm5/lib/interfaces/checkout-data.js +1 -1
- package/esm5/lib/services/cart.service.js +13 -1
- package/esm5/lib/services/checkout/checkout.service.js +3 -2
- package/esm5/lib/utils/order-util.service.js +22 -2
- package/fesm2015/ng-easycommerce.js +75 -14
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +84 -20
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/checkout-ec/checkout-ec.component.d.ts +1 -1
- package/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.d.ts +1 -1
- package/lib/ec-component/checkout-ec/payment-ec/payment-ec.component.d.ts +3 -0
- package/lib/ec-component/checkout-ec/payment-ec-single/payment-ec-single.component.d.ts +3 -0
- package/lib/interfaces/checkout-data.d.ts +6 -1
- package/lib/services/cart.service.d.ts +3 -0
- package/lib/utils/order-util.service.d.ts +1 -0
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -97,7 +97,7 @@ export declare class CheckoutEcComponent extends ComponentHelper implements OnIn
|
|
|
97
97
|
goToNextSection: (stepName: string) => void;
|
|
98
98
|
goToNextFromAddress: () => void;
|
|
99
99
|
isSectionOpen: (stepName: string) => boolean;
|
|
100
|
-
getSummaryLabel: (type: import("../../interfaces/checkout-data").CheckoutDataType, item?: CheckoutData) => "total" | "subtotal" | "shipment" | "coupon" | "discount" | "taxes" | "clientTaxes" | "products-before-discounts" | "line-discounts" | "taxes-included-in-total" | "national-taxes";
|
|
100
|
+
getSummaryLabel: (type: import("../../interfaces/checkout-data").CheckoutDataType, item?: CheckoutData) => "total" | "subtotal" | "shipment" | "coupon" | "discount" | "taxes" | "clientTaxes" | "products-before-discounts" | "line-discounts" | "payment-method-discount" | "payment-method-surcharge" | "taxes-included-in-total" | "national-taxes";
|
|
101
101
|
getSummaryData: (data: CheckoutData[]) => CheckoutData[];
|
|
102
102
|
getSummaryAmountView: (item: CheckoutData) => import("../../utils/shipping-price-display.service").ShippingPriceViewModel;
|
|
103
103
|
getTotalAmount: (data: CheckoutData[]) => number;
|
|
@@ -22,7 +22,7 @@ export declare class DetailCheckoutBlockEcComponent extends ComponentHelper impl
|
|
|
22
22
|
constructor(checkoutService: CheckoutService, cartService: CartService, channelConfigService: ChannelConfigService, shippingPriceDisplay: ShippingPriceDisplayService);
|
|
23
23
|
ngOnInit(): void;
|
|
24
24
|
calcularTotales(): void;
|
|
25
|
-
getIcon: (data_item: CheckoutData) => "fas fa-ticket-alt fa-2x" | "fas fa-tags fa-2x" | "fas fa-shipping-fast fa-2x" | "fas fa-boxes fa-2x" | "fas fa-file-invoice-dollar fa-2x" | "fas fa-shopping-basket fa-2x";
|
|
25
|
+
getIcon: (data_item: CheckoutData) => "fas fa-ticket-alt fa-2x" | "fas fa-tags fa-2x" | "fas fa-shipping-fast fa-2x" | "fas fa-boxes fa-2x" | "fas fa-file-invoice-dollar fa-2x" | "fas fa-credit-card fa-2x" | "fas fa-shopping-basket fa-2x";
|
|
26
26
|
getIcon2: (data_type: any) => "fas fa-ticket-alt fa-2x" | "fas fa-tags fa-2x" | "fas fa-percent fa-2x";
|
|
27
27
|
getTypeLabel(type: string, item?: CheckoutData): string;
|
|
28
28
|
shouldShowItem(type: string, item?: CheckoutData): boolean;
|
|
@@ -2,6 +2,7 @@ import { Renderer2, ElementRef, OnChanges, OnInit, EventEmitter } from '@angular
|
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
|
4
4
|
import { ComponentHelper } from '../../../classes/component-helper';
|
|
5
|
+
import { PaymentMethodAdjustmentPreview } from '../../../interfaces/checkout-data';
|
|
5
6
|
import { CheckoutService } from '../../../services/checkout/checkout.service';
|
|
6
7
|
import { PaymentService } from '../../../services/checkout/payment.service';
|
|
7
8
|
import { ToastService } from '../../../utils/toast.service';
|
|
@@ -57,6 +58,8 @@ export declare class PaymentEcComponent extends ComponentHelper implements OnCha
|
|
|
57
58
|
setLoading: (estado?: boolean) => boolean;
|
|
58
59
|
verifyValidate: () => void;
|
|
59
60
|
setMethod: (method: any) => Promise<void>;
|
|
61
|
+
getPaymentMethodAdjustmentPreview: (method: any) => PaymentMethodAdjustmentPreview;
|
|
62
|
+
getPaymentMethodAdjustmentPreviewSign: (value: number) => "" | "+";
|
|
60
63
|
private setDirtyState;
|
|
61
64
|
private setSavedMethodCode;
|
|
62
65
|
private evaluateDirtyForSelection;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { PaymentMethodAdjustmentPreview } from '../../../interfaces/checkout-data';
|
|
2
3
|
export declare class PaymentEcSingleComponent {
|
|
3
4
|
loadingInternal: boolean;
|
|
4
5
|
loadingInternalMp: boolean;
|
|
@@ -10,6 +11,8 @@ export declare class PaymentEcSingleComponent {
|
|
|
10
11
|
balanceMethodRejected: boolean;
|
|
11
12
|
methods: any[];
|
|
12
13
|
totalAmount: number | null;
|
|
14
|
+
getPaymentMethodAdjustmentPreview: (method: any) => PaymentMethodAdjustmentPreview | null;
|
|
15
|
+
getPaymentMethodAdjustmentPreviewSign: (value: number) => '+' | '';
|
|
13
16
|
isMethodDisabled: (method: any) => boolean;
|
|
14
17
|
isMP: (code: string) => boolean;
|
|
15
18
|
isMPTarjetaDeCredito: (code: string) => boolean;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
export declare type CheckoutDataType = 'total' | 'subtotal' | 'productsBeforeDiscounts' | 'shipment' | 'coupon' | 'discount' | 'lineDiscount' | 'taxes' | 'clientTaxes';
|
|
1
|
+
export declare type CheckoutDataType = 'total' | 'subtotal' | 'productsBeforeDiscounts' | 'shipment' | 'coupon' | 'discount' | 'paymentMethodAdjustment' | 'lineDiscount' | 'taxes' | 'clientTaxes';
|
|
2
|
+
export declare type PaymentMethodChargeType = 'percentage' | 'fixed';
|
|
3
|
+
export interface PaymentMethodAdjustmentPreview {
|
|
4
|
+
type: PaymentMethodChargeType;
|
|
5
|
+
value: number;
|
|
6
|
+
}
|
|
2
7
|
export interface CheckoutData {
|
|
3
8
|
type: CheckoutDataType;
|
|
4
9
|
amount: number;
|
|
@@ -109,6 +109,7 @@ export declare class CartService {
|
|
|
109
109
|
private updateLocalCart;
|
|
110
110
|
private resetCart;
|
|
111
111
|
private updateCartObj;
|
|
112
|
+
updateCartAfterPaymentResponse: (cart: any) => boolean;
|
|
112
113
|
private isItemInLocal;
|
|
113
114
|
/**
|
|
114
115
|
* @public
|
|
@@ -141,6 +142,8 @@ export declare class CartService {
|
|
|
141
142
|
getCartToken: () => any;
|
|
142
143
|
getLocale: () => string;
|
|
143
144
|
getTotalAmount: () => Observable<number>;
|
|
145
|
+
getPaymentMethodAdjustment: () => Observable<number>;
|
|
146
|
+
getPaymentMethodAdjustmentLabel: () => Observable<string>;
|
|
144
147
|
/** Total para carrito/sidebar, sin envío persistido ni recargos de checkout. */
|
|
145
148
|
getCartTotalAmount: () => Observable<number>;
|
|
146
149
|
getCountCartItems: () => Observable<number>;
|
|
@@ -18,6 +18,7 @@ export declare class OrderUtilityService {
|
|
|
18
18
|
* A diferencia de `getPromotions`, este método solo considera descuentos de orden.
|
|
19
19
|
*/
|
|
20
20
|
getSummaryPromotions: (cart: any, forCart?: boolean) => CheckoutData[];
|
|
21
|
+
getPaymentMethodAdjustment: (cart: any) => CheckoutData;
|
|
21
22
|
/**
|
|
22
23
|
* Devuelve el monto de envío que debe mostrarse en el resumen.
|
|
23
24
|
*
|