ng-easycommerce-v18 0.3.18-beta.4 → 0.3.19-beta.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.
@@ -16,8 +16,8 @@ export declare class CartItemEcComponent implements OnInit {
16
16
  isQuantityUpdating: boolean;
17
17
  ngOnInit(): void;
18
18
  updateQuantity(stock: number): void;
19
- less(stock: number, value?: number): void;
20
19
  plus(stock: number, value?: number): void;
20
+ less(stock: number, value?: number): void;
21
21
  deleteCartItem(): void;
22
22
  getVariants(product: any): any;
23
23
  createDiscountMessage(saleprice: number, price: number): string;
@@ -50,6 +50,10 @@ export declare class ProductEcComponent implements OnInit {
50
50
  plus(stock?: number, multipleQuantity?: number): void;
51
51
  less(multipleQuantity?: number): void;
52
52
  addToCart(): void;
53
+ /**
54
+ * Valida las restricciones de cantidad del producto
55
+ */
56
+ private validateQuantity;
53
57
  checkStock(stock: number): void;
54
58
  onQuantityChange(event: Event): void;
55
59
  static ɵfac: i0.ɵɵFactoryDeclaration<ProductEcComponent, never>;
@@ -44,7 +44,7 @@ export declare class GoogleAnalyticsService {
44
44
  * @param event_name
45
45
  * @returns
46
46
  */
47
- translateEventName(event_name: AnalyticEventKey): "view_item" | "view_item_list" | "begin_checkout" | "add_shipping_info" | "add_payment_info" | "purchase" | "add_to_cart" | "remove_from_cart" | "sign_up" | null;
47
+ translateEventName(event_name: AnalyticEventKey): "view_item" | "purchase" | "add_payment_info" | "remove_from_cart" | "view_item_list" | "sign_up" | "add_to_cart" | "begin_checkout" | "add_shipping_info" | null;
48
48
  /**
49
49
  * Evalua el evento y devuelve los datos de las funciones relacionadas.
50
50
  * @param event_name Nombre del evento
@@ -67,7 +67,7 @@ export declare class GTMService {
67
67
  * @param event_name
68
68
  * @returns
69
69
  */
70
- translateEventName(event_name: AnalyticEventKey): "view_item" | "view_item_list" | "begin_checkout" | "add_shipping_info" | "add_payment_info" | "purchase" | "add_to_cart" | "remove_from_cart" | "sign_up" | "select_promotion" | "select_item" | null;
70
+ translateEventName(event_name: AnalyticEventKey): "view_item" | "purchase" | "add_payment_info" | "remove_from_cart" | "view_item_list" | "sign_up" | "add_to_cart" | "select_promotion" | "select_item" | "begin_checkout" | "add_shipping_info" | null;
71
71
  /**
72
72
  * Evalua el evento y devuelve los datos de las funciones relacionadas.
73
73
  * @param event_name Nombre del evento
@@ -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): void;
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
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-easycommerce-v18",
3
- "version": "0.3.18-beta.4",
3
+ "version": "0.3.19-beta.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.0",
6
6
  "@angular/core": "^18.2.0"