ng-easycommerce-v18 0.3.14-beta.2 → 0.3.15-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.
Files changed (30) hide show
  1. package/README.md +9 -4
  2. package/esm2022/lib/classes/filters/filter.mjs +2 -27
  3. package/esm2022/lib/constants/api.constants.service.mjs +44 -41
  4. package/esm2022/lib/ec-components/auth-ec/login-form-ec/login-form-ec.component.mjs +5 -1
  5. package/esm2022/lib/ec-components/auth-ec/register-form-ec/register-form-ec.component.mjs +5 -1
  6. package/esm2022/lib/ec-components/blocks-ec/block-products-ec/block-products-ec.component.mjs +3 -5
  7. package/esm2022/lib/ec-components/cart-ec/cart-item-ec/cart-item-ec.component.mjs +6 -2
  8. package/esm2022/lib/ec-components/checkout-ec/payment-ec/payment-methods/mp-redirect-ec/mp-redirect-ec.component.mjs +79 -9
  9. package/esm2022/lib/ec-components/header-ec/header-ec.component.mjs +45 -34
  10. package/esm2022/lib/ec-components/product-ec/product-ec.component.mjs +95 -5
  11. package/esm2022/lib/ec-components/related-products-ec/related-products-ec.component.mjs +4 -6
  12. package/esm2022/lib/ec-components/widgets-ec/index.mjs +2 -1
  13. package/esm2022/lib/ec-components/widgets-ec/magnizoom-ec/magnizoom-ec.component.mjs +2 -4
  14. package/esm2022/lib/ec-components/widgets-ec/redsys-catch-ec/redsys-catch-ec.component.mjs +246 -0
  15. package/esm2022/lib/ec-services/analytics/facebook-pixel.service.mjs +2 -4
  16. package/esm2022/lib/ec-services/analytics/google-analytics.service.mjs +2 -4
  17. package/esm2022/lib/ec-services/options.service.mjs +3 -27
  18. package/fesm2022/ng-easycommerce-v18.mjs +536 -173
  19. package/fesm2022/ng-easycommerce-v18.mjs.map +1 -1
  20. package/lib/constants/api.constants.service.d.ts +24 -13
  21. package/lib/ec-components/auth-ec/login-form-ec/login-form-ec.component.d.ts +2 -0
  22. package/lib/ec-components/auth-ec/register-form-ec/register-form-ec.component.d.ts +2 -0
  23. package/lib/ec-components/cart-ec/cart-item-ec/cart-item-ec.component.d.ts +5 -0
  24. package/lib/ec-components/checkout-ec/payment-ec/payment-methods/mp-redirect-ec/mp-redirect-ec.component.d.ts +4 -0
  25. package/lib/ec-components/header-ec/header-ec.component.d.ts +5 -1
  26. package/lib/ec-components/product-ec/product-ec.component.d.ts +10 -1
  27. package/lib/ec-components/widgets-ec/index.d.ts +1 -0
  28. package/lib/ec-components/widgets-ec/redsys-catch-ec/redsys-catch-ec.component.d.ts +35 -0
  29. package/lib/ec-services/options.service.d.ts +0 -4
  30. package/package.json +1 -1
@@ -1,37 +1,48 @@
1
1
  import * as i0 from "@angular/core";
2
2
  /**
3
- * Servicio que provee de datos relacionados con las peticiones a la API
3
+ * Servicio que provee de datos que estan relacionado con las peticiones a la API
4
+ * @export
5
+ * @class ApiConstantsService
4
6
  */
5
7
  export declare class ApiConstantsService {
6
- private ssrApiUrl;
7
8
  private _localStorage;
8
9
  private _translate;
10
+ /**
11
+ * Contiene los datos provisto por el frontend en el archivo environment.ts
12
+ */
9
13
  private environment;
10
- private platformId;
11
- private _channel;
12
- LOCALE: string;
13
- readonly SHOP_API_URL: string;
14
- readonly CMS_URL: string;
15
- constructor(ssrApiUrl: string);
16
14
  /**
17
15
  * Canal actual del frontend
18
16
  */
19
17
  get CHANNEL(): string;
20
18
  set CHANNEL(value: string);
19
+ private _channel;
21
20
  /**
22
- * URL del backend para realizar las peticiones
21
+ * Locale actual del frontend
23
22
  */
24
- get API_URL(): string;
23
+ LOCALE: string;
25
24
  /**
26
- * URL base completa para shop-api con channel y locale
25
+ * URL para las peticiones a shop-api
27
26
  */
28
- getShopApiBase(): string;
27
+ readonly SHOP_API_URL: string;
28
+ /**
29
+ * URL para las peticiones a cms
30
+ */
31
+ readonly CMS_URL: string;
32
+ constructor();
33
+ /**
34
+ * URL del backend para realizar las peticiones
35
+ */
36
+ get API_URL(): string;
29
37
  /**
30
- * Retorna la url base general (sin shop-api)
38
+ * Retorna la url base
39
+ * @returns {string}
31
40
  */
32
41
  getUrlBase(): string;
33
42
  /**
34
43
  * Cambia el canal actual
44
+ * @param code
45
+ * @returns
35
46
  */
36
47
  setChannel(code: string): void;
37
48
  setLocale(locale: string): void;
@@ -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,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[];
@@ -19,6 +22,8 @@ export declare class CartItemEcComponent implements OnInit {
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
  }
@@ -14,9 +14,13 @@ export declare class MpRedirectEcComponent implements OnInit {
14
14
  ventana: any;
15
15
  window?: Window;
16
16
  localStorage?: Storage;
17
+ private isMobile;
18
+ private sessionId;
17
19
  private platformId;
18
20
  constructor();
19
21
  ngOnInit(): void;
22
+ private detectMobile;
23
+ private generateSessionId;
20
24
  clickClose: () => void;
21
25
  iniciar: () => void;
22
26
  callState: () => void;
@@ -1,4 +1,5 @@
1
1
  import { MenuEcComponent } from '../abstractions-components';
2
+ import { Observable } from 'rxjs';
2
3
  import * as i0 from "@angular/core";
3
4
  /**
4
5
  * Componente que se encarga de manejar la funcionalidad del Header.
@@ -13,12 +14,15 @@ export declare class HeaderEcComponent extends MenuEcComponent {
13
14
  hidePrices: boolean;
14
15
  private __authService;
15
16
  private _channelService;
17
+ private changeDetector;
18
+ private appRouter;
19
+ private platformId;
20
+ logged$: Observable<boolean>;
16
21
  isAuthenticated$: boolean;
17
22
  constructor();
18
23
  private coreConstantsService;
19
24
  private router;
20
25
  private cdr;
21
- protected platformId: Object;
22
26
  ngOnInit(): void;
23
27
  ngAfterViewInit(): void;
24
28
  /**
@@ -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,11 @@ 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
+ checkStock(stock: number): void;
54
+ onQuantityChange(event: Event): void;
46
55
  static ɵfac: i0.ɵɵFactoryDeclaration<ProductEcComponent, never>;
47
56
  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
57
  }
@@ -2,3 +2,4 @@ export * from './loading';
2
2
  export * from './price-ec/price-ec.component';
3
3
  export * from './re-captcha-ec/re-captcha-ec.component';
4
4
  export * from './magnizoom-ec/magnizoom-ec.component';
5
+ export * from './redsys-catch-ec/redsys-catch-ec.component';
@@ -0,0 +1,35 @@
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
+ export declare class RedsysCatchEcComponent extends ComponentHelper implements OnInit, OnDestroy {
7
+ activedRoute: ActivatedRoute;
8
+ router: Router;
9
+ checkoutService: CheckoutService;
10
+ private renderer;
11
+ private elementRef;
12
+ private document;
13
+ private platformId;
14
+ message: string;
15
+ private subscription;
16
+ private isMobile;
17
+ private sessionId;
18
+ constructor(activedRoute: ActivatedRoute, router: Router, checkoutService: CheckoutService, renderer: Renderer2, elementRef: ElementRef, document: Document, platformId: any);
19
+ private detectMobile;
20
+ private generateSessionId;
21
+ private shouldProcessPayment;
22
+ private closeRedundantTab;
23
+ ngOnInit(): void;
24
+ ngOnDestroy(): void;
25
+ private hideHeaderFooter;
26
+ private showHeaderFooter;
27
+ private handlePaymentState;
28
+ private redirectToSuccess;
29
+ private redirectToCheckout;
30
+ private storeTotalAmount;
31
+ private setStateInLocal;
32
+ private setStateInSesion;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<RedsysCatchEcComponent, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<RedsysCatchEcComponent, "app-redsys-catch-ec", never, {}, {}, never, never, true, never>;
35
+ }
@@ -11,10 +11,6 @@ export declare class OptionsService {
11
11
  * Maneja las peticiones a la API
12
12
  */
13
13
  private connection;
14
- /**
15
- * Platform ID para verificar si estamos en el navegador
16
- */
17
- private platformId;
18
14
  /**
19
15
  * Constantes del core
20
16
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng-easycommerce-v18",
3
- "version": "0.3.14-beta.2",
3
+ "version": "0.3.15-beta.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.0",
6
6
  "@angular/core": "^18.2.0"