ng-easycommerce 0.0.570 → 0.0.572
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 +7 -0
- package/assets/bancardCatastro.html +1 -1
- package/assets/ec-i18n/ct.json +2 -1
- package/assets/ec-i18n/en.json +2 -1
- package/assets/ec-i18n/es.json +2 -1
- package/assets/ec-i18n/fr.json +2 -1
- package/assets/ec-i18n/gl.json +2 -1
- package/assets/ec-i18n/pr.json +2 -1
- package/bundles/ng-easycommerce.umd.js +113 -3
- 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/build-your-ec/build-your-ec.component.js +2 -2
- package/esm2015/lib/ec-component/cart-ec/cart-ec.component.js +9 -2
- package/esm2015/lib/ec-component/header-ec/header-ec.component.js +7 -1
- package/esm2015/lib/services/cart.service.js +66 -2
- package/esm2015/lib/services/products/product-detail.service.js +29 -1
- package/esm5/lib/ec-component/build-your-ec/build-your-ec.component.js +2 -2
- package/esm5/lib/ec-component/cart-ec/cart-ec.component.js +9 -2
- package/esm5/lib/ec-component/header-ec/header-ec.component.js +8 -1
- package/esm5/lib/services/cart.service.js +70 -2
- package/esm5/lib/services/products/product-detail.service.js +29 -1
- package/fesm2015/ng-easycommerce.js +108 -3
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +113 -3
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/cart-ec/cart-ec.component.d.ts +2 -2
- package/lib/ec-component/header-ec/header-ec.component.d.ts +3 -0
- package/lib/services/cart.service.d.ts +19 -0
- package/lib/services/products/product-detail.service.d.ts +9 -3
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ export declare class CartEcComponent extends ComponentHelper implements OnInit {
|
|
|
33
33
|
ngOnInit(): void;
|
|
34
34
|
toDecimal: (amount: any) => any;
|
|
35
35
|
actualizarCantidad: (item: any, cantidad: any, stock: any, id?: any) => void;
|
|
36
|
-
redirectCheckout: () =>
|
|
36
|
+
redirectCheckout: () => void;
|
|
37
37
|
redirectRegister: () => Promise<boolean>;
|
|
38
38
|
openModal(template: TemplateRef<any>): void;
|
|
39
39
|
redirectDetailProduct(product: any): void;
|
|
@@ -44,5 +44,5 @@ export declare class CartEcComponent extends ComponentHelper implements OnInit {
|
|
|
44
44
|
getVariants: (product: any) => any[];
|
|
45
45
|
createDiscountMessage(saleprice: number, price: number): string;
|
|
46
46
|
getMinimumPurchaseAmount: () => any;
|
|
47
|
-
exceedsMinimumAmount: (value: number) => void
|
|
47
|
+
exceedsMinimumAmount: (value: number) => void;
|
|
48
48
|
}
|
|
@@ -32,6 +32,8 @@ export declare class HeaderEcComponent extends ComponentHelper implements OnInit
|
|
|
32
32
|
toggled: boolean;
|
|
33
33
|
mediaUrl: string;
|
|
34
34
|
currencies: any;
|
|
35
|
+
balanceAttributes: any;
|
|
36
|
+
private balanceSubscription;
|
|
35
37
|
menu_button: ElementRef;
|
|
36
38
|
constructor(router: Router, consts: Constants, cartService: CartService, optionsService: OptionsService, paramsService: ParametersService, productsService: ProductsService, authService: AuthService, translate: TranslateService, renderer: Renderer2);
|
|
37
39
|
protected updateMenuItemSection: (elements: any) => void;
|
|
@@ -55,4 +57,5 @@ export declare class HeaderEcComponent extends ComponentHelper implements OnInit
|
|
|
55
57
|
changeUrlNavigation: (url: string) => void;
|
|
56
58
|
addChildren: (menuItems: any, code: any, item: any, stackPlace?: string) => void;
|
|
57
59
|
hasParams: (params: any, searched: any) => any;
|
|
60
|
+
protected subscribeToBalance(): void;
|
|
58
61
|
}
|
|
@@ -25,6 +25,7 @@ export declare class CartService {
|
|
|
25
25
|
private cartSubject;
|
|
26
26
|
private requestInProcess;
|
|
27
27
|
private promotionsSubject;
|
|
28
|
+
private balanceCustomerSubject;
|
|
28
29
|
private items;
|
|
29
30
|
private count;
|
|
30
31
|
private locale;
|
|
@@ -47,6 +48,19 @@ export declare class CartService {
|
|
|
47
48
|
cart: Observable<any>;
|
|
48
49
|
promotions: Observable<CheckoutData[]>;
|
|
49
50
|
deleting: Boolean;
|
|
51
|
+
balanceCustomer$: Observable<{
|
|
52
|
+
allowAnyPaymentMethod?: boolean;
|
|
53
|
+
allowExceedBalance?: boolean;
|
|
54
|
+
creditAmount?: number;
|
|
55
|
+
showMax?: boolean;
|
|
56
|
+
showPrice?: boolean;
|
|
57
|
+
remainingCredits?: number;
|
|
58
|
+
}>;
|
|
59
|
+
allowAnyPaymentMethod$: Observable<boolean>;
|
|
60
|
+
allowExceedBalance$: Observable<boolean>;
|
|
61
|
+
creditAmount$: Observable<number>;
|
|
62
|
+
showMax$: Observable<boolean>;
|
|
63
|
+
showPrice$: Observable<boolean>;
|
|
50
64
|
constructor(connection: ConnectionService, toastrService: ToastService, consts: Constants, authService: AuthService, orderUtils: OrderUtilityService, analyticsService: AnalyticsService, channelConfigService: ChannelConfigService, router: Router);
|
|
51
65
|
getCart2(): CartItem[];
|
|
52
66
|
getAddressBook: () => Promise<any>;
|
|
@@ -84,6 +98,8 @@ export declare class CartService {
|
|
|
84
98
|
mergeItemsAddAllToCart: (items: any[]) => any[];
|
|
85
99
|
updateItemQuantity: (item: CartItem, quantity: any) => void;
|
|
86
100
|
validateQuantity: (item: CartItem, quantity: any) => boolean;
|
|
101
|
+
private validatePriceAndCredits;
|
|
102
|
+
hasSufficientCreditsForCartTotal: () => boolean;
|
|
87
103
|
calculateStockCounts: (item: CartItem, quantity: any) => boolean;
|
|
88
104
|
deleteCartItem: (item: any, toast?: boolean) => void;
|
|
89
105
|
clearCart(): void;
|
|
@@ -115,4 +131,7 @@ export declare class CartService {
|
|
|
115
131
|
* UTILS
|
|
116
132
|
*/
|
|
117
133
|
transformItems: (server_item: any) => any;
|
|
134
|
+
getCreditAmount: () => Observable<number>;
|
|
135
|
+
getRemainingCredits: () => Observable<number>;
|
|
136
|
+
updateBalanceAttributes(cartData: any): void;
|
|
118
137
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
1
2
|
import { Product } from '../../interfaces/product';
|
|
2
3
|
import { ProductsService } from './products.service';
|
|
3
4
|
import { CartService } from '../cart.service';
|
|
@@ -17,9 +18,12 @@ export declare class ProductDetailService {
|
|
|
17
18
|
private optionsSubject;
|
|
18
19
|
private asociatedDataSubject;
|
|
19
20
|
private variants;
|
|
20
|
-
product$:
|
|
21
|
-
options$:
|
|
22
|
-
asociatedData$:
|
|
21
|
+
product$: Observable<Product>;
|
|
22
|
+
options$: Observable<any>;
|
|
23
|
+
asociatedData$: Observable<any>;
|
|
24
|
+
private currentTotalAmount;
|
|
25
|
+
private creditAmount;
|
|
26
|
+
private remainingCredits;
|
|
23
27
|
constructor(productsService: ProductsService, cartService: CartService, toastrService: ToastService, constants: Constants, analyticsService: AnalyticsService, currencyService: CurrencyService);
|
|
24
28
|
/**
|
|
25
29
|
* @param code Identificador del producto
|
|
@@ -71,6 +75,8 @@ export declare class ProductDetailService {
|
|
|
71
75
|
private crateSalePrice;
|
|
72
76
|
private inRange;
|
|
73
77
|
private validateQuantity;
|
|
78
|
+
private validatePriceAndCredits;
|
|
79
|
+
private fetchCartData;
|
|
74
80
|
private isProductValid;
|
|
75
81
|
/**
|
|
76
82
|
*
|